fontconfig: Branch 'main' - 2 commits

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Wed Jun 11 21:45:29 UTC 2025


 src/fcfreetype.c |    5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

New commits:
commit 61f668a1b76bc85d97eb04ade91ac7489e6e120b
Merge: 6c77068 971d8cd
Author: Akira TAGOH <akira at tagoh.org>
Date:   Wed Jun 11 21:45:27 2025 +0000

    Merge branch 'issues/478' into 'main'
    
    Trim trailing newline in string in cache
    
    Closes #478
    
    See merge request fontconfig/fontconfig!427

commit 971d8cd62952159f5ab295e0b14c21893a526feb
Author: Akira TAGOH <akira at tagoh.org>
Date:   Thu Jun 12 06:25:50 2025 +0900

    Trim trailing newline in string in cache
    
    just to workaround for some problematic fonts
    
    Fixes https://gitlab.freedesktop.org/fontconfig/fontconfig/-/issues/478
    
    Changelog: changed

diff --git a/src/fcfreetype.c b/src/fcfreetype.c
index 97e6d3f..8f474a5 100644
--- a/src/fcfreetype.c
+++ b/src/fcfreetype.c
@@ -1514,7 +1514,10 @@ FcFreeTypeQueryFaceInternal (const FT_Face   face,
 		    len = strlen ((const char *)pp);
 		    memmove (utf8, pp, len + 1);
 		    pp = utf8 + len;
-		    while (pp > utf8 && *(pp - 1) == ' ')
+		    while (pp > utf8 &&
+			   (*(pp - 1) == ' ' ||
+			    *(pp - 1) == '\r' ||
+			    *(pp - 1) == '\n'))
 			pp--;
 		    *pp = 0;
 


More information about the Fontconfig mailing list