* documentation for any purpose is hereby granted without fee, provided that
* the above copyright notice appear in all copies and that both that
* copyright notice and this permission notice appear in supporting
* documentation for any purpose is hereby granted without fee, provided that
* the above copyright notice appear in all copies and that both that
* copyright notice and this permission notice appear in supporting
* representations about the suitability of this software for any purpose. It
* is provided "as is" without express or implied warranty.
*
* representations about the suitability of this software for any purpose. It
* is provided "as is" without express or implied warranty.
*
- { TT_PLATFORM_APPLE_UNICODE, TT_ENCODING_DONT_CARE, "UCS-2BE" },
+ { TT_PLATFORM_APPLE_UNICODE, TT_ENCODING_DONT_CARE, "UTF-16BE" },
{ TT_PLATFORM_MACINTOSH, TT_MAC_ID_ROMAN, "MACINTOSH" },
{ TT_PLATFORM_MACINTOSH, TT_MAC_ID_JAPANESE, "SJIS" },
{ TT_PLATFORM_MACINTOSH, TT_MAC_ID_ROMAN, "MACINTOSH" },
{ TT_PLATFORM_MACINTOSH, TT_MAC_ID_JAPANESE, "SJIS" },
{ TT_PLATFORM_MICROSOFT, TT_MS_ID_UNICODE_CS, "UTF-16BE" },
{ TT_PLATFORM_MICROSOFT, TT_MS_ID_SJIS, "SJIS-WIN" },
{ TT_PLATFORM_MICROSOFT, TT_MS_ID_GB2312, "GB2312" },
{ TT_PLATFORM_MICROSOFT, TT_MS_ID_BIG_5, "BIG-5" },
{ TT_PLATFORM_MICROSOFT, TT_MS_ID_WANSUNG, "Wansung" },
{ TT_PLATFORM_MICROSOFT, TT_MS_ID_JOHAB, "Johab" },
{ TT_PLATFORM_MICROSOFT, TT_MS_ID_UNICODE_CS, "UTF-16BE" },
{ TT_PLATFORM_MICROSOFT, TT_MS_ID_SJIS, "SJIS-WIN" },
{ TT_PLATFORM_MICROSOFT, TT_MS_ID_GB2312, "GB2312" },
{ TT_PLATFORM_MICROSOFT, TT_MS_ID_BIG_5, "BIG-5" },
{ TT_PLATFORM_MICROSOFT, TT_MS_ID_WANSUNG, "Wansung" },
{ TT_PLATFORM_MICROSOFT, TT_MS_ID_JOHAB, "Johab" },
- { TT_PLATFORM_MICROSOFT, TT_MS_ID_UCS_4, "UCS-2BE" },
+ { TT_PLATFORM_MICROSOFT, TT_MS_ID_UCS_4, "UTF-16BE" },
{ TT_PLATFORM_ISO, TT_ISO_ID_7BIT_ASCII, "ASCII" },
{ TT_PLATFORM_ISO, TT_ISO_ID_7BIT_ASCII, "ASCII" },
- { TT_PLATFORM_ISO, TT_ISO_ID_10646, "UCS-2BE" },
+ { TT_PLATFORM_ISO, TT_ISO_ID_10646, "UTF-16BE" },
{ TT_PLATFORM_ISO, TT_ISO_ID_8859_1, "ISO-8859-1" },
};
{ TT_PLATFORM_ISO, TT_ISO_ID_8859_1, "ISO-8859-1" },
};
{ TT_PLATFORM_MACINTOSH, TT_MAC_LANGID_DZONGKHA, "dz" },
{ TT_PLATFORM_MACINTOSH, TT_MAC_LANGID_JAVANESE, "jw" },
{ TT_PLATFORM_MACINTOSH, TT_MAC_LANGID_SUNDANESE, "su" },
{ TT_PLATFORM_MACINTOSH, TT_MAC_LANGID_DZONGKHA, "dz" },
{ TT_PLATFORM_MACINTOSH, TT_MAC_LANGID_JAVANESE, "jw" },
{ TT_PLATFORM_MACINTOSH, TT_MAC_LANGID_SUNDANESE, "su" },
#if 0 /* these seem to be errors that have been dropped */
{ TT_PLATFORM_MACINTOSH, TT_MAC_LANGID_SCOTTISH_GAELIC },
{ TT_PLATFORM_MACINTOSH, TT_MAC_LANGID_IRISH_GAELIC },
#endif
#if 0 /* these seem to be errors that have been dropped */
{ TT_PLATFORM_MACINTOSH, TT_MAC_LANGID_SCOTTISH_GAELIC },
{ TT_PLATFORM_MACINTOSH, TT_MAC_LANGID_IRISH_GAELIC },
#endif
/* The following codes are new as of 2000-03-10 */
{ TT_PLATFORM_MACINTOSH, TT_MAC_LANGID_GALICIAN, "gl" },
{ TT_PLATFORM_MACINTOSH, TT_MAC_LANGID_AFRIKAANS, "af" },
/* The following codes are new as of 2000-03-10 */
{ TT_PLATFORM_MACINTOSH, TT_MAC_LANGID_GALICIAN, "gl" },
{ TT_PLATFORM_MACINTOSH, TT_MAC_LANGID_AFRIKAANS, "af" },
{ TT_PLATFORM_MICROSOFT, TT_MS_LANGID_PASHTO_AFGHANISTAN, "ps" },
{ TT_PLATFORM_MICROSOFT, TT_MS_LANGID_FILIPINO_PHILIPPINES, "phi" },
{ TT_PLATFORM_MICROSOFT, TT_MS_LANGID_DHIVEHI_MALDIVES, "div" },
{ TT_PLATFORM_MICROSOFT, TT_MS_LANGID_PASHTO_AFGHANISTAN, "ps" },
{ TT_PLATFORM_MICROSOFT, TT_MS_LANGID_FILIPINO_PHILIPPINES, "phi" },
{ TT_PLATFORM_MICROSOFT, TT_MS_LANGID_DHIVEHI_MALDIVES, "div" },
{ TT_PLATFORM_MICROSOFT, TT_MS_LANGID_OROMO_ETHIOPIA, "om" },
{ TT_PLATFORM_MICROSOFT, TT_MS_LANGID_TIGRIGNA_ETHIOPIA, "ti" },
{ TT_PLATFORM_MICROSOFT, TT_MS_LANGID_TIGRIGNA_ERYTHREA, "ti" },
{ TT_PLATFORM_MICROSOFT, TT_MS_LANGID_OROMO_ETHIOPIA, "om" },
{ TT_PLATFORM_MICROSOFT, TT_MS_LANGID_TIGRIGNA_ETHIOPIA, "ti" },
{ TT_PLATFORM_MICROSOFT, TT_MS_LANGID_TIGRIGNA_ERYTHREA, "ti" },
&inbuf, &in_bytes_left,
&outbuf, &out_bytes_left);
if (did == (size_t) (-1))
&inbuf, &in_bytes_left,
&outbuf, &out_bytes_left);
if (did == (size_t) (-1))
for (i = 0; i < NUM_FC_FT_LANGUAGE; i++)
if (fcFtLanguage[i].platform_id == platform_id &&
(fcFtLanguage[i].language_id == TT_LANGUAGE_DONT_CARE ||
for (i = 0; i < NUM_FC_FT_LANGUAGE; i++)
if (fcFtLanguage[i].platform_id == platform_id &&
(fcFtLanguage[i].language_id == TT_LANGUAGE_DONT_CARE ||
len = strlen((char *) vendor_string);
if (memcmp(vendor, vendor_string, len) != 0)
return FcFalse;
len = strlen((char *) vendor_string);
if (memcmp(vendor, vendor_string, len) != 0)
return FcFalse;
if (vendor)
for(i = 0; i < NUM_VENDOR_FOUNDRIES; i++)
if (FcVendorMatch (vendor, FcVendorFoundries[i].vendor))
if (vendor)
for(i = 0; i < NUM_VENDOR_FOUNDRIES; i++)
if (FcVendorMatch (vendor, FcVendorFoundries[i].vendor))
* the Postscript FontInfo dictionary. Finally, the
* BDF properties will queried.
*/
* the Postscript FontInfo dictionary. Finally, the
* BDF properties will queried.
*/
if (os2 && os2->version >= 0x0001 && os2->version != 0xffff)
foundry = FcVendorFoundry(os2->achVendID);
if (os2 && os2->version >= 0x0001 && os2->version != 0xffff)
foundry = FcVendorFoundry(os2->achVendID);
FcStrCmpIgnoreBlanksAndCase ((FcChar8 *) face->family_name, (FcChar8 *) "") != 0)
{
if (FcDebug () & FC_DBG_SCANV)
FcStrCmpIgnoreBlanksAndCase ((FcChar8 *) face->family_name, (FcChar8 *) "") != 0)
{
if (FcDebug () & FC_DBG_SCANV)
if (!nstyle && face->style_name &&
FcStrCmpIgnoreBlanksAndCase ((FcChar8 *) face->style_name, (FcChar8 *) "") != 0)
{
if (!nstyle && face->style_name &&
FcStrCmpIgnoreBlanksAndCase ((FcChar8 *) face->style_name, (FcChar8 *) "") != 0)
{
* If the font advertises support for multiple
* "exclusive" languages, then include support
* for any language found to have coverage
* If the font advertises support for multiple
* "exclusive" languages, then include support
* for any language found to have coverage
* Type 1: Check for FontInfo dictionary information
* Code from g2@magestudios.net (Gerard Escalante)
*/
* Type 1: Check for FontInfo dictionary information
* Code from g2@magestudios.net (Gerard Escalante)
*/
#if HAVE_FT_GET_PS_FONT_INFO
if (FT_Get_PS_Font_Info(face, &psfontinfo) == 0)
{
#if HAVE_FT_GET_PS_FONT_INFO
if (FT_Get_PS_Font_Info(face, &psfontinfo) == 0)
{
printf ("\tType1 weight %s maps to %d\n",
psfontinfo.weight, weight);
}
printf ("\tType1 weight %s maps to %d\n",
psfontinfo.weight, weight);
}
* Don't bother with italic_angle; FreeType already extracts that
* information for us and sticks it into style_flags
*/
if (psfontinfo.italic_angle)
* Don't bother with italic_angle; FreeType already extracts that
* information for us and sticks it into style_flags
*/
if (psfontinfo.italic_angle)
#if HAVE_FT_GET_BDF_PROPERTY
/*
* Finally, look for a FOUNDRY BDF property if no other
#if HAVE_FT_GET_BDF_PROPERTY
/*
* Finally, look for a FOUNDRY BDF property if no other
if (FT_New_Face (ftLibrary, (char *) file, id, &face))
goto bail;
if (FT_New_Face (ftLibrary, (char *) file, id, &face))
goto bail;
static const FcFontDecode fcFontDecoders[] = {
{ ft_encoding_unicode, 0, (1 << 21) - 1 },
{ ft_encoding_symbol, &AdobeSymbol, (1 << 16) - 1 },
static const FcFontDecode fcFontDecoders[] = {
{ ft_encoding_unicode, 0, (1 << 21) - 1 },
{ ft_encoding_symbol, &AdobeSymbol, (1 << 16) - 1 },
{
if (!strcmp ((char *) name, (char *) _fc_glyph_names[gn].name))
return _fc_glyph_names[gn].ucs;
{
if (!strcmp ((char *) name, (char *) _fc_glyph_names[gn].name))
return _fc_glyph_names[gn].ucs;
FT_UInt glyph, FcBlanks *blanks,
FT_Pos *advance,
FcBool using_strike)
{
FT_Int load_flags = FT_LOAD_IGNORE_GLOBAL_ADVANCE_WIDTH | FT_LOAD_NO_SCALE | FT_LOAD_NO_HINTING;
FT_GlyphSlot slot;
FT_UInt glyph, FcBlanks *blanks,
FT_Pos *advance,
FcBool using_strike)
{
FT_Int load_flags = FT_LOAD_IGNORE_GLOBAL_ADVANCE_WIDTH | FT_LOAD_NO_SCALE | FT_LOAD_NO_HINTING;
FT_GlyphSlot slot;
FcFreeTypeCheckGlyph (face, ucs4, glyph, blanks, &advance, using_strike))
{
FcFreeTypeCheckGlyph (face, ucs4, glyph, blanks, &advance, using_strike))
{
* ignore glyphs with zero advance. They’re
* combining characters, and while their behaviour
* isn’t well defined for monospaced applications in
* ignore glyphs with zero advance. They’re
* combining characters, and while their behaviour
* isn’t well defined for monospaced applications in
if (FT_Get_Glyph_Name (face, glyph, name_buf, FC_GLYPHNAME_BUFLEN+1) == 0)
{
ucs4 = FcGlyphNameToUcs4 (name_buf);
if (FT_Get_Glyph_Name (face, glyph, name_buf, FC_GLYPHNAME_BUFLEN+1) == 0)
{
ucs4 = FcGlyphNameToUcs4 (name_buf);
FcFreeTypeCheckGlyph (face, ucs4, glyph, blanks, &advance, using_strike))
{
if (advance)
FcFreeTypeCheckGlyph (face, ucs4, glyph, blanks, &advance, using_strike))
{
if (advance)
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
*/
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
*/
*/
#define FcIsSpace(x) (040 == (x))
#define FcIsValidScript(x) (FcIsLower(x) || FcIsUpper (x) || FcIsSpace(x))
*/
#define FcIsSpace(x) (040 == (x))
#define FcIsValidScript(x) (FcIsLower(x) || FcIsUpper (x) || FcIsSpace(x))
tagstring[2] = (FcChar8)(tag >> 8),
tagstring[3] = (FcChar8)(tag);
tagstring[4] = '\0';
tagstring[2] = (FcChar8)(tag >> 8),
tagstring[3] = (FcChar8)(tag);
tagstring[4] = '\0';
/* skip tags which aren't alphabetic, under the assumption that
* they're probably broken
*/
/* skip tags which aren't alphabetic, under the assumption that
* they're probably broken
*/