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 =
FT_THROW( Unknown_File_Format );
76 FT_ERROR((
"T42_Open_Face: no charstrings array in face\n" ));
77 error =
FT_THROW( 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;
177 face->root.num_faces = 1;
180 face->psnames = psnames;
187 FT_ERROR((
"T42_Face_Init: cannot access `psaux' module\n" ));
200 if ( face_index < 0 )
204 if ( face_index > 0 )
206 FT_ERROR((
"T42_Face_Init: invalid face index\n" ));
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 );
325 if (
info->italic_angle )
347 charmap.
encoding = FT_ENCODING_UNICODE;
359 switch ( type1->encoding_type )
362 charmap.
encoding = FT_ENCODING_ADOBE_STANDARD;
368 charmap.
encoding = FT_ENCODING_ADOBE_EXPERT;
370 clazz = cmap_classes->
expert;
374 charmap.
encoding = FT_ENCODING_ADOBE_CUSTOM;
376 clazz = cmap_classes->
custom;
380 charmap.
encoding = FT_ENCODING_ADOBE_LATIN_1;
416 type1 = &
face->type1;
418 memory =
face->root.memory;
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;
455 face->root.family_name = 0;
456 face->root.style_name = 0;
484 FT_ERROR((
"T42_Driver_Init: cannot access `truetype' module\n" ));
512 t42size->ttsize = ttsize;
590 slot->
ttslot = t42face->ttf_face->glyph;
630 slot->
format = FT_GLYPH_FORMAT_NONE;
649 t42_glyphslot_clear( t42slot->
ttslot );
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
return FT_THROW(Missing_Property)
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
GLenum GLuint GLint GLenum face
T42_Size_Done(FT_Size t42size)
T42_GlyphSlot_Init(FT_GlyphSlot t42slot)
#define FT_ERROR(varformat)
#define FT_STYLE_FLAG_BOLD
#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
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)
if(!abbox) return FT_THROW(Invalid_Argument)
FT_CMap_New(FT_CMap_Class clazz, FT_Pointer init_data, FT_CharMap charmap, FT_CMap *acmap)
GLenum const GLfloat * params
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)