* 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.
*
* CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
* DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
* TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
* CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
* DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
* TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
{ 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_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, "GB3212" },
+ { 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_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, "UCS4" },
+ { TT_PLATFORM_MICROSOFT, TT_MS_ID_UCS_4, "UCS-2BE" },
{ TT_PLATFORM_ISO, TT_ISO_ID_7BIT_ASCII, "ASCII" },
{ TT_PLATFORM_ISO, TT_ISO_ID_10646, "UCS-2BE" },
{ TT_PLATFORM_ISO, TT_ISO_ID_8859_1, "ISO-8859-1" },
{ TT_PLATFORM_ISO, TT_ISO_ID_7BIT_ASCII, "ASCII" },
{ TT_PLATFORM_ISO, TT_ISO_ID_10646, "UCS-2BE" },
{ TT_PLATFORM_ISO, TT_ISO_ID_8859_1, "ISO-8859-1" },
{ (FC8) "extraexpanded", FC_WIDTH_EXTRAEXPANDED },
{ (FC8) "ultraexpanded", FC_WIDTH_ULTRAEXPANDED },
{ (FC8) "expanded", FC_WIDTH_EXPANDED }, /* must be after *expanded */
{ (FC8) "extraexpanded", FC_WIDTH_EXTRAEXPANDED },
{ (FC8) "ultraexpanded", FC_WIDTH_ULTRAEXPANDED },
{ (FC8) "expanded", FC_WIDTH_EXPANDED }, /* must be after *expanded */
static const FcStringConst decorativeConsts[] = {
{ (FC8) "shadow", FcTrue },
static const FcStringConst decorativeConsts[] = {
{ (FC8) "shadow", FcTrue },
{ (FC8) "antiqua", FcTrue },
{ (FC8) "romansc", FcTrue },
{ (FC8) "embosed", FcTrue },
{ (FC8) "antiqua", FcTrue },
{ (FC8) "romansc", FcTrue },
{ (FC8) "embosed", FcTrue },
#define NUM_PLATFORM_ORDER (sizeof (platform_order) / sizeof (platform_order[0]))
static const FT_UShort nameid_order[] = {
#define NUM_PLATFORM_ORDER (sizeof (platform_order) / sizeof (platform_order[0]))
static const FT_UShort nameid_order[] = {
TT_NAME_ID_PREFERRED_FAMILY,
TT_NAME_ID_FONT_FAMILY,
TT_NAME_ID_MAC_FULL_NAME,
TT_NAME_ID_FULL_NAME,
TT_NAME_ID_PREFERRED_FAMILY,
TT_NAME_ID_FONT_FAMILY,
TT_NAME_ID_MAC_FULL_NAME,
TT_NAME_ID_FULL_NAME,
TT_NAME_ID_PREFERRED_SUBFAMILY,
TT_NAME_ID_FONT_SUBFAMILY,
TT_NAME_ID_TRADEMARK,
TT_NAME_ID_PREFERRED_SUBFAMILY,
TT_NAME_ID_FONT_SUBFAMILY,
TT_NAME_ID_TRADEMARK,
case TT_NAME_ID_PREFERRED_SUBFAMILY:
case TT_NAME_ID_FONT_SUBFAMILY:
if (FcDebug () & FC_DBG_SCANV)
case TT_NAME_ID_PREFERRED_SUBFAMILY:
case TT_NAME_ID_FONT_SUBFAMILY:
if (FcDebug () & FC_DBG_SCANV)
printf ("\tos2 width class %d maps to width %d\n",
os2->usWidthClass, width);
}
printf ("\tos2 width class %d maps to width %d\n",
os2->usWidthClass, width);
}
/*
* Skip over PCF fonts that have no encoded characters; they're
* usually just Unicode fonts transcoded to some legacy encoding
/*
* Skip over PCF fonts that have no encoded characters; they're
* usually just Unicode fonts transcoded to some legacy encoding
* or not by whether it has any BDF properties. Try PIXEL_SIZE;
* I don't know how to get a list of BDF properties on the font. -PL
*/
* or not by whether it has any BDF properties. Try PIXEL_SIZE;
* I don't know how to get a list of BDF properties on the font. -PL
*/
#define TTAG_GPOS FT_MAKE_TAG( 'G', 'P', 'O', 'S' )
#define TTAG_GSUB FT_MAKE_TAG( 'G', 'S', 'U', 'B' )
#define TTAG_SILF FT_MAKE_TAG( 'S', 'i', 'l', 'f')
#define TTAG_GPOS FT_MAKE_TAG( 'G', 'P', 'O', 'S' )
#define TTAG_GSUB FT_MAKE_TAG( 'G', 'S', 'U', 'B' )
#define TTAG_SILF FT_MAKE_TAG( 'S', 'i', 'l', 'f')
- if (*complex != '\0')
- strcat ((char *) complex, " ");
- strcat ((char *) complex, "otlayout:");
- strcat ((char *) complex, (char *) tagstring);
+ if (*complex_ != '\0')
+ strcat ((char *) complex_, " ");
+ strcat ((char *) complex_, "otlayout:");
+ strcat ((char *) complex_, (char *) tagstring);
-static FT_Error
-GetScriptTags(FT_Face face, FT_ULong tabletag, FT_ULong **stags, FT_UShort *script_count)
+static int
+GetScriptTags(FT_Face face, FT_ULong tabletag, FT_ULong **stags)
base_offset = ftglue_stream_pos ( stream );
/* skip version */
if ( ftglue_stream_seek ( stream, base_offset + 4L ) || ftglue_stream_frame_enter( stream, 2L ) )
base_offset = ftglue_stream_pos ( stream );
/* skip version */
if ( ftglue_stream_seek ( stream, base_offset + 4L ) || ftglue_stream_frame_enter( stream, 2L ) )
base_offset = ftglue_stream_pos( stream );
if ( ftglue_stream_frame_enter( stream, 2L ) )
base_offset = ftglue_stream_pos( stream );
if ( ftglue_stream_frame_enter( stream, 2L ) )
- qsort(*stags, *script_count, sizeof(FT_ULong), compareulong);
+ qsort(*stags, script_count, sizeof(FT_ULong), compareulong);
FT_UShort gsub_count=0, gpos_count=0;
FT_ULong maxsize;
FT_Memory memory = face->stream->memory;
FT_UShort gsub_count=0, gpos_count=0;
FT_ULong maxsize;
FT_Memory memory = face->stream->memory;
int indx1 = 0, indx2 = 0;
err = FT_Load_Sfnt_Table(face, TTAG_SILF, 0, 0, &len);
issilgraphitefont = ( err == FT_Err_Ok);
int indx1 = 0, indx2 = 0;
err = FT_Load_Sfnt_Table(face, TTAG_SILF, 0, 0, &len);
issilgraphitefont = ( err == FT_Err_Ok);
- if (GetScriptTags(face, TTAG_GPOS, &gpostags, &gpos_count) != FT_Err_Ok)
- gpos_count = 0;
- if (GetScriptTags(face, TTAG_GSUB, &gsubtags, &gsub_count) != FT_Err_Ok)
- gsub_count = 0;
-
+ gpos_count = GetScriptTags(face, TTAG_GPOS, &gpostags);
+ gsub_count = GetScriptTags(face, TTAG_GSUB, &gsubtags);
+
if (!issilgraphitefont && !gsub_count && !gpos_count)
goto bail;
maxsize = (((FT_ULong) gpos_count + (FT_ULong) gsub_count) * OTLAYOUT_LEN +
(issilgraphitefont ? 13 : 0));
if (!issilgraphitefont && !gsub_count && !gpos_count)
goto bail;
maxsize = (((FT_ULong) gpos_count + (FT_ULong) gsub_count) * OTLAYOUT_LEN +
(issilgraphitefont ? 13 : 0));