aboutsummaryrefslogtreecommitdiff
path: root/fontconfig/src/fcfreetype.c
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2012-06-11 09:01:24 +0200
committermarha <marha@users.sourceforge.net>2012-06-11 09:01:24 +0200
commita660c10f0f261b390ada5c3a5d0543088830f070 (patch)
tree522977aa2a1be8687b1399e8afa2503daa58821b /fontconfig/src/fcfreetype.c
parent72ec0e3bb2d7fc6b77b2a75873792f781679da6a (diff)
parent080d1527a5358dd66ac927acbe0ec61cba7aa7e1 (diff)
downloadvcxsrv-a660c10f0f261b390ada5c3a5d0543088830f070.tar.gz
vcxsrv-a660c10f0f261b390ada5c3a5d0543088830f070.tar.bz2
vcxsrv-a660c10f0f261b390ada5c3a5d0543088830f070.zip
Merge remote-tracking branch 'origin/released'
Conflicts: mesalib/src/glsl/glcpp/.gitignore
Diffstat (limited to 'fontconfig/src/fcfreetype.c')
-rw-r--r--fontconfig/src/fcfreetype.c15
1 files changed, 14 insertions, 1 deletions
diff --git a/fontconfig/src/fcfreetype.c b/fontconfig/src/fcfreetype.c
index ce7dc836c..fb2b0f2f9 100644
--- a/fontconfig/src/fcfreetype.c
+++ b/fontconfig/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,