parent
c8f9cf37d3
commit
e1bbc017ce
|
@ -4,11 +4,11 @@
|
||||||
/* */
|
/* */
|
||||||
/* OpenType error ID definitions (specification only). */
|
/* OpenType error ID definitions (specification only). */
|
||||||
/* */
|
/* */
|
||||||
/* Copyright 1996-1999 by */
|
/* Copyright 1996-2000 by */
|
||||||
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
|
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
|
||||||
/* */
|
/* */
|
||||||
/* This file is part of the FreeType project, and may only be used */
|
/* This file is part of the FreeType project, and may only be used, */
|
||||||
/* modified and distributed under the terms of the FreeType project */
|
/* modified, and distributed under the terms of the FreeType project */
|
||||||
/* license, LICENSE.TXT. By continuing to use, modify, or distribute */
|
/* license, LICENSE.TXT. By continuing to use, modify, or distribute */
|
||||||
/* this file you indicate that you have read the license and */
|
/* this file you indicate that you have read the license and */
|
||||||
/* understand and accept it fully. */
|
/* understand and accept it fully. */
|
||||||
|
@ -19,6 +19,7 @@
|
||||||
#ifndef T2ERRORS_H
|
#ifndef T2ERRORS_H
|
||||||
#define T2ERRORS_H
|
#define T2ERRORS_H
|
||||||
|
|
||||||
|
|
||||||
/*************************************************************************/
|
/*************************************************************************/
|
||||||
/* */
|
/* */
|
||||||
/* Error codes declaration */
|
/* Error codes declaration */
|
||||||
|
@ -113,7 +114,8 @@
|
||||||
|
|
||||||
#define T2_Err_Could_Not_Find_Context 0x550
|
#define T2_Err_Could_Not_Find_Context 0x550
|
||||||
|
|
||||||
#endif /* FTERRID_H */
|
|
||||||
|
#endif /* T2ERRORS_H */
|
||||||
|
|
||||||
|
|
||||||
/* END */
|
/* END */
|
||||||
|
|
|
@ -5,14 +5,11 @@
|
||||||
/* Basic OpenType/CFF type definitions and interface (specification */
|
/* Basic OpenType/CFF type definitions and interface (specification */
|
||||||
/* only). */
|
/* only). */
|
||||||
/* */
|
/* */
|
||||||
/* This code is used by the OpenType/CFF driver. */
|
|
||||||
/* */
|
|
||||||
/* */
|
|
||||||
/* Copyright 1996-2000 by */
|
/* Copyright 1996-2000 by */
|
||||||
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
|
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
|
||||||
/* */
|
/* */
|
||||||
/* This file is part of the FreeType project, and may only be used */
|
/* This file is part of the FreeType project, and may only be used, */
|
||||||
/* modified and distributed under the terms of the FreeType project */
|
/* modified, and distributed under the terms of the FreeType project */
|
||||||
/* license, LICENSE.TXT. By continuing to use, modify, or distribute */
|
/* license, LICENSE.TXT. By continuing to use, modify, or distribute */
|
||||||
/* this file you indicate that you have read the license and */
|
/* this file you indicate that you have read the license and */
|
||||||
/* understand and accept it fully. */
|
/* understand and accept it fully. */
|
||||||
|
@ -27,24 +24,28 @@
|
||||||
#include <freetype/freetype.h>
|
#include <freetype/freetype.h>
|
||||||
|
|
||||||
|
|
||||||
/*************************************************************************
|
/*************************************************************************/
|
||||||
*
|
/* */
|
||||||
* <Struct>
|
/* <Struct> */
|
||||||
* CFF_Index
|
/* CFF_Index */
|
||||||
*
|
/* */
|
||||||
* <Description>
|
/* <Description> */
|
||||||
* A structure used to model a CFF Index table
|
/* A structure used to model a CFF Index table. */
|
||||||
*
|
/* */
|
||||||
* <Fields>
|
/* <Fields> */
|
||||||
* count :: number of elements in index
|
/* stream :: XXX */
|
||||||
* off_size :: size in bytes of object offsets in index
|
/* */
|
||||||
* data_offset :: position of first data byte in the index's bytes
|
/* count :: The number of elements in the index. */
|
||||||
*
|
/* */
|
||||||
* total_size :: total_size of index in bytes
|
/* off_size :: The size in bytes of object offsets in index. */
|
||||||
* bytes :: when the index is loaded in memory, its bytes
|
/* */
|
||||||
* file_offset :: position of index in file. The offset table starts
|
/* data_offset :: The position of first data byte in the index's */
|
||||||
* at file_offset + 3
|
/* bytes. */
|
||||||
*/
|
/* */
|
||||||
|
/* offsets :: XXX */
|
||||||
|
/* */
|
||||||
|
/* bytes :: If the index is loaded in memory, its bytes. */
|
||||||
|
/* */
|
||||||
typedef struct CFF_Index_
|
typedef struct CFF_Index_
|
||||||
{
|
{
|
||||||
FT_Stream stream;
|
FT_Stream stream;
|
||||||
|
@ -86,7 +87,7 @@
|
||||||
FT_UInt base_font_name;
|
FT_UInt base_font_name;
|
||||||
FT_UInt postscript;
|
FT_UInt postscript;
|
||||||
|
|
||||||
/* these should only be used for the top-level font dict */
|
/* these should only be used for the top-level font dictionary */
|
||||||
FT_UInt cid_registry;
|
FT_UInt cid_registry;
|
||||||
FT_UInt cid_ordering;
|
FT_UInt cid_ordering;
|
||||||
FT_ULong cid_supplement;
|
FT_ULong cid_supplement;
|
||||||
|
@ -103,7 +104,6 @@
|
||||||
} CFF_Font_Dict;
|
} CFF_Font_Dict;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
typedef struct CFF_Private_
|
typedef struct CFF_Private_
|
||||||
{
|
{
|
||||||
FT_Byte num_blue_values;
|
FT_Byte num_blue_values;
|
||||||
|
@ -144,7 +144,7 @@
|
||||||
FT_Byte format;
|
FT_Byte format;
|
||||||
FT_UInt range_count;
|
FT_UInt range_count;
|
||||||
|
|
||||||
/* that's the table, taken from the file 'as is' */
|
/* that's the table, taken from the file `as is' */
|
||||||
FT_Byte* data;
|
FT_Byte* data;
|
||||||
FT_UInt data_size;
|
FT_UInt data_size;
|
||||||
|
|
||||||
|
@ -156,9 +156,8 @@
|
||||||
} CFF_FD_Select;
|
} CFF_FD_Select;
|
||||||
|
|
||||||
|
|
||||||
|
/* A SubFont packs a font dict and a private dict together. They are */
|
||||||
/* a SubFont packs a font dict and a private dict together. They're */
|
/* needed to support CID-keyed CFF fonts. */
|
||||||
/* needed to support CID-keyde CFF fonts.. */
|
|
||||||
typedef struct CFF_SubFont_
|
typedef struct CFF_SubFont_
|
||||||
{
|
{
|
||||||
CFF_Font_Dict font_dict;
|
CFF_Font_Dict font_dict;
|
||||||
|
@ -174,6 +173,7 @@
|
||||||
/* maximum number of sub-fonts in a CID-keyed file */
|
/* maximum number of sub-fonts in a CID-keyed file */
|
||||||
#define CFF_MAX_CID_FONTS 16
|
#define CFF_MAX_CID_FONTS 16
|
||||||
|
|
||||||
|
|
||||||
typedef struct CFF_Font_
|
typedef struct CFF_Font_
|
||||||
{
|
{
|
||||||
FT_Stream stream;
|
FT_Stream stream;
|
||||||
|
@ -205,7 +205,7 @@
|
||||||
|
|
||||||
CFF_SubFont top_font;
|
CFF_SubFont top_font;
|
||||||
FT_UInt num_subfonts;
|
FT_UInt num_subfonts;
|
||||||
CFF_SubFont* subfonts[ CFF_MAX_CID_FONTS ];
|
CFF_SubFont* subfonts[CFF_MAX_CID_FONTS];
|
||||||
|
|
||||||
CFF_FD_Select fd_select;
|
CFF_FD_Select fd_select;
|
||||||
|
|
||||||
|
|
|
@ -7,8 +7,8 @@
|
||||||
/* Copyright 1996-2000 by */
|
/* Copyright 1996-2000 by */
|
||||||
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
|
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
|
||||||
/* */
|
/* */
|
||||||
/* This file is part of the FreeType project, and may only be used */
|
/* This file is part of the FreeType project, and may only be used, */
|
||||||
/* modified and distributed under the terms of the FreeType project */
|
/* modified, and distributed under the terms of the FreeType project */
|
||||||
/* license, LICENSE.TXT. By continuing to use, modify, or distribute */
|
/* license, LICENSE.TXT. By continuing to use, modify, or distribute */
|
||||||
/* this file you indicate that you have read the license and */
|
/* this file you indicate that you have read the license and */
|
||||||
/* understand and accept it fully. */
|
/* understand and accept it fully. */
|
||||||
|
@ -114,7 +114,8 @@
|
||||||
|
|
||||||
#define TT_Err_Could_Not_Find_Context 0x450
|
#define TT_Err_Could_Not_Find_Context 0x450
|
||||||
|
|
||||||
#endif /* FTERRID_H */
|
|
||||||
|
#endif /* TTERRORS_H */
|
||||||
|
|
||||||
|
|
||||||
/* END */
|
/* END */
|
||||||
|
|
|
@ -5,14 +5,11 @@
|
||||||
/* Basic SFNT/TrueType type definitions and interface (specification */
|
/* Basic SFNT/TrueType type definitions and interface (specification */
|
||||||
/* only). */
|
/* only). */
|
||||||
/* */
|
/* */
|
||||||
/* This code is shared by all TrueType and OpenType drivers. */
|
|
||||||
/* */
|
|
||||||
/* */
|
|
||||||
/* Copyright 1996-2000 by */
|
/* Copyright 1996-2000 by */
|
||||||
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
|
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
|
||||||
/* */
|
/* */
|
||||||
/* This file is part of the FreeType project, and may only be used */
|
/* This file is part of the FreeType project, and may only be used, */
|
||||||
/* modified and distributed under the terms of the FreeType project */
|
/* modified, and distributed under the terms of the FreeType project */
|
||||||
/* license, LICENSE.TXT. By continuing to use, modify, or distribute */
|
/* license, LICENSE.TXT. By continuing to use, modify, or distribute */
|
||||||
/* this file you indicate that you have read the license and */
|
/* this file you indicate that you have read the license and */
|
||||||
/* understand and accept it fully. */
|
/* understand and accept it fully. */
|
||||||
|
@ -51,19 +48,22 @@
|
||||||
/* */
|
/* */
|
||||||
/* <Fields> */
|
/* <Fields> */
|
||||||
/* tag :: Must be `ttc ' to indicate a TrueType collection. */
|
/* tag :: Must be `ttc ' to indicate a TrueType collection. */
|
||||||
|
/* */
|
||||||
/* version :: The version number. */
|
/* version :: The version number. */
|
||||||
|
/* */
|
||||||
/* count :: The number of faces in the collection. The */
|
/* count :: The number of faces in the collection. The */
|
||||||
/* specification says this should be an unsigned long, but */
|
/* specification says this should be an unsigned long, but */
|
||||||
/* we use a signed long since we need the value -1 for */
|
/* we use a signed long since we need the value -1 for */
|
||||||
/* specific purposes. */
|
/* specific purposes. */
|
||||||
|
/* */
|
||||||
/* offsets :: The offsets of the font headers, one per face. */
|
/* offsets :: The offsets of the font headers, one per face. */
|
||||||
/* */
|
/* */
|
||||||
typedef struct TTC_Header_
|
typedef struct TTC_Header_
|
||||||
{
|
{
|
||||||
FT_ULong Tag;
|
FT_ULong tag;
|
||||||
FT_Fixed version;
|
FT_Fixed version;
|
||||||
FT_Long DirCount;
|
FT_Long count;
|
||||||
FT_ULong* TableDirectory;
|
FT_ULong* offsets;
|
||||||
|
|
||||||
} TTC_Header;
|
} TTC_Header;
|
||||||
|
|
||||||
|
@ -77,11 +77,15 @@
|
||||||
/* SFNT file format header. */
|
/* SFNT file format header. */
|
||||||
/* */
|
/* */
|
||||||
/* <Fields> */
|
/* <Fields> */
|
||||||
/* format_tag :: font format tag.. */
|
/* format_tag :: The font format tag. */
|
||||||
/* num_tables :: number of tables in file */
|
/* */
|
||||||
/* search_range :: must be 16*(max power of 2 <= num_tables) */
|
/* num_tables :: The number of tables in file. */
|
||||||
/* entry_selector :: log2 of search_range/16 */
|
/* */
|
||||||
/* range_shift :: must be num_tables*16 - search_range */
|
/* search_range :: Must be 16*(max power of 2 <= num_tables). */
|
||||||
|
/* */
|
||||||
|
/* entry_selector :: Must be log2 of search_range/16. */
|
||||||
|
/* */
|
||||||
|
/* range_shift :: Must be num_tables*16 - search_range. */
|
||||||
/* */
|
/* */
|
||||||
typedef struct SFNT_Header_
|
typedef struct SFNT_Header_
|
||||||
{
|
{
|
||||||
|
@ -93,6 +97,7 @@
|
||||||
|
|
||||||
} SFNT_Header;
|
} SFNT_Header;
|
||||||
|
|
||||||
|
|
||||||
/*************************************************************************/
|
/*************************************************************************/
|
||||||
/* */
|
/* */
|
||||||
/* <Struct> */
|
/* <Struct> */
|
||||||
|
@ -104,10 +109,13 @@
|
||||||
/* */
|
/* */
|
||||||
/* <Fields> */
|
/* <Fields> */
|
||||||
/* version :: The version number; starts with 0x00010000. */
|
/* version :: The version number; starts with 0x00010000. */
|
||||||
|
/* */
|
||||||
/* numTables :: The number of tables. */
|
/* numTables :: The number of tables. */
|
||||||
/* */
|
/* */
|
||||||
/* searchRange :: Unused. */
|
/* searchRange :: Unused. */
|
||||||
|
/* */
|
||||||
/* entrySelector :: Unused. */
|
/* entrySelector :: Unused. */
|
||||||
|
/* */
|
||||||
/* rangeShift :: Unused. */
|
/* rangeShift :: Unused. */
|
||||||
/* */
|
/* */
|
||||||
/* <Note> */
|
/* <Note> */
|
||||||
|
@ -135,9 +143,12 @@
|
||||||
/* */
|
/* */
|
||||||
/* <Fields> */
|
/* <Fields> */
|
||||||
/* Tag :: A four-bytes tag describing the table. */
|
/* Tag :: A four-bytes tag describing the table. */
|
||||||
|
/* */
|
||||||
/* CheckSum :: The table checksum. This value can be ignored. */
|
/* CheckSum :: The table checksum. This value can be ignored. */
|
||||||
|
/* */
|
||||||
/* Offset :: The offset of the table from the start of the TrueType */
|
/* Offset :: The offset of the table from the start of the TrueType */
|
||||||
/* font in its resource. */
|
/* font in its resource. */
|
||||||
|
/* */
|
||||||
/* Length :: The table length (in bytes). */
|
/* Length :: The table length (in bytes). */
|
||||||
/* */
|
/* */
|
||||||
typedef struct TT_Table_
|
typedef struct TT_Table_
|
||||||
|
@ -161,6 +172,7 @@
|
||||||
/* */
|
/* */
|
||||||
/* <Fields> */
|
/* <Fields> */
|
||||||
/* tableVersionNumber :: The version number. */
|
/* tableVersionNumber :: The version number. */
|
||||||
|
/* */
|
||||||
/* numCMaps :: The number of charmaps in the font. */
|
/* numCMaps :: The number of charmaps in the font. */
|
||||||
/* */
|
/* */
|
||||||
/* <Note> */
|
/* <Note> */
|
||||||
|
@ -215,6 +227,7 @@
|
||||||
/* */
|
/* */
|
||||||
/* <Fields> */
|
/* <Fields> */
|
||||||
/* advance :: The advance width or height for the glyph. */
|
/* advance :: The advance width or height for the glyph. */
|
||||||
|
/* */
|
||||||
/* bearing :: The left-side or top-side bearing for the glyph. */
|
/* bearing :: The left-side or top-side bearing for the glyph. */
|
||||||
/* */
|
/* */
|
||||||
typedef struct TT_LongMetrics_
|
typedef struct TT_LongMetrics_
|
||||||
|
@ -362,7 +375,9 @@
|
||||||
/* */
|
/* */
|
||||||
/* <Fields> */
|
/* <Fields> */
|
||||||
/* version :: The version number. */
|
/* version :: The version number. */
|
||||||
|
/* */
|
||||||
/* numRanges :: The number of gasp ranges in table. */
|
/* numRanges :: The number of gasp ranges in table. */
|
||||||
|
/* */
|
||||||
/* gaspRanges :: An array of gasp ranges. */
|
/* gaspRanges :: An array of gasp ranges. */
|
||||||
/* */
|
/* */
|
||||||
typedef struct TT_Gasp_
|
typedef struct TT_Gasp_
|
||||||
|
@ -381,7 +396,7 @@
|
||||||
/* */
|
/* */
|
||||||
/* <Description> */
|
/* <Description> */
|
||||||
/* A small structure used to model the pre-computed widths of a given */
|
/* A small structure used to model the pre-computed widths of a given */
|
||||||
/* size. They're found in the `hdmx' table. */
|
/* size. They are found in the `hdmx' table. */
|
||||||
/* */
|
/* */
|
||||||
/* <Fields> */
|
/* <Fields> */
|
||||||
/* ppem :: The pixels per EM value at which these metrics apply. */
|
/* ppem :: The pixels per EM value at which these metrics apply. */
|
||||||
|
@ -402,7 +417,7 @@
|
||||||
/*************************************************************************/
|
/*************************************************************************/
|
||||||
/* */
|
/* */
|
||||||
/* <Struct> */
|
/* <Struct> */
|
||||||
/* TT_HdmxRec */
|
/* TT_Hdmx */
|
||||||
/* */
|
/* */
|
||||||
/* <Description> */
|
/* <Description> */
|
||||||
/* A structure used to model the `hdmx' table, which contains */
|
/* A structure used to model the `hdmx' table, which contains */
|
||||||
|
@ -410,7 +425,9 @@
|
||||||
/* */
|
/* */
|
||||||
/* <Fields> */
|
/* <Fields> */
|
||||||
/* version :: The version number. */
|
/* version :: The version number. */
|
||||||
|
/* */
|
||||||
/* num_records :: The number of hdmx records. */
|
/* num_records :: The number of hdmx records. */
|
||||||
|
/* */
|
||||||
/* records :: An array of hdmx records. */
|
/* records :: An array of hdmx records. */
|
||||||
/* */
|
/* */
|
||||||
typedef struct TT_Hdmx_
|
typedef struct TT_Hdmx_
|
||||||
|
@ -434,7 +451,9 @@
|
||||||
/* */
|
/* */
|
||||||
/* <Fields> */
|
/* <Fields> */
|
||||||
/* left :: The index of the left glyph in pair. */
|
/* left :: The index of the left glyph in pair. */
|
||||||
|
/* */
|
||||||
/* right :: The index of the right glyph in pair. */
|
/* right :: The index of the right glyph in pair. */
|
||||||
|
/* */
|
||||||
/* value :: The kerning distance. A positive value spaces the */
|
/* value :: The kerning distance. A positive value spaces the */
|
||||||
/* glyphs, a negative one makes them closer. */
|
/* glyphs, a negative one makes them closer. */
|
||||||
/* */
|
/* */
|
||||||
|
@ -446,6 +465,7 @@
|
||||||
|
|
||||||
} TT_Kern_0_Pair;
|
} TT_Kern_0_Pair;
|
||||||
|
|
||||||
|
|
||||||
/*************************************************************************/
|
/*************************************************************************/
|
||||||
/*************************************************************************/
|
/*************************************************************************/
|
||||||
/*************************************************************************/
|
/*************************************************************************/
|
||||||
|
@ -458,6 +478,7 @@
|
||||||
/*************************************************************************/
|
/*************************************************************************/
|
||||||
/*************************************************************************/
|
/*************************************************************************/
|
||||||
|
|
||||||
|
|
||||||
/*************************************************************************/
|
/*************************************************************************/
|
||||||
/* */
|
/* */
|
||||||
/* <Struct> */
|
/* <Struct> */
|
||||||
|
@ -582,6 +603,9 @@
|
||||||
/* */
|
/* */
|
||||||
/* vertBearingX - width */
|
/* vertBearingX - width */
|
||||||
/* */
|
/* */
|
||||||
|
/* pads :: Unused (to make the size of the record */
|
||||||
|
/* a multiple of 32 bits. */
|
||||||
|
/* */
|
||||||
typedef struct TT_SBit_Line_Metrics_
|
typedef struct TT_SBit_Line_Metrics_
|
||||||
{
|
{
|
||||||
FT_Char ascender;
|
FT_Char ascender;
|
||||||
|
@ -723,7 +747,9 @@
|
||||||
/* */
|
/* */
|
||||||
/* <Fields> */
|
/* <Fields> */
|
||||||
/* glyph_code :: The element's glyph index. */
|
/* glyph_code :: The element's glyph index. */
|
||||||
|
/* */
|
||||||
/* x_offset :: The element's left bearing. */
|
/* x_offset :: The element's left bearing. */
|
||||||
|
/* */
|
||||||
/* y_offset :: The element's top bearing. */
|
/* y_offset :: The element's top bearing. */
|
||||||
/* */
|
/* */
|
||||||
typedef struct TT_SBit_Component_
|
typedef struct TT_SBit_Component_
|
||||||
|
@ -771,6 +797,7 @@
|
||||||
|
|
||||||
} TT_SBit_Scale;
|
} TT_SBit_Scale;
|
||||||
|
|
||||||
|
|
||||||
/*************************************************************************/
|
/*************************************************************************/
|
||||||
/*************************************************************************/
|
/*************************************************************************/
|
||||||
/*************************************************************************/
|
/*************************************************************************/
|
||||||
|
@ -783,6 +810,7 @@
|
||||||
/*************************************************************************/
|
/*************************************************************************/
|
||||||
/*************************************************************************/
|
/*************************************************************************/
|
||||||
|
|
||||||
|
|
||||||
/*************************************************************************/
|
/*************************************************************************/
|
||||||
/* */
|
/* */
|
||||||
/* <Struct> */
|
/* <Struct> */
|
||||||
|
@ -862,6 +890,7 @@
|
||||||
|
|
||||||
} TT_Post_Names;
|
} TT_Post_Names;
|
||||||
|
|
||||||
|
|
||||||
/*************************************************************************/
|
/*************************************************************************/
|
||||||
/*************************************************************************/
|
/*************************************************************************/
|
||||||
/*************************************************************************/
|
/*************************************************************************/
|
||||||
|
@ -874,7 +903,9 @@
|
||||||
/*************************************************************************/
|
/*************************************************************************/
|
||||||
/*************************************************************************/
|
/*************************************************************************/
|
||||||
|
|
||||||
|
|
||||||
/* format 0 */
|
/* format 0 */
|
||||||
|
|
||||||
typedef struct TT_CMap0_
|
typedef struct TT_CMap0_
|
||||||
{
|
{
|
||||||
FT_Byte* glyphIdArray;
|
FT_Byte* glyphIdArray;
|
||||||
|
@ -883,6 +914,7 @@
|
||||||
|
|
||||||
|
|
||||||
/* format 2 */
|
/* format 2 */
|
||||||
|
|
||||||
typedef struct TT_CMap2SubHeader_
|
typedef struct TT_CMap2SubHeader_
|
||||||
{
|
{
|
||||||
FT_UShort firstCode; /* first valid low byte */
|
FT_UShort firstCode; /* first valid low byte */
|
||||||
|
@ -907,6 +939,7 @@
|
||||||
|
|
||||||
|
|
||||||
/* format 4 */
|
/* format 4 */
|
||||||
|
|
||||||
typedef struct TT_CMap4Segment_
|
typedef struct TT_CMap4Segment_
|
||||||
{
|
{
|
||||||
FT_UShort endCount;
|
FT_UShort endCount;
|
||||||
|
@ -928,12 +961,13 @@
|
||||||
FT_UShort* glyphIdArray;
|
FT_UShort* glyphIdArray;
|
||||||
FT_UShort numGlyphId; /* control value */
|
FT_UShort numGlyphId; /* control value */
|
||||||
|
|
||||||
TT_CMap4Segment* last_segment; /* last used segment, this is a small */
|
TT_CMap4Segment* last_segment; /* last used segment; this is a small */
|
||||||
/* cache to potentially increase speed */
|
/* cache to potentially increase speed */
|
||||||
} TT_CMap4;
|
} TT_CMap4;
|
||||||
|
|
||||||
|
|
||||||
/* format 6 */
|
/* format 6 */
|
||||||
|
|
||||||
typedef struct TT_CMap6_
|
typedef struct TT_CMap6_
|
||||||
{
|
{
|
||||||
FT_UShort firstCode; /* first character code of subrange */
|
FT_UShort firstCode; /* first character code of subrange */
|
||||||
|
@ -943,12 +977,15 @@
|
||||||
|
|
||||||
} TT_CMap6;
|
} TT_CMap6;
|
||||||
|
|
||||||
|
|
||||||
typedef struct TT_CMapTable_ TT_CMapTable;
|
typedef struct TT_CMapTable_ TT_CMapTable;
|
||||||
|
|
||||||
|
|
||||||
typedef
|
typedef
|
||||||
FT_UInt (*TT_CharMap_Func)( TT_CMapTable* charmap,
|
FT_UInt (*TT_CharMap_Func)( TT_CMapTable* charmap,
|
||||||
FT_ULong char_code );
|
FT_ULong char_code );
|
||||||
|
|
||||||
|
|
||||||
/* charmap table */
|
/* charmap table */
|
||||||
struct TT_CMapTable_
|
struct TT_CMapTable_
|
||||||
{
|
{
|
||||||
|
@ -983,6 +1020,7 @@
|
||||||
/* */
|
/* */
|
||||||
/* <Fields> */
|
/* <Fields> */
|
||||||
/* root :: The parent character map structure. */
|
/* root :: The parent character map structure. */
|
||||||
|
/* */
|
||||||
/* cmap :: The used character map. */
|
/* cmap :: The used character map. */
|
||||||
/* */
|
/* */
|
||||||
typedef struct TT_CharMapRec_
|
typedef struct TT_CharMapRec_
|
||||||
|
@ -1011,12 +1049,13 @@
|
||||||
/* This structure/class is defined here because it is common to the */
|
/* This structure/class is defined here because it is common to the */
|
||||||
/* following formats: TTF, OpenType-TT, and OpenType-CFF. */
|
/* following formats: TTF, OpenType-TT, and OpenType-CFF. */
|
||||||
/* */
|
/* */
|
||||||
/* Note however that the classes TT_Size, TT_GlyphSlot, and TT_CharMap */
|
/* Note, however, that the classes TT_Size, TT_GlyphSlot, and TT_CharMap */
|
||||||
/* are not shared between font drivers, and are thus defined normally in */
|
/* are not shared between font drivers, and are thus defined normally in */
|
||||||
/* `drivers/truetype/ttobjs.h'. */
|
/* `ttobjs.h'. */
|
||||||
/* */
|
/* */
|
||||||
/*************************************************************************/
|
/*************************************************************************/
|
||||||
|
|
||||||
|
|
||||||
/*************************************************************************/
|
/*************************************************************************/
|
||||||
/* */
|
/* */
|
||||||
/* <Type> */
|
/* <Type> */
|
||||||
|
@ -1051,6 +1090,7 @@
|
||||||
/* forward declaration */
|
/* forward declaration */
|
||||||
typedef struct TT_Loader_ TT_Loader;
|
typedef struct TT_Loader_ TT_Loader;
|
||||||
|
|
||||||
|
|
||||||
/*************************************************************************/
|
/*************************************************************************/
|
||||||
/* */
|
/* */
|
||||||
/* <FuncType> */
|
/* <FuncType> */
|
||||||
|
@ -1061,47 +1101,55 @@
|
||||||
/* */
|
/* */
|
||||||
/* <Input> */
|
/* <Input> */
|
||||||
/* face :: A handle to the target face object. */
|
/* face :: A handle to the target face object. */
|
||||||
/* tag :: a 4-byte tag used to name the table */
|
/* */
|
||||||
|
/* tag :: A 4-byte tag used to name the table. */
|
||||||
|
/* */
|
||||||
/* stream :: The input stream. */
|
/* stream :: The input stream. */
|
||||||
/* */
|
/* */
|
||||||
/* <Output> */
|
/* <Output> */
|
||||||
/* length :: length of table in bytes. Set to 0 when not needed */
|
/* length :: The length of the table in bytes. Set to 0 if not */
|
||||||
|
/* needed. */
|
||||||
/* */
|
/* */
|
||||||
/* <Return> */
|
/* <Return> */
|
||||||
/* TrueType error code. 0 means success. */
|
/* FreeType error code. 0 means success. */
|
||||||
/* */
|
/* */
|
||||||
/* <Note> */
|
/* <Note> */
|
||||||
/* The stream cursor must be at the font file's origin */
|
/* The stream cursor must be at the font file's origin. */
|
||||||
/* */
|
/* */
|
||||||
typedef
|
typedef
|
||||||
FT_Error (*TT_Goto_Table_Func)( TT_Face face,
|
FT_Error (*TT_Goto_Table_Func)( TT_Face face,
|
||||||
FT_ULong tag,
|
FT_ULong tag,
|
||||||
FT_Stream stream,
|
FT_Stream stream,
|
||||||
FT_ULong *length );
|
FT_ULong* length );
|
||||||
|
|
||||||
|
|
||||||
/*************************************************************************/
|
/*************************************************************************/
|
||||||
/* */
|
/* */
|
||||||
/* <FuncType> */
|
/* <FuncType> */
|
||||||
/* TT_Access_Glyph_Frame */
|
/* TT_Access_Glyph_Frame_Func */
|
||||||
/* */
|
/* */
|
||||||
/* <Description> */
|
/* <Description> */
|
||||||
/* Seeks a stream to the start of a given glyph element, and */
|
/* Seeks a stream to the start of a given glyph element, and opens a */
|
||||||
/* opens a frame for it.. */
|
/* frame for it. */
|
||||||
/* */
|
/* */
|
||||||
/* <Input> */
|
/* <Input> */
|
||||||
/* loader :: the current TrueType glyph loader object */
|
/* loader :: The current TrueType glyph loader object. */
|
||||||
/* glyph index :: index of glyph to access */
|
/* */
|
||||||
/* offset :: offset of glyph according to locations table */
|
/* glyph index :: The index of the glyph to access. */
|
||||||
/* byte_count :: size of frame in bytes */
|
/* */
|
||||||
|
/* offset :: The offset of the glyph according to the */
|
||||||
|
/* `locations' table. */
|
||||||
|
/* */
|
||||||
|
/* byte_count :: The size of the frame in bytes. */
|
||||||
/* */
|
/* */
|
||||||
/* <Return> */
|
/* <Return> */
|
||||||
/* TrueType error code. 0 means success. */
|
/* FreeType error code. 0 means success. */
|
||||||
/* */
|
/* */
|
||||||
/* <Note> */
|
/* <Note> */
|
||||||
/* This function is normally equivalent to FILE_Seek(offset) */
|
/* This function is normally equivalent to FILE_Seek(offset) */
|
||||||
/* followed by ACCESS_Frame(byte_count) with the loader's stream */
|
/* followed by ACCESS_Frame(byte_count) with the loader's stream, but */
|
||||||
/* but alternative formats (compressed ones) might use something */
|
/* alternative formats (e.g. compressed ones) might use something */
|
||||||
/* different.. */
|
/* different. */
|
||||||
/* */
|
/* */
|
||||||
typedef
|
typedef
|
||||||
FT_Error (*TT_Access_Glyph_Frame_Func)( TT_Loader* loader,
|
FT_Error (*TT_Access_Glyph_Frame_Func)( TT_Loader* loader,
|
||||||
|
@ -1109,34 +1157,36 @@
|
||||||
FT_ULong offset,
|
FT_ULong offset,
|
||||||
FT_UInt byte_count );
|
FT_UInt byte_count );
|
||||||
|
|
||||||
/*************************************************************************/
|
|
||||||
/* */
|
|
||||||
/* <FuncType> */
|
|
||||||
/* TT_Load_Glyph_Element */
|
|
||||||
/* */
|
|
||||||
/* <Description> */
|
|
||||||
/* Reads one glyph element (its header, a simple glyph, or a */
|
|
||||||
/* composite) from the loader's current stream frame.. */
|
|
||||||
/* */
|
|
||||||
/* <Input> */
|
|
||||||
/* loader :: the current TrueType glyph loader object */
|
|
||||||
/* */
|
|
||||||
/* <Return> */
|
|
||||||
/* TrueType error code. 0 means success. */
|
|
||||||
/* */
|
|
||||||
typedef
|
|
||||||
FT_Error (*TT_Load_Glyph_Element_Func)( TT_Loader* loader );
|
|
||||||
|
|
||||||
/*************************************************************************/
|
/*************************************************************************/
|
||||||
/* */
|
/* */
|
||||||
/* <FuncType> */
|
/* <FuncType> */
|
||||||
/* TT_Forget_Frame_Element */
|
/* TT_Load_Glyph_Element_Func */
|
||||||
/* */
|
/* */
|
||||||
/* <Description> */
|
/* <Description> */
|
||||||
/* Closes the current loader stream frame for the glyph.. */
|
/* Reads one glyph element (its header, a simple glyph, or a */
|
||||||
|
/* composite) from the loader's current stream frame. */
|
||||||
/* */
|
/* */
|
||||||
/* <Input> */
|
/* <Input> */
|
||||||
/* loader :: the current TrueType glyph loader object */
|
/* loader :: The current TrueType glyph loader object. */
|
||||||
|
/* */
|
||||||
|
/* <Return> */
|
||||||
|
/* FreeType error code. 0 means success. */
|
||||||
|
/* */
|
||||||
|
typedef
|
||||||
|
FT_Error (*TT_Load_Glyph_Element_Func)( TT_Loader* loader );
|
||||||
|
|
||||||
|
|
||||||
|
/*************************************************************************/
|
||||||
|
/* */
|
||||||
|
/* <FuncType> */
|
||||||
|
/* TT_Forget_Glyph_Frame_Func */
|
||||||
|
/* */
|
||||||
|
/* <Description> */
|
||||||
|
/* Closes the current loader stream frame for the glyph. */
|
||||||
|
/* */
|
||||||
|
/* <Input> */
|
||||||
|
/* loader :: The current TrueType glyph loader object. */
|
||||||
/* */
|
/* */
|
||||||
typedef
|
typedef
|
||||||
void (*TT_Forget_Glyph_Frame_Func)( TT_Loader* loader );
|
void (*TT_Forget_Glyph_Frame_Func)( TT_Loader* loader );
|
||||||
|
@ -1158,10 +1208,12 @@
|
||||||
/* root :: The base FT_Face structure, managed by the */
|
/* root :: The base FT_Face structure, managed by the */
|
||||||
/* base layer. */
|
/* base layer. */
|
||||||
/* */
|
/* */
|
||||||
/* ttcHeader :: The TrueType collection header, used when the */
|
/* ttc_header :: The TrueType collection header, used when */
|
||||||
/* file is a `ttc' rather than a `ttf'. For */
|
/* the file is a `ttc' rather than a `ttf'. */
|
||||||
/* ordinary font files, the field */
|
/* For ordinary font files, the field */
|
||||||
/* `ttcHeader.DirCount' is set to 0. */
|
/* `ttc_header.count' is set to 0. */
|
||||||
|
/* */
|
||||||
|
/* format_tag :: The font format tag. */
|
||||||
/* */
|
/* */
|
||||||
/* num_tables :: The number of TrueType tables in this font */
|
/* num_tables :: The number of TrueType tables in this font */
|
||||||
/* file. */
|
/* file. */
|
||||||
|
@ -1169,26 +1221,28 @@
|
||||||
/* dir_tables :: The directory of TrueType tables for this */
|
/* dir_tables :: The directory of TrueType tables for this */
|
||||||
/* font file. */
|
/* font file. */
|
||||||
/* */
|
/* */
|
||||||
/* header :: The font's font header (`head' table). Read */
|
/* header :: The font's font header (`head' table). */
|
||||||
/* on font opening. */
|
/* Read on font opening. */
|
||||||
/* */
|
/* */
|
||||||
/* horizontal :: The font's horizontal header (`hhea' table). */
|
/* horizontal :: The font's horizontal header (`hhea' */
|
||||||
/* This field also contains the associated */
|
/* table). This field also contains the */
|
||||||
/* horizontal metrics table (`hmtx'). */
|
/* associated horizontal metrics table */
|
||||||
|
/* (`hmtx'). */
|
||||||
/* */
|
/* */
|
||||||
/* max_profile :: The font's maximum profile table. Read on */
|
/* max_profile :: The font's maximum profile table. Read on */
|
||||||
/* font opening. Note that some maximum values */
|
/* font opening. Note that some maximum */
|
||||||
/* cannot be taken directly from this table. We */
|
/* values cannot be taken directly from this */
|
||||||
/* thus define additional fields below to hold */
|
/* table. We thus define additional fields */
|
||||||
/* the computed maxima. */
|
/* below to hold the computed maxima. */
|
||||||
/* */
|
/* */
|
||||||
/* max_components :: The maximum number of glyph components */
|
/* max_components :: The maximum number of glyph components */
|
||||||
/* required to load any composite glyph from */
|
/* required to load any composite glyph from */
|
||||||
/* this font. Used to size the load stack. */
|
/* this font. Used to size the load stack. */
|
||||||
/* */
|
/* */
|
||||||
/* vertical_info :: A boolean which is set when the font file */
|
/* vertical_info :: A boolean which is set when the font file */
|
||||||
/* contains vertical metrics. If not, the value */
|
/* contains vertical metrics. If not, the */
|
||||||
/* of the `vertical' field is undefined. */
|
/* value of the `vertical' field is */
|
||||||
|
/* undefined. */
|
||||||
/* */
|
/* */
|
||||||
/* vertical :: The font's vertical header (`vhea' table). */
|
/* vertical :: The font's vertical header (`vhea' table). */
|
||||||
/* This field also contains the associated */
|
/* This field also contains the associated */
|
||||||
|
@ -1204,12 +1258,13 @@
|
||||||
/* */
|
/* */
|
||||||
/* os2 :: The font's OS/2 table (`OS/2'). */
|
/* os2 :: The font's OS/2 table (`OS/2'). */
|
||||||
/* */
|
/* */
|
||||||
/* postscript :: The font's PostScript table (`post' table). */
|
/* postscript :: The font's PostScript table (`post' */
|
||||||
/* The PostScript glyph names are not loaded by */
|
/* table). The PostScript glyph names are */
|
||||||
/* the driver on face opening. See the `ttpost' */
|
/* not loaded by the driver on face opening. */
|
||||||
/* module for more details. */
|
/* See the `ttpost' module for more details. */
|
||||||
/* */
|
/* */
|
||||||
/* num_charmaps :: The number of character mappings in the font. */
|
/* num_charmaps :: The number of character mappings in the */
|
||||||
|
/* font. */
|
||||||
/* */
|
/* */
|
||||||
/* charmaps :: The array of charmap objects for this font */
|
/* charmaps :: The array of charmap objects for this font */
|
||||||
/* file. Note that this field is a typeless */
|
/* file. Note that this field is a typeless */
|
||||||
|
@ -1217,22 +1272,38 @@
|
||||||
/* charmaps varies with the underlying font */
|
/* charmaps varies with the underlying font */
|
||||||
/* format and cannot be determined here. */
|
/* format and cannot be determined here. */
|
||||||
/* */
|
/* */
|
||||||
/* goto_face :: a function called by each TrueType table */
|
/* goto_table :: A function called by each TrueType table */
|
||||||
/* loader to position a stream's cursor to the */
|
/* loader to position a stream's cursor to */
|
||||||
/* start of a given table according to its tag. */
|
/* the start of a given table according to */
|
||||||
/* it defaults to TT_Goto_Face but can be */
|
/* its tag. It defaults to TT_Goto_Face but */
|
||||||
/* different for strange formats (e.g. Type 42) */
|
/* can be different for strange formats (e.g. */
|
||||||
|
/* Type 42). */
|
||||||
/* */
|
/* */
|
||||||
/* sfnt :: a pointer to the SFNT `driver' interface. */
|
/* access_glyph_frame :: XXX */
|
||||||
/* */
|
/* */
|
||||||
/* hdmx :: The face's horizontal device metrics (`hdmx' */
|
/* read_glyph_header :: XXX */
|
||||||
/* table). This table is optional in */
|
/* */
|
||||||
|
/* read_simple_glyph :: XXX */
|
||||||
|
/* */
|
||||||
|
/* read_composite_glyph :: XXX */
|
||||||
|
/* */
|
||||||
|
/* forget_glyph_frame :: XXX */
|
||||||
|
/* */
|
||||||
|
/* sfnt :: A pointer to the SFNT `driver' interface. */
|
||||||
|
/* */
|
||||||
|
/* psnames :: A pointer to the `PSNames' module */
|
||||||
|
/* interface. */
|
||||||
|
/* */
|
||||||
|
/* hdmx :: The face's horizontal device metrics */
|
||||||
|
/* (`hdmx' table). This table is optional in */
|
||||||
/* TrueType/OpenType fonts. */
|
/* TrueType/OpenType fonts. */
|
||||||
/* */
|
/* */
|
||||||
/* gasp :: The grid-fitting and scaling properties table */
|
/* gasp :: The grid-fitting and scaling properties */
|
||||||
/* (`gasp'). This table is optional in */
|
/* table (`gasp'). This table is optional in */
|
||||||
/* TrueType/OpenType fonts. */
|
/* TrueType/OpenType fonts. */
|
||||||
/* */
|
/* */
|
||||||
|
/* pclt :: XXX */
|
||||||
|
/* */
|
||||||
/* num_sbit_strikes :: The number of sbit strikes, i.e., bitmap */
|
/* num_sbit_strikes :: The number of sbit strikes, i.e., bitmap */
|
||||||
/* sizes, embedded in this font. */
|
/* sizes, embedded in this font. */
|
||||||
/* */
|
/* */
|
||||||
|
@ -1242,66 +1313,67 @@
|
||||||
/* */
|
/* */
|
||||||
/* num_sbit_scales :: The number of sbit scales for this font. */
|
/* num_sbit_scales :: The number of sbit scales for this font. */
|
||||||
/* */
|
/* */
|
||||||
/* sbit_scales :: Array of sbit scales embedded in this font. */
|
/* sbit_scales :: Array of sbit scales embedded in this */
|
||||||
/* This table is optional in a TrueType/OpenType */
|
/* font. This table is optional in a */
|
||||||
/* font. */
|
/* TrueType/OpenType font. */
|
||||||
/* */
|
/* */
|
||||||
/* postscript_names :: A table used to store the Postscript names of */
|
/* postscript_names :: A table used to store the Postscript names */
|
||||||
/* the glyphs for this font. See the file */
|
/* of the glyphs for this font. See the */
|
||||||
/* `ttconfig.h' for comments on the */
|
/* file `ttconfig.h' for comments on the */
|
||||||
/* TT_CONFIG_OPTION_POSTSCRIPT_NAMES option. */
|
/* TT_CONFIG_OPTION_POSTSCRIPT_NAMES option. */
|
||||||
/* */
|
/* */
|
||||||
/* num_locations :: The number of glyph locations in this */
|
/* num_locations :: The number of glyph locations in this */
|
||||||
/* TrueType file. This should be identical to */
|
/* TrueType file. This should be */
|
||||||
/* the number of glyphs. Ignored for Type 2 */
|
/* identical to the number of glyphs. */
|
||||||
/* fonts. */
|
/* Ignored for Type 2 fonts. */
|
||||||
/* */
|
/* */
|
||||||
/* glyph_locations :: An array of longs. These are offsets to */
|
/* glyph_locations :: An array of longs. These are offsets to */
|
||||||
/* glyph data within the `glyf' table. Ignored */
|
/* glyph data within the `glyf' table. */
|
||||||
/* for Type 2 font faces. */
|
/* Ignored for Type 2 font faces. */
|
||||||
/* */
|
/* */
|
||||||
/* font_program_size :: Size in bytecodes of the face's font program. */
|
/* font_program_size :: Size in bytecodes of the face's font */
|
||||||
/* 0 if none defined. Ignored for Type 2 fonts. */
|
/* program. 0 if none defined. Ignored for */
|
||||||
|
/* Type 2 fonts. */
|
||||||
/* */
|
/* */
|
||||||
/* font_program :: The face's font program (bytecode stream) */
|
/* font_program :: The face's font program (bytecode stream) */
|
||||||
/* executed at load time, also used during glyph */
|
/* executed at load time, also used during */
|
||||||
/* rendering. Comes from the `fpgm' table. */
|
/* glyph rendering. Comes from the `fpgm' */
|
||||||
/* Ignored for Type 2 font fonts. */
|
/* table. Ignored for Type 2 font fonts. */
|
||||||
/* */
|
/* */
|
||||||
/* cvt_program_size :: Size in bytecodes of the face's cvt program. */
|
/* cvt_program_size :: The size in bytecodes of the face's cvt */
|
||||||
/* Ignored for Type 2 fonts. */
|
/* program. Ignored for Type 2 fonts. */
|
||||||
/* */
|
/* */
|
||||||
/* cvt_program :: The face's cvt program (bytecode stream) */
|
/* cvt_program :: The face's cvt program (bytecode stream) */
|
||||||
/* executed each time an instance/size is */
|
/* executed each time an instance/size is */
|
||||||
/* changed/reset. Comes from the `prep' table. */
|
/* changed/reset. Comes from the `prep' */
|
||||||
/* Ignored for Type 2 fonts. */
|
/* table. Ignored for Type 2 fonts. */
|
||||||
/* */
|
/* */
|
||||||
/* cvt_size :: Size of the control value table (in entries). */
|
/* cvt_size :: Size of the control value table (in */
|
||||||
/* Ignored for Type 2 fonts. */
|
/* entries). Ignored for Type 2 fonts. */
|
||||||
/* */
|
/* */
|
||||||
/* cvt :: The face's original control value table. */
|
/* cvt :: The face's original control value table. */
|
||||||
/* Coordinates are expressed in unscaled font */
|
/* Coordinates are expressed in unscaled font */
|
||||||
/* units. Comes from the `cvt ` table. Ignored */
|
/* units. Comes from the `cvt ' table. */
|
||||||
/* for Type 2 fonts. */
|
/* Ignored for Type 2 fonts. */
|
||||||
/* */
|
/* */
|
||||||
/* num_kern_pairs :: The number of kerning pairs present in the */
|
/* num_kern_pairs :: The number of kerning pairs present in the */
|
||||||
/* font file. The engine only loads the first */
|
/* font file. The engine only loads the */
|
||||||
/* horizontal format 0 kern table it finds in */
|
/* first horizontal format 0 kern table it */
|
||||||
/* the font file. You should use the `ttxkern' */
|
/* finds in the font file. You should use */
|
||||||
/* structures if you want to access other */
|
/* the `ttxkern' structures if you want to */
|
||||||
/* kerning tables. Ignored for Type 2 fonts. */
|
/* access other kerning tables. Ignored */
|
||||||
/* */
|
|
||||||
/* kern_table_index :: The index of the kerning table in the font */
|
|
||||||
/* kerning directory. Only used by the ttxkern */
|
|
||||||
/* extension to avoid data duplication. Ignored */
|
|
||||||
/* for Type 2 fonts. */
|
/* for Type 2 fonts. */
|
||||||
/* */
|
/* */
|
||||||
/* kern_pairs :: Array of kerning pairs, if any. Ignored for */
|
/* kern_table_index :: The index of the kerning table in the font */
|
||||||
/* Type 2 fonts. */
|
/* kerning directory. Only used by the */
|
||||||
|
/* ttxkern extension to avoid data */
|
||||||
|
/* duplication. Ignored for Type 2 fonts. */
|
||||||
/* */
|
/* */
|
||||||
/* interpreter :: Pointer to the TrueType bytecode interpreter */
|
/* interpreter :: A pointer to the TrueType bytecode */
|
||||||
/* this field is also used to hook the debugger */
|
/* interpreters field is also used to hook */
|
||||||
/* in `ttdebug' */
|
/* the debugger in `ttdebug'. */
|
||||||
|
/* */
|
||||||
|
/* extra :: XXX */
|
||||||
/* */
|
/* */
|
||||||
typedef struct TT_FaceRec_
|
typedef struct TT_FaceRec_
|
||||||
{
|
{
|
||||||
|
@ -1331,10 +1403,6 @@
|
||||||
FT_Int num_charmaps;
|
FT_Int num_charmaps;
|
||||||
TT_CharMap charmaps; /* array of TT_CharMapRec */
|
TT_CharMap charmaps; /* array of TT_CharMapRec */
|
||||||
|
|
||||||
/* a pointer to the function used to seek a stream to the start of */
|
|
||||||
/* a given TrueType table. This should default to the function */
|
|
||||||
/* TT_Goto_Table defined in `ttload.h', but some font drivers */
|
|
||||||
/* might need something different, e.g. Type 42 fonts */
|
|
||||||
TT_Goto_Table_Func goto_table;
|
TT_Goto_Table_Func goto_table;
|
||||||
|
|
||||||
TT_Access_Glyph_Frame_Func access_glyph_frame;
|
TT_Access_Glyph_Frame_Func access_glyph_frame;
|
||||||
|
@ -1376,6 +1444,7 @@
|
||||||
/* postscript names table */
|
/* postscript names table */
|
||||||
TT_Post_Names postscript_names;
|
TT_Post_Names postscript_names;
|
||||||
|
|
||||||
|
|
||||||
/***********************************************************************/
|
/***********************************************************************/
|
||||||
/* */
|
/* */
|
||||||
/* TrueType-specific fields (ignored by the OTF-Type2 driver) */
|
/* TrueType-specific fields (ignored by the OTF-Type2 driver) */
|
||||||
|
@ -1403,10 +1472,11 @@
|
||||||
FT_Int kern_table_index;
|
FT_Int kern_table_index;
|
||||||
TT_Kern_0_Pair* kern_pairs;
|
TT_Kern_0_Pair* kern_pairs;
|
||||||
|
|
||||||
/* a pointer to the bytecode interpreter to use. This is also */
|
/* A pointer to the bytecode interpreter to use. This is also */
|
||||||
/* used to hook the debugger for the `ttdebug' utility.. */
|
/* used to hook the debugger for the `ttdebug' utility. */
|
||||||
TT_Interpreter interpreter;
|
TT_Interpreter interpreter;
|
||||||
|
|
||||||
|
|
||||||
/***********************************************************************/
|
/***********************************************************************/
|
||||||
/* */
|
/* */
|
||||||
/* Other tables or fields. This is used by derivative formats like */
|
/* Other tables or fields. This is used by derivative formats like */
|
||||||
|
@ -1419,30 +1489,35 @@
|
||||||
} TT_FaceRec;
|
} TT_FaceRec;
|
||||||
|
|
||||||
|
|
||||||
|
/*************************************************************************/
|
||||||
|
/* */
|
||||||
/************************************************************************
|
/* <Struct> */
|
||||||
*
|
/* TT_GlyphZone */
|
||||||
* <Struct>
|
/* */
|
||||||
* TT_GlyphZone
|
/* <Description> */
|
||||||
*
|
/* A glyph zone is used to load, scale and hint glyph outline */
|
||||||
* <Description>
|
/* coordinates. */
|
||||||
* A glyph zone is used to load, scale and hint glyph outline
|
/* */
|
||||||
* coordinates.
|
/* <Fields> */
|
||||||
*
|
/* memory :: A handle to the memory manager. */
|
||||||
* <Fields>
|
/* */
|
||||||
* memory :: handle to memory manager
|
/* max_points :: The maximal size in points of the zone. */
|
||||||
* max_points :: max size in points of zone
|
/* */
|
||||||
* max_contours :: max size in contours of zone
|
/* max_contours :: Max size in links contours of thez one. */
|
||||||
* n_points :: current number of points in zone
|
/* */
|
||||||
* n_contours :: current number of contours in zone
|
/* n_points :: The current number of points in the zone. */
|
||||||
* org :: original glyph coordinates (font units/scaled)
|
/* */
|
||||||
* cur :: current glyph coordinates (scaled/hinted)
|
/* n_contours :: The current number of contours in the zone. */
|
||||||
* tags :: point control tags
|
/* */
|
||||||
* contours :: contour end points
|
/* org :: The original glyph coordinates (font */
|
||||||
*
|
/* units/scaled). */
|
||||||
***********************************************************************/
|
/* */
|
||||||
|
/* cur :: The current glyph coordinates (scaled/hinted). */
|
||||||
|
/* */
|
||||||
|
/* tags :: The point control tags. */
|
||||||
|
/* */
|
||||||
|
/* contours :: The contours end points. */
|
||||||
|
/* */
|
||||||
typedef struct TT_GlyphZone_
|
typedef struct TT_GlyphZone_
|
||||||
{
|
{
|
||||||
FT_Memory memory;
|
FT_Memory memory;
|
||||||
|
|
|
@ -232,7 +232,7 @@
|
||||||
if ( error )
|
if ( error )
|
||||||
goto Exit;
|
goto Exit;
|
||||||
|
|
||||||
face->root.num_faces = face->ttc_header.DirCount;
|
face->root.num_faces = face->ttc_header.count;
|
||||||
if ( face->root.num_faces < 1 )
|
if ( face->root.num_faces < 1 )
|
||||||
face->root.num_faces = 1;
|
face->root.num_faces = 1;
|
||||||
|
|
||||||
|
@ -493,8 +493,8 @@
|
||||||
face->num_kern_pairs = 0;
|
face->num_kern_pairs = 0;
|
||||||
|
|
||||||
/* freeing the collection table */
|
/* freeing the collection table */
|
||||||
FREE( face->ttc_header.TableDirectory );
|
FREE( face->ttc_header.offsets );
|
||||||
face->ttc_header.DirCount = 0;
|
face->ttc_header.count = 0;
|
||||||
|
|
||||||
/* freeing table directory */
|
/* freeing table directory */
|
||||||
FREE( face->dir_tables );
|
FREE( face->dir_tables );
|
||||||
|
|
|
@ -185,16 +185,16 @@
|
||||||
{
|
{
|
||||||
FT_FRAME_START( 8 ),
|
FT_FRAME_START( 8 ),
|
||||||
FT_FRAME_LONG( TTC_Header, version ),
|
FT_FRAME_LONG( TTC_Header, version ),
|
||||||
FT_FRAME_LONG( TTC_Header, DirCount ),
|
FT_FRAME_LONG( TTC_Header, count ),
|
||||||
FT_FRAME_END };
|
FT_FRAME_END };
|
||||||
|
|
||||||
|
|
||||||
FT_TRACE2(( "TT_Load_SFNT_Header: %08p, %ld\n",
|
FT_TRACE2(( "TT_Load_SFNT_Header: %08p, %ld\n",
|
||||||
face, face_index ));
|
face, face_index ));
|
||||||
|
|
||||||
face->ttc_header.Tag = 0;
|
face->ttc_header.tag = 0;
|
||||||
face->ttc_header.version = 0;
|
face->ttc_header.version = 0;
|
||||||
face->ttc_header.DirCount = 0;
|
face->ttc_header.count = 0;
|
||||||
|
|
||||||
face->num_tables = 0;
|
face->num_tables = 0;
|
||||||
|
|
||||||
|
@ -217,26 +217,26 @@
|
||||||
goto Exit;
|
goto Exit;
|
||||||
|
|
||||||
/* now read the offsets of each font in the file */
|
/* now read the offsets of each font in the file */
|
||||||
if ( ALLOC_ARRAY( face->ttc_header.TableDirectory,
|
if ( ALLOC_ARRAY( face->ttc_header.offsets,
|
||||||
face->ttc_header.DirCount,
|
face->ttc_header.count,
|
||||||
FT_ULong ) ||
|
FT_ULong ) ||
|
||||||
ACCESS_Frame( face->ttc_header.DirCount * 4L ) )
|
ACCESS_Frame( face->ttc_header.count * 4L ) )
|
||||||
goto Exit;
|
goto Exit;
|
||||||
|
|
||||||
for ( n = 0; n < face->ttc_header.DirCount; n++ )
|
for ( n = 0; n < face->ttc_header.count; n++ )
|
||||||
face->ttc_header.TableDirectory[n] = GET_ULong();
|
face->ttc_header.offsets[n] = GET_ULong();
|
||||||
|
|
||||||
FORGET_Frame();
|
FORGET_Frame();
|
||||||
|
|
||||||
/* check face index */
|
/* check face index */
|
||||||
if ( face_index >= face->ttc_header.DirCount )
|
if ( face_index >= face->ttc_header.count )
|
||||||
{
|
{
|
||||||
error = TT_Err_Bad_Argument;
|
error = TT_Err_Bad_Argument;
|
||||||
goto Exit;
|
goto Exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* seek to the appropriate TrueType file, then read tag */
|
/* seek to the appropriate TrueType file, then read tag */
|
||||||
if ( FILE_Seek( face->ttc_header.TableDirectory[face_index] ) ||
|
if ( FILE_Seek( face->ttc_header.offsets[face_index] ) ||
|
||||||
READ_Long( format_tag ) )
|
READ_Long( format_tag ) )
|
||||||
goto Exit;
|
goto Exit;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue