22#include FT_INTERNAL_DEBUG_H
24#include FT_TRUETYPE_IDS_H
28#define FT_COMPONENT trace_t42
70 FT_ERROR((
"T42_Open_Face: cannot handle FontType %d\n",
82 FT_ERROR((
"T42_Open_Face: no charstrings array in face\n" ));
101 FT_Int charcode,
idx, min_char, max_char;
120 type1->
encoding.char_index[charcode] = 0;
121 type1->
encoding.char_name [charcode] = (
char *)
".notdef";
129 (
const char*)glyph_name ) == 0 )
132 type1->
encoding.char_name [charcode] = (
char*)glyph_name;
137 (
const char*)glyph_name ) != 0 )
139 if ( charcode < min_char )
141 if ( charcode >= max_char )
142 max_char = charcode + 1;
149 type1->
encoding.code_first = min_char;
150 type1->
encoding.code_last = max_char;
172 FT_Service_PsCMaps psnames;
184 face->root.num_faces = 1;
187 face->psnames = psnames;
194 FT_ERROR((
"T42_Face_Init: cannot access `psaux' module\n" ));
207 if ( face_index < 0 )
211 if ( ( face_index & 0xFFFF ) > 0 )
213 FT_ERROR((
"T42_Face_Init: invalid face index\n" ));
223 root->num_glyphs = type1->num_glyphs;
224 root->num_charmaps = 0;
225 root->face_index = 0;
231 if (
info->is_fixed_pitch )
234#ifdef TT_CONFIG_OPTION_BYTECODE_INTERPRETER
242 root->family_name =
info->family_name;
244 root->style_name = (
char *)
"Regular";
245 if (
root->family_name )
247 char* full =
info->full_name;
248 char* family =
root->family_name;
255 if ( *full == *family )
262 if ( *full ==
' ' || *full ==
'-' )
264 else if ( *family ==
' ' || *family ==
'-' )
269 root->style_name = full;
279 if ( type1->font_name )
280 root->family_name = type1->font_name;
284 root->num_fixed_sizes = 0;
301 args.num_params = num_params;
317 root->units_per_EM =
face->ttf_face->units_per_EM;
319 root->ascender =
face->ttf_face->ascender;
320 root->descender =
face->ttf_face->descender;
321 root->height =
face->ttf_face->height;
323 root->max_advance_width =
face->ttf_face->max_advance_width;
324 root->max_advance_height =
face->ttf_face->max_advance_height;
330 root->style_flags = 0;
331 if (
info->italic_angle )
353 charmap.
encoding = FT_ENCODING_UNICODE;
365 switch ( type1->encoding_type )
368 charmap.
encoding = FT_ENCODING_ADOBE_STANDARD;
374 charmap.
encoding = FT_ENCODING_ADOBE_EXPERT;
376 clazz = cmap_classes->
expert;
380 charmap.
encoding = FT_ENCODING_ADOBE_CUSTOM;
382 clazz = cmap_classes->
custom;
386 charmap.
encoding = FT_ENCODING_ADOBE_LATIN_1;
416 type1 = &
face->type1;
421 if (
face->ttf_face )
447 if (
face->afm_data )
448 T1_Done_AFM(
memory, (T1_AFM*)
face->afm_data );
453 face->unicode_map.num_maps = 0;
484 FT_ERROR((
"T42_Driver_Init: cannot access `truetype' module\n" ));
512 t42size->ttsize = ttsize;
533 t42size->metrics =
face->ttf_face->size->metrics;
552 t42size->metrics =
face->ttf_face->size->metrics;
590 slot->ttslot = t42face->ttf_face->glyph;
595 slot->ttslot = ttslot;
623 slot->bitmap_left = 0;
624 slot->bitmap_top = 0;
625 slot->num_subglyphs = 0;
628 slot->control_len = 0;
630 slot->format = FT_GLYPH_FORMAT_NONE;
632 slot->linearHoriAdvance = 0;
633 slot->linearVertAdvance = 0;
641 FT_Int32 load_flags )
650 FT_TRACE1((
"T42_GlyphSlot_Load: glyph index %d\n", glyph_index ));
654 (
const char *)t42face->type1.charstrings[glyph_index],
#define TT_MS_ID_UNICODE_CS
#define TT_PLATFORM_MICROSOFT
#define FT_LOAD_NO_BITMAP
#define FT_STYLE_FLAG_ITALIC
#define FT_FACE_FLAG_SCALABLE
FT_Done_Face(FT_Face face)
#define FT_FACE_FLAG_HINTER
FT_Open_Face(FT_Library library, const FT_Open_Args *args, FT_Long face_index, FT_Face *aface)
#define FT_FACE_FLAG_FIXED_WIDTH
FT_Select_Size(FT_Face face, FT_Int strike_index)
#define FT_FACE_FLAG_VERTICAL
FT_Request_Size(FT_Face face, FT_Size_Request req)
struct FT_FaceRec_ * FT_Face
#define FT_FACE_FLAG_GLYPH_NAMES
#define FT_STYLE_FLAG_BOLD
#define FT_FACE_FLAG_HORIZONTAL
#define FT_ERROR(varformat)
#define FT_TRACE2(varformat)
#define FT_TRACE1(varformat)
struct FT_Driver_ClassRec_ * FT_Driver_Class
FT_BEGIN_HEADER FT_List_Find(FT_List list, void *data)
#define FT_ALLOC(ptr, size)
FT_Get_Module(FT_Library library, const char *module_name)
#define FT_FACE_LIBRARY(x)
ft_glyphslot_free_bitmap(FT_GlyphSlot slot)
FT_New_GlyphSlot(FT_Face face, FT_GlyphSlot *aslot)
FT_CMap_New(FT_CMap_Class clazz, FT_Pointer init_data, FT_CharMap charmap, FT_CMap *acmap)
FT_Get_Module_Interface(FT_Library library, const char *mod_name)
FT_Done_GlyphSlot(FT_GlyphSlot slot)
#define FT_FACE_FIND_GLOBAL_SERVICE(face, ptr, id)
FT_Done_Size(FT_Size size)
FT_Activate_Size(FT_Size size)
FT_BEGIN_HEADER FT_New_Size(FT_Face face, FT_Size *size)
typedefFT_BEGIN_HEADER struct FT_MemoryRec_ * FT_Memory
GLenum GLuint GLint GLenum face
GLenum const GLfloat * params
static char memory[1024 *256]
struct @1678::@1679 driver
struct PSAux_ServiceRec_ * PSAux_Service
FT_Fixed linearHoriAdvance
FT_Fixed linearVertAdvance
T1_CMap_Classes t1_cmap_classes
T1_EncodingType encoding_type
FT_UInt * charstrings_len
FT_Byte * charstrings_block
FT_Byte * glyph_names_block
PS_TableRec encoding_table
@ T1_ENCODING_TYPE_ISOLATIN1
@ T1_ENCODING_TYPE_STANDARD
@ T1_ENCODING_TYPE_EXPERT
T42_GlyphSlot_Init(FT_GlyphSlot t42slot)
T42_Size_Done(FT_Size t42size)
T42_Size_Init(FT_Size size)
static FT_Error T42_Open_Face(T42_Face face)
T42_Driver_Done(FT_Module module)
T42_Driver_Init(FT_Module module)
T42_GlyphSlot_Load(FT_GlyphSlot glyph, FT_Size size, FT_UInt glyph_index, FT_Int32 load_flags)
T42_Face_Done(FT_Face t42face)
static void t42_glyphslot_clear(FT_GlyphSlot slot)
T42_Size_Select(FT_Size t42size, FT_ULong strike_index)
T42_Size_Request(FT_Size t42size, FT_Size_Request req)
T42_GlyphSlot_Done(FT_GlyphSlot t42slot)
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_SizeRec_ * T42_Size
struct T42_DriverRec_ * T42_Driver
struct T42_GlyphSlotRec_ * T42_GlyphSlot
t42_parse_dict(T42_Face face, T42_Loader loader, FT_Byte *base, FT_Long size)
t42_parser_init(T42_Parser parser, FT_Stream stream, FT_Memory memory, PSAux_Service psaux)
t42_loader_done(T42_Loader loader)
t42_loader_init(T42_Loader loader, T42_Face face)
FT_BEGIN_HEADER struct T42_ParserRec_ * T42_Parser
FT_BEGIN_HEADER struct T42_FaceRec_ * T42_Face
#define TT_ADOBE_ID_EXPERT
#define TT_ADOBE_ID_STANDARD
#define TT_PLATFORM_ADOBE
#define TT_ADOBE_ID_LATIN_1
#define TT_ADOBE_ID_CUSTOM