25#include FT_INTERNAL_DEBUG_H
26#include FT_INTERNAL_CALC_H
27#include FT_TRUETYPE_IDS_H
32#define FT_COMPONENT trace_pfr
53 memory = pfrface->driver->root.memory;
56 pfrface->family_name =
NULL;
57 pfrface->style_name =
NULL;
63 FT_FREE( pfrface->available_sizes );
101 face->header.log_dir_offset,
106 pfrface->num_faces = num_faces;
109 if ( face_index < 0 )
112 if ( ( face_index & 0xFFFF ) >= pfrface->num_faces )
114 FT_ERROR((
"pfr_face_init: invalid face index\n" ));
123 (
FT_UInt)( face_index & 0xFFFF ),
124 face->header.log_dir_offset,
125 FT_BOOL(
face->header.phy_font_max_size_high != 0 ) );
131 face->log_font.phys_offset,
132 face->log_font.phys_size );
141 pfrface->face_index = face_index & 0xFFFF;
159 pfrface->face_flags = 0;
162 FT_ERROR((
"pfr_face_init: font doesn't contain glyphs\n" ));
177 if ( phy_font->num_strikes > 0 )
180 if ( phy_font->num_kern_pairs > 0 )
187 pfrface->family_name = phy_font->family_name;
188 if ( !pfrface->family_name )
189 pfrface->family_name = phy_font->font_id;
194 pfrface->style_name = phy_font->style_name;
196 pfrface->num_fixed_sizes = 0;
197 pfrface->available_sizes =
NULL;
199 pfrface->bbox = phy_font->bbox;
200 pfrface->units_per_EM = (
FT_UShort)phy_font->outline_resolution;
201 pfrface->ascender = (
FT_Short) phy_font->bbox.yMax;
202 pfrface->descender = (
FT_Short) phy_font->bbox.yMin;
204 pfrface->height = (
FT_Short)( ( pfrface->units_per_EM * 12 ) / 10 );
205 if ( pfrface->height < pfrface->ascender - pfrface->descender )
206 pfrface->height = (
FT_Short)(pfrface->ascender - pfrface->descender);
208 if ( phy_font->num_strikes > 0 )
219 size = pfrface->available_sizes;
220 strike = phy_font->strikes;
234 pfrface->max_advance_width = (
FT_Short)phy_font->standard_advance;
251 pfrface->max_advance_height = pfrface->height;
253 pfrface->underline_position = (
FT_Short)( -pfrface->units_per_EM / 10 );
254 pfrface->underline_thickness = (
FT_Short)( pfrface->units_per_EM / 30 );
261 charmap.
face = pfrface;
264 charmap.
encoding = FT_ENCODING_UNICODE;
270 if ( phy_font->num_kern_pairs )
314 FT_Int32 load_flags )
325 FT_TRACE1((
"pfr_slot_load: glyph index %d\n", gindex ));
330 if ( !
face || gindex >=
face->phy_font.num_chars )
354 gchar =
face->phy_font.chars + gindex;
358 gps_offset =
face->header.gps_section_offset;
362 gps_offset, gchar->gps_offset, gchar->gps_size );
369 FT_UInt em_metrics, em_outline;
378 outline->flags &= ~FT_OUTLINE_OWNER;
381 if (
size && pfrsize->metrics.y_ppem < 24 )
389 em_metrics =
face->phy_font.metrics_resolution;
390 em_outline =
face->phy_font.outline_resolution;
392 if ( em_metrics != em_outline )
402 pfrslot->linearHoriAdvance =
metrics->horiAdvance;
403 pfrslot->linearVertAdvance =
metrics->vertAdvance;
418 font_matrix.
xx =
face->log_font.matrix[0] << 8;
419 font_matrix.
yx =
face->log_font.matrix[1] << 8;
420 font_matrix.
xy =
face->log_font.matrix[2] << 8;
421 font_matrix.
yy =
face->log_font.matrix[3] << 8;
431 FT_Fixed x_scale = pfrsize->metrics.x_scale;
432 FT_Fixed y_scale = pfrsize->metrics.y_scale;
479 FT_UInt32 code1, code2,
pair;
508 if (
pair >=
item->pair1 && pair <= item->pair2 )
553 while ( probe >
size )
_STLP_MOVE_TO_STD_NAMESPACE void _STLP_CALL advance(_InputIterator &__i, _Distance __n)
#define TT_MS_ID_UNICODE_CS
#define TT_PLATFORM_MICROSOFT
#define FT_FACE_FLAG_KERNING
FT_BEGIN_HEADER struct FT_Glyph_Metrics_ FT_Glyph_Metrics
#define FT_LOAD_SBITS_ONLY
#define FT_LOAD_NO_BITMAP
#define FT_FACE_FLAG_FIXED_SIZES
#define FT_FACE_FLAG_SCALABLE
#define FT_LOAD_BITMAP_METRICS_ONLY
#define FT_FACE_FLAG_FIXED_WIDTH
#define FT_FACE_FLAG_VERTICAL
#define FT_FACE_FLAG_HORIZONTAL
FT_MulDiv(FT_Long a, FT_Long b, FT_Long c)
FT_MulFix(FT_Long a, FT_Long b)
#define FT_ERROR(varformat)
#define FT_TRACE2(varformat)
#define FT_TRACE1(varformat)
#define FT_OUTLINE_HIGH_PRECISION
#define FT_OUTLINE_REVERSE_FILL
FT_BEGIN_HEADER typedef signed long FT_Pos
#define FT_NEW_ARRAY(ptr, count)
#define FT_FACE_MEMORY(x)
FT_CMap_New(FT_CMap_Class clazz, FT_Pointer init_data, FT_CharMap charmap, FT_CMap *acmap)
FT_Outline_Transform(const FT_Outline *outline, const FT_Matrix *matrix)
FT_Outline_Get_CBox(const FT_Outline *outline, FT_BBox *acbox)
smooth FT_Module_Constructor FT_Module_Destructor FT_Module_Requester FT_GLYPH_FORMAT_OUTLINE
#define FT_FRAME_ENTER(size)
#define FT_STREAM_SEEK(position)
#define FT_NEXT_ULONG(buffer)
typedefFT_BEGIN_HEADER struct FT_MemoryRec_ * FT_Memory
FT_BEGIN_HEADER typedef unsigned char FT_Bool
GLuint GLuint GLsizei count
GLenum GLuint GLint GLenum face
GLsizei GLenum const GLvoid GLuint GLsizei GLfloat * metrics
GLenum const GLfloat * params
static char memory[1024 *256]
FT_CALLBACK_TABLE_DEF const FT_CMap_ClassRec pfr_cmap_class_rec
pfr_glyph_init(PFR_Glyph glyph, FT_GlyphLoader loader)
pfr_glyph_load(PFR_Glyph glyph, FT_Stream stream, FT_ULong gps_offset, FT_ULong offset, FT_ULong size)
pfr_glyph_done(PFR_Glyph glyph)
pfr_log_font_count(FT_Stream stream, FT_UInt32 section_offset, FT_Long *acount)
pfr_log_font_load(PFR_LogFont log_font, FT_Stream stream, FT_UInt idx, FT_UInt32 section_offset, FT_Bool size_increment)
pfr_header_load(PFR_Header header, FT_Stream stream)
pfr_phy_font_done(PFR_PhyFont phy_font, FT_Memory memory)
pfr_header_check(PFR_Header header)
pfr_phy_font_load(PFR_PhyFont phy_font, FT_Stream stream, FT_UInt32 offset, FT_UInt32 size)
pfr_face_get_kerning(FT_Face pfrface, FT_UInt glyph1, FT_UInt glyph2, FT_Vector *kerning)
pfr_slot_load(FT_GlyphSlot pfrslot, FT_Size pfrsize, FT_UInt gindex, FT_Int32 load_flags)
pfr_slot_init(FT_GlyphSlot pfrslot)
pfr_face_done(FT_Face pfrface)
pfr_face_init(FT_Stream stream, FT_Face pfrface, FT_Int face_index, FT_Int num_params, FT_Parameter *params)
pfr_slot_done(FT_GlyphSlot pfrslot)
struct PFR_SizeRec_ * PFR_Size
struct PFR_SlotRec_ * PFR_Slot
typedefFT_BEGIN_HEADER struct PFR_FaceRec_ * PFR_Face
pfr_slot_load_bitmap(PFR_Slot glyph, PFR_Size size, FT_UInt glyph_index, FT_Bool metrics_only)
#define PFR_PHY_PROPORTIONAL
#define PFR_KERN_INDEX(g1, g2)
#define PFR_KERN_2BYTE_CHAR
#define PFR_NEXT_KPAIR(p)
#define PFR_KERN_2BYTE_ADJ
FT_UInt FT_UInt FT_Vector * kerning