22 #include FT_INTERNAL_DEBUG_H
24 #include FT_TRUETYPE_IDS_H
28 #define FT_COMPONENT trace_t42
47 if (
FT_ALLOC( face->ttf_data, 12 ) )
58 parser->base_dict, parser->base_len );
64 FT_ERROR((
"T42_Open_Face: cannot handle FontType %d\n",
66 error = T42_Err_Unknown_File_Format;
76 FT_ERROR((
"T42_Open_Face: no charstrings array in face\n" ));
77 error = T42_Err_Invalid_File_Format;
112 type1->
encoding.char_index[charcode] = 0;
113 type1->
encoding.char_name [charcode] = (
char *)
".notdef";
117 for ( idx = 0; idx < type1->
num_glyphs; idx++ )
121 (
const char*)glyph_name ) == 0 )
124 type1->
encoding.char_name [charcode] = (
char*)glyph_name;
129 (
const char*)glyph_name ) != 0 )
131 if ( charcode < min_char )
133 if ( charcode >= max_char )
134 max_char = charcode + 1;
141 type1->
encoding.code_first = min_char;
142 type1->
encoding.code_last = max_char;
164 FT_Service_PsCMaps psnames;
176 face->ttf_face =
NULL;
177 face->root.num_faces = 1;
180 face->psnames = psnames;
187 FT_ERROR((
"T42_Face_Init: cannot access `psaux' module\n" ));
188 error = T42_Err_Missing_Module;
200 if ( face_index < 0 )
204 if ( face_index > 0 )
206 FT_ERROR((
"T42_Face_Init: invalid face index\n" ));
207 error = T42_Err_Invalid_Argument;
224 if ( info->is_fixed_pitch )
230 #ifdef TT_CONFIG_OPTION_BYTECODE_INTERPRETER
243 char* full = info->full_name;
251 if ( *full == *family )
258 if ( *full ==
' ' || *full ==
'-' )
260 else if ( *family ==
' ' || *family ==
'-' )
275 if ( type1->font_name )
300 &args, 0, &face->ttf_face );
310 root->
bbox = face->ttf_face->bbox;
313 root->
ascender = face->ttf_face->ascender;
314 root->
descender = face->ttf_face->descender;
315 root->
height = face->ttf_face->height;
325 if ( info->italic_angle )
347 charmap.
encoding = FT_ENCODING_UNICODE;
350 if ( error && FT_Err_No_Unicode_Glyph_Name != error )
358 switch ( type1->encoding_type )
361 charmap.
encoding = FT_ENCODING_ADOBE_STANDARD;
367 charmap.
encoding = FT_ENCODING_ADOBE_EXPERT;
369 clazz = cmap_classes->
expert;
373 charmap.
encoding = FT_ENCODING_ADOBE_CUSTOM;
375 clazz = cmap_classes->
custom;
379 charmap.
encoding = FT_ENCODING_ADOBE_LATIN_1;
415 type1 = &face->type1;
417 memory = face->root.memory;
420 if ( face->ttf_face )
446 if ( face->afm_data )
447 T1_Done_AFM( memory, (T1_AFM*)face->afm_data );
451 FT_FREE( face->unicode_map.maps );
452 face->unicode_map.num_maps = 0;
454 face->root.family_name = 0;
455 face->root.style_name = 0;
483 FT_ERROR((
"T42_Driver_Init: cannot access `truetype' module\n" ));
484 return T42_Err_Missing_Module;
511 t42size->ttsize = ttsize;
532 t42size->metrics = face->ttf_face->size->metrics;
551 t42size->metrics = face->ttf_face->size->metrics;
567 node =
FT_List_Find( &t42face->ttf_face->sizes_list, size->ttsize );
589 slot->
ttslot = t42face->ttf_face->glyph;
629 slot->
format = FT_GLYPH_FORMAT_NONE;
640 FT_Int32 load_flags )
T42_GlyphSlot_Done(FT_GlyphSlot t42slot)
const FT_Byte * memory_base
#define FT_ALLOC(ptr, size)
T1_CMap_Classes t1_cmap_classes
struct T42_GlyphSlotRec_ * T42_GlyphSlot
T42_Driver_Init(FT_Module module)
FT_Select_Size(FT_Face face, FT_Int strike_index)
T42_Size_Init(FT_Size size)
#define TT_ADOBE_ID_STANDARD
#define TT_ADOBE_ID_LATIN_1
t42_parser_init(T42_Parser parser, FT_Stream stream, FT_Memory memory, PSAux_Service psaux)
FT_Short underline_thickness
#define FT_FACE_FLAG_SCALABLE
FT_New_GlyphSlot(FT_Face face, FT_GlyphSlot *aslot)
FT_BEGIN_HEADER struct T42_SizeRec_ * T42_Size
FT_Bitmap_Size * available_sizes
FT_Fixed linearHoriAdvance
#define FT_FACE_FIND_GLOBAL_SERVICE(face, ptr, id)
T42_GlyphSlot_Load(FT_GlyphSlot glyph, FT_Size size, FT_UInt glyph_index, FT_Int32 load_flags)
FT_Done_GlyphSlot(FT_GlyphSlot slot)
struct T42_DriverRec_ * T42_Driver
#define TT_PLATFORM_MICROSOFT
T42_Face_Init(FT_Stream stream, FT_Face t42face, FT_Int face_index, FT_Int num_params, FT_Parameter *params)
FT_BEGIN_HEADER struct T42_FaceRec_ * T42_Face
FT_Short max_advance_height
T42_Size_Done(FT_Size t42size)
T42_GlyphSlot_Init(FT_GlyphSlot t42slot)
#define FT_ERROR(varformat)
#define FT_STYLE_FLAG_BOLD
static void t42_glyphslot_clear(FT_GlyphSlot slot)
#define FT_FACE_FLAG_VERTICAL
#define TT_ADOBE_ID_CUSTOM
T42_Size_Select(FT_Size t42size, FT_ULong strike_index)
FT_Byte * charstrings_block
#define FT_FACE_FLAG_FIXED_WIDTH
static FT_Error T42_Open_Face(T42_Face face)
FT_Request_Size(FT_Face face, FT_Size_Request req)
#define TT_ADOBE_ID_EXPERT
FT_BEGIN_HEADER FT_List_Find(FT_List list, void *data)
#define FT_FACE_FLAG_HORIZONTAL
T42_Size_Request(FT_Size t42size, FT_Size_Request req)
struct PSAux_ServiceRec_ * PSAux_Service
#define FT_TRACE2(varformat)
FT_Activate_Size(FT_Size size)
#define TT_PLATFORM_ADOBE
FT_PtrDist * charstrings_len
FT_Done_Size(FT_Size size)
struct FT_FaceRec_ * FT_Face
PS_TableRec encoding_table
FT_Slot_LoadFunc load_glyph
FT_Byte * glyph_names_block
typedefFT_BEGIN_HEADER struct FT_MemoryRec_ * FT_Memory
T1_EncodingType encoding_type
#define FT_FACE_FLAG_HINTER
ft_glyphslot_free_bitmap(FT_GlyphSlot slot)
FT_CMap_New(FT_CMap_Class clazz, FT_Pointer init_data, FT_CharMap charmap, FT_CMap *acmap)
t42_parse_dict(T42_Face face, T42_Loader loader, FT_Byte *base, FT_Long size)
FT_BEGIN_HEADER struct T42_ParserRec_ * T42_Parser
t42_loader_done(T42_Loader loader)
T42_Face_Done(FT_Face t42face)
struct FT_Driver_ClassRec_ * FT_Driver_Class
FT_Open_Face(FT_Library library, const FT_Open_Args *args, FT_Long face_index, FT_Face *aface)
FT_Fixed linearVertAdvance
FT_Get_Module(FT_Library library, const char *module_name)
FT_Get_Module_Interface(FT_Library library, const char *mod_name)
#define TT_MS_ID_UNICODE_CS
FT_Done_Face(FT_Face face)
#define FT_LOAD_NO_BITMAP
#define FT_STYLE_FLAG_ITALIC
t42_loader_init(T42_Loader loader, T42_Face face)
#define FT_FACE_LIBRARY(x)
T42_Driver_Done(FT_Module module)
#define FT_FACE_FLAG_GLYPH_NAMES
FT_Short max_advance_width
FT_Short underline_position
FT_BEGIN_HEADER FT_New_Size(FT_Face face, FT_Size *size)