[Fontconfig] fontconfig: Branch 'master'
Akira TAGOH
tagoh at kemper.freedesktop.org
Fri Jun 8 03:43:56 PDT 2012
src/fcfreetype.c | 15 ++++++++++++++-
1 file changed, 14 insertions(+), 1 deletion(-)
New commits:
commit cf70eaa3bfa9b14847a1067295c5c0dc12c95e83
Author: Akira TAGOH <akira at tagoh.org>
Date: Fri Jun 8 19:41:59 2012 +0900
Bug 50525 - superfluous whitespace in the style
diff --git a/src/fcfreetype.c b/src/fcfreetype.c
index ce7dc83..fb2b0f2 100644
--- a/src/fcfreetype.c
+++ b/src/fcfreetype.c
@@ -1179,10 +1179,11 @@ FcFreeTypeQueryFace (const FT_Face face,
for (snamei = 0; snamei < snamec; snamei++)
{
- FcChar8 *utf8;
+ FcChar8 *utf8, *pp;
const FcChar8 *lang;
const char *elt = 0, *eltlang = 0;
int *np = 0, *nlangp = 0;
+ size_t len;
if (FT_Get_Sfnt_Name (face, snamei, &sname) != 0)
continue;
@@ -1253,6 +1254,18 @@ FcFreeTypeQueryFace (const FT_Face face,
#endif
case TT_NAME_ID_PREFERRED_SUBFAMILY:
case TT_NAME_ID_FONT_SUBFAMILY:
+ if (utf8)
+ {
+ pp = utf8;
+ while (*pp == ' ')
+ pp++;
+ len = strlen ((const char *) pp);
+ memmove (utf8, pp, len + 1);
+ pp = utf8 + len - 1;
+ while (*pp == ' ')
+ pp--;
+ *(pp + 1) = 0;
+ }
if (FcDebug () & FC_DBG_SCANV)
printf ("found style (n %2d p %d e %d l 0x%04x) %s\n",
sname.name_id, sname.platform_id,
More information about the Fontconfig
mailing list