aboutsummaryrefslogtreecommitdiff
path: root/fontconfig/src/fcfreetype.c
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2012-03-08 11:23:54 +0100
committermarha <marha@users.sourceforge.net>2012-03-08 11:23:54 +0100
commitb4e09d9f9c2cb930daef6b578e3051e71425ed7f (patch)
tree2f7978bbc080eacca775af19715931ae34c23836 /fontconfig/src/fcfreetype.c
parent50ace52bb8308fd62b8bad9ae912dc18c4ae32ff (diff)
downloadvcxsrv-b4e09d9f9c2cb930daef6b578e3051e71425ed7f.tar.gz
vcxsrv-b4e09d9f9c2cb930daef6b578e3051e71425ed7f.tar.bz2
vcxsrv-b4e09d9f9c2cb930daef6b578e3051e71425ed7f.zip
fontconfig libXau libXdmcp libXext libXft libXinerama libXmu pixman mesa
git update 8 Mar 2012
Diffstat (limited to 'fontconfig/src/fcfreetype.c')
-rw-r--r--fontconfig/src/fcfreetype.c32
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;
}