30#include FT_INTERNAL_DEBUG_H
31#include FT_INTERNAL_STREAM_H
32#include FT_INTERNAL_OBJECTS_H
38#include FT_TRUETYPE_IDS_H
48#define FT_COMPONENT trace_pcfread
50#include FT_SERVICE_BDF_H
51#include FT_SERVICE_FONT_FORMAT_H
52#include FT_SERVICE_PROPERTIES_H
63#define FT_COMPONENT trace_pcfdriver
124 if ( charcode ==
code )
130 if ( charcode <
code )
142 FT_UInt32 *acharcode )
162 if ( charcode ==
code )
168 if ( charcode <
code )
175 if ( min < cmap->num_encodings )
182 if ( charcode > 0xFFFFFFFFUL )
184 FT_TRACE1((
"pcf_cmap_char_next: charcode 0x%x > 32bit API" ));
189 *acharcode = (FT_UInt32)charcode;
223 if (
face->properties )
228 for (
i = 0;
i <
face->nprops;
i++ )
245 FT_FREE( pcfface->family_name );
246 FT_FREE( pcfface->style_name );
247 FT_FREE( pcfface->available_sizes );
252 if ( pcfface->stream == &
face->comp_stream )
255 pcfface->stream =
face->comp_source;
281#if defined( FT_CONFIG_OPTION_USE_ZLIB ) || \
282 defined( FT_CONFIG_OPTION_USE_LZW ) || \
283 defined( FT_CONFIG_OPTION_USE_BZIP2 )
285#ifdef FT_CONFIG_OPTION_USE_ZLIB
300#ifdef FT_CONFIG_OPTION_USE_LZW
316#ifdef FT_CONFIG_OPTION_USE_BZIP2
323 FT_TRACE2((
" ... try Bzip2 stream\n" ));
336 pcfface->stream = &
face->comp_stream;
359 if ( face_index < 0 )
361 else if ( face_index > 0 && ( face_index & 0xFFFF ) > 0 )
363 FT_ERROR((
"PCF_Face_Init: invalid face index\n" ));
365 return FT_THROW( Invalid_Argument );
375 if ( charset_registry && charset_encoding )
377 char*
s = charset_registry;
382 if ( (
s[0] ==
'i' ||
s[0] ==
'I' ) &&
383 (
s[1] ==
's' ||
s[1] ==
'S' ) &&
384 (
s[2] ==
'o' ||
s[2] ==
'O' ) )
403 charmap.
encoding = FT_ENCODING_NONE;
408 if ( unicode_charmap )
410 charmap.
encoding = FT_ENCODING_UNICODE;
463 if (
height == ( ( bsize->y_ppem + 32 ) >> 6 ) )
469 face->accel.fontDescent ) )
489 FT_Int32 load_flags )
499 FT_TRACE1((
"PCF_Glyph_Load: glyph index %d\n", glyph_index ));
507 if ( glyph_index >= (
FT_UInt)
face->root.num_glyphs )
515 if ( glyph_index > 0 )
518 metric =
face->metrics + glyph_index;
546 return FT_THROW( Invalid_File_Format );
549 slot->format = FT_GLYPH_FORMAT_BITMAP;
561 (
face->accel.fontAscent +
562 face->accel.fontDescent ) * 64 );
612 const char* prop_name,
628 if ( prop->
value.
l > 0x7FFFFFFFL ||
629 prop->
value.
l < ( -1 - 0x7FFFFFFFL ) )
632 FT_TRACE1((
" too large integer 0x%x is truncated\n" ));
647 return FT_THROW( Invalid_Argument );
653 const char* *acharset_encoding,
654 const char* *acharset_registry )
656 *acharset_encoding =
face->charset_encoding;
657 *acharset_registry =
face->charset_registry;
676 const char* property_name,
680#ifdef PCF_CONFIG_OPTION_LONG_FAMILY_NAMES
685#ifndef FT_CONFIG_OPTION_ENVIRONMENT_PROPERTIES
690 if ( !
ft_strcmp( property_name,
"no-long-family-names" ) )
692#ifdef FT_CONFIG_OPTION_ENVIRONMENT_PROPERTIES
693 if ( value_is_string )
695 const char*
s = (
const char*)
value;
700 driver->no_long_family_names = 0;
702 driver->no_long_family_names = 1;
704 return FT_THROW( Invalid_Argument );
712 driver->no_long_family_names = *no_long_family_names;
723#ifndef FT_DEBUG_LEVEL_TRACE
729 FT_TRACE0((
"pcf_property_set: missing property `%s'\n",
731 return FT_THROW( Missing_Property );
737 const char* property_name,
740#ifdef PCF_CONFIG_OPTION_LONG_FAMILY_NAMES
746 if ( !
ft_strcmp( property_name,
"no-long-family-names" ) )
752 *
val = no_long_family_names;
761#ifndef FT_DEBUG_LEVEL_TRACE
767 FT_TRACE0((
"pcf_property_get: missing property `%s'\n",
769 return FT_THROW( Missing_Property );
774 pcf_service_properties,
808#ifdef PCF_CONFIG_OPTION_LONG_FAMILY_NAMES
812 driver->no_long_family_names = 0;
static unsigned char bytes[4]
#define TT_MS_ID_UNICODE_CS
#define TT_PLATFORM_MICROSOFT
#define TT_APPLE_ID_DEFAULT
#define TT_PLATFORM_APPLE_UNICODE
unsigned int(__cdecl typeof(jpeg_read_scanlines))(struct jpeg_decompress_struct *
@ FT_SIZE_REQUEST_TYPE_NOMINAL
@ FT_SIZE_REQUEST_TYPE_REAL_DIM
#define FT_LOAD_BITMAP_METRICS_ONLY
struct FT_GlyphSlotRec_ FT_GlyphSlotRec
@ BDF_PROPERTY_TYPE_INTEGER
FT_BEGIN_HEADER FT_Stream_OpenBzip2(FT_Stream stream, FT_Stream source)
#define FT_CALLBACK_DEF(x)
#define FT_CALLBACK_TABLE_DEF
#define FT_TRACE0(varformat)
#define FT_ERROR(varformat)
#define FT_TRACE2(varformat)
#define FT_TRACE1(varformat)
FT_BEGIN_HEADER FT_Stream_OpenGzip(FT_Stream stream, FT_Stream source)
FT_BEGIN_HEADER typedef signed long FT_Pos
FT_BEGIN_HEADER FT_Stream_OpenLZW(FT_Stream stream, FT_Stream source)
#define FT_MODULE_FONT_DRIVER
#define FT_MODULE_DRIVER_NO_OUTLINES
ft_synthesize_vertical_metrics(FT_Glyph_Metrics *metrics, FT_Pos advance)
FT_Select_Metrics(FT_Face face, FT_ULong strike_index)
#define FT_REQUEST_HEIGHT(req)
#define FT_FACE_MEMORY(x)
FT_CMap_New(FT_CMap_Class clazz, FT_Pointer init_data, FT_CharMap charmap, FT_CMap *acmap)
ft_glyphslot_alloc_bitmap(FT_GlyphSlot slot, FT_ULong size)
ft_service_list_lookup(FT_ServiceDesc service_descriptors, const char *service_id)
#define FT_STREAM_SEEK(position)
FT_Stream_Close(FT_Stream stream)
#define FT_STREAM_READ(buffer, count)
typedefFT_BEGIN_HEADER struct FT_MemoryRec_ * FT_Memory
FT_BEGIN_HEADER typedef unsigned char FT_Bool
GLint GLint GLsizei GLsizei height
GLenum GLuint GLint GLenum face
GLenum const GLfloat * params
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
static char memory[1024 *256]
struct @1677::@1678 driver
pcf_load_font(FT_Stream stream, PCF_Face face, FT_Long face_index)
struct PCF_DriverRec_ * PCF_Driver
#define PCF_BYTE_ORDER(f)
struct PCF_FaceRec_ * PCF_Face
struct PCF_DriverRec_ PCF_DriverRec
struct PCF_FaceRec_ PCF_FaceRec
pcf_cmap_char_next(FT_CMap pcfcmap, FT_UInt32 *acharcode)
pcf_cmap_char_index(FT_CMap pcfcmap, FT_UInt32 charcode)
PCF_Size_Request(FT_Size size, FT_Size_Request req)
static FT_Error pcf_get_bdf_property(PCF_Face face, const char *prop_name, BDF_PropertyRec *aproperty)
pcf_driver_requester(FT_Module module, const char *name)
pcf_driver_done(FT_Module module)
static FT_Error pcf_property_get(FT_Module module, const char *property_name, const void *value)
pcf_cmap_done(FT_CMap pcfcmap)
static FT_Error pcf_property_set(FT_Module module, const char *property_name, const void *value, FT_Bool value_is_string)
FT_CALLBACK_TABLE_DEF const FT_Driver_ClassRec pcf_driver_class
PCF_Face_Done(FT_Face pcfface)
pcf_cmap_init(FT_CMap pcfcmap, FT_Pointer init_data)
static FT_Error pcf_get_charset_id(PCF_Face face, const char **acharset_encoding, const char **acharset_registry)
static const FT_Service_BDFRec pcf_service_bdf
PCF_Face_Init(FT_Stream stream, FT_Face pcfface, FT_Int face_index, FT_Int num_params, FT_Parameter *params)
struct PCF_CMapRec_ PCF_CMapRec
PCF_Size_Select(FT_Size size, FT_ULong strike_index)
PCF_Glyph_Load(FT_GlyphSlot slot, FT_Size size, FT_UInt glyph_index, FT_Int32 load_flags)
static const FT_CMap_ClassRec pcf_cmap_class
struct PCF_CMapRec_ * PCF_CMap
pcf_driver_init(FT_Module module)
pcf_find_property(PCF_Face face, const FT_String *prop)
BitOrderInvert(unsigned char *buf, size_t nbytes)
TwoByteSwap(unsigned char *buf, size_t nbytes)
FourByteSwap(unsigned char *buf, size_t nbytes)
#define error3(s, a, b, c)
#define error4(s, a, b, c, d)
union BDF_PropertyRec_::@4231 u
FT_Short rightSideBearing
union PCF_PropertyRec_::@4247 value
#define FT_SERVICE_ID_BDF
FT_Error(* FT_BDF_GetPropertyFunc)(FT_Face face, const char *prop_name, BDF_PropertyRec *aproperty)
FT_Error(* FT_BDF_GetCharsetIdFunc)(FT_Face face, const char **acharset_encoding, const char **acharset_registry)
#define FT_SERVICE_ID_FONT_FORMAT
#define FT_FONT_FORMAT_PCF
#define FT_DEFINE_SERVICE_PROPERTIESREC(class_, set_property_, get_property_)
FT_Error(* FT_Properties_GetFunc)(FT_Module module, const char *property_name, void *value)
FT_Error(* FT_Properties_SetFunc)(FT_Module module, const char *property_name, const void *value, FT_Bool value_is_string)
#define FT_SERVICE_ID_PROPERTIES