diff options
author | marha <marha@users.sourceforge.net> | 2012-03-08 11:31:50 +0100 |
---|---|---|
committer | marha <marha@users.sourceforge.net> | 2012-03-08 11:31:50 +0100 |
commit | ceca11a64938e803d2e0d8ccfc030357c3a0121c (patch) | |
tree | cd5e20638fed3446ac99e4c3d29809ef07b28d18 /fontconfig/src/fcfreetype.c | |
parent | 8db4c7567d495ef6f6162406394ac192e6c2cfe7 (diff) | |
parent | b4e09d9f9c2cb930daef6b578e3051e71425ed7f (diff) | |
download | vcxsrv-ceca11a64938e803d2e0d8ccfc030357c3a0121c.tar.gz vcxsrv-ceca11a64938e803d2e0d8ccfc030357c3a0121c.tar.bz2 vcxsrv-ceca11a64938e803d2e0d8ccfc030357c3a0121c.zip |
Merge remote-tracking branch 'origin/released'
Conflicts:
pixman/pixman/pixman-mmx.c
Diffstat (limited to 'fontconfig/src/fcfreetype.c')
-rw-r--r-- | fontconfig/src/fcfreetype.c | 32 |
1 files changed, 14 insertions, 18 deletions
diff --git a/fontconfig/src/fcfreetype.c b/fontconfig/src/fcfreetype.c index e322e8ca4..ce7dc836c 100644 --- a/fontconfig/src/fcfreetype.c +++ b/fontconfig/src/fcfreetype.c @@ -2513,31 +2513,27 @@ FcFreeTypeCharSetAndSpacing (FT_Face face, FcBlanks *blanks, int *spacing) { FcCharSet *cs; - cs = FcFreeTypeCharSetAndSpacingForSize (face, blanks, spacing, -1); /* * Check for bitmap-only ttf fonts that are missing the glyf table. * In that case, pick a size and look for glyphs in that size instead */ - if (FcCharSetCount (cs) == 0) + if (!(face->face_flags & FT_FACE_FLAG_SCALABLE) && + face->num_fixed_sizes > 0 && + FT_Get_Sfnt_Table (face, ft_sfnt_head)) { - /* Check for non-scalable TT fonts */ - if (!(face->face_flags & FT_FACE_FLAG_SCALABLE) && - face->num_fixed_sizes > 0 && - FT_Get_Sfnt_Table (face, ft_sfnt_head)) - { - FT_Int strike_index = 0; - int i; - - /* Select the face closest to 16 pixels tall */ - for (i = 1; i < face->num_fixed_sizes; i++) { - if (abs (face->available_sizes[i].height - 16) < - abs (face->available_sizes[strike_index].height - 16)) - strike_index = i; - } - FcCharSetDestroy (cs); - cs = FcFreeTypeCharSetAndSpacingForSize (face, blanks, spacing, strike_index); + FT_Int strike_index = 0; + int i; + + /* Select the face closest to 16 pixels tall */ + for (i = 1; i < face->num_fixed_sizes; i++) { + if (abs (face->available_sizes[i].height - 16) < + abs (face->available_sizes[strike_index].height - 16)) + strike_index = i; } + cs = FcFreeTypeCharSetAndSpacingForSize (face, blanks, spacing, strike_index); } + else + cs = FcFreeTypeCharSetAndSpacingForSize (face, blanks, spacing, -1); return cs; } |