diff options
author | marha <marha@users.sourceforge.net> | 2014-03-28 17:35:36 +0100 |
---|---|---|
committer | marha <marha@users.sourceforge.net> | 2014-03-28 17:35:36 +0100 |
commit | cbfb19790917d271b8ca6156554b16acc802719f (patch) | |
tree | 830af0dc6e08b5d0c7124fec143e90255f3feee3 /fontconfig/src/fcfreetype.c | |
parent | d02e6760412c7a96abbc4d0add5dd8d5e83bbe27 (diff) | |
download | vcxsrv-cbfb19790917d271b8ca6156554b16acc802719f.tar.gz vcxsrv-cbfb19790917d271b8ca6156554b16acc802719f.tar.bz2 vcxsrv-cbfb19790917d271b8ca6156554b16acc802719f.zip |
libxtrans fontconfig mesa xserver git update 28 Mar 2014
xserver commit a2880699e8f1f576e1a48ebf25e8982463323f84
libxtrans commit 68f60238c4224f954ff6556ae778c72e420175f0
fontconfig commit fcba9ef01c978323fc71c17e455d3cd6ae35edcc
mesa commit 029ccd773d01a5f801c809c499516d7b0c4cc3f8
Diffstat (limited to 'fontconfig/src/fcfreetype.c')
-rw-r--r-- | fontconfig/src/fcfreetype.c | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/fontconfig/src/fcfreetype.c b/fontconfig/src/fcfreetype.c index d271d69e2..d0932b31b 100644 --- a/fontconfig/src/fcfreetype.c +++ b/fontconfig/src/fcfreetype.c @@ -1107,6 +1107,8 @@ FcFreeTypeQueryFace (const FT_Face face, FcChar8 *hashstr = NULL; FT_Error err; FT_ULong len = 0, alen; + FcRange *r = NULL; + double lower_size = 0.0L, upper_size = DBL_MAX; pat = FcPatternCreate (); if (!pat) @@ -1514,6 +1516,39 @@ FcFreeTypeQueryFace (const FT_Face face, free (complex_); } +#if defined (HAVE_TT_OS2_USUPPEROPTICALPOINTSIZE) && defined (HAVE_TT_OS2_USLOWEROPTICALPOINTSIZE) + if (os2 && os2->version >= 0x0005 && os2->version != 0xffff) + { + /* usLowerPointSize and usUpperPointSize is actually twips */ + lower_size = os2->usLowerOpticalPointSize / 20.0L; + upper_size = os2->usUpperOpticalPointSize / 20.0L; + } +#endif + if (os2) + { + r = FcRangeCreateDouble (lower_size, upper_size); + if (!FcPatternAddRange (pat, FC_SIZE, r)) + { + FcRangeDestroy (r); + goto bail1; + } + FcRangeDestroy (r); + } + else + { + for (i = 0; i < face->num_fixed_sizes; i++) + { + double d = FcGetPixelSize (face, i); + r = FcRangeCreateDouble (d, d); + if (!FcPatternAddRange (pat, FC_SIZE, r)) + { + FcRangeDestroy (r); + goto bail1; + } + FcRangeDestroy (r); + } + } + /* * Type 1: Check for FontInfo dictionary information * Code from g2@magestudios.net (Gerard Escalante) |