21#include FT_INTERNAL_DEBUG_H
22#include FT_INTERNAL_CALC_H
23#include FT_INTERNAL_STREAM_H
25#include FT_TRUETYPE_IDS_H
26#include FT_TRUETYPE_TAGS_H
27#include FT_INTERNAL_SFNT_H
30#ifdef TT_CONFIG_OPTION_GX_VAR_SUPPORT
31#include FT_MULTIPLE_MASTERS_H
32#include FT_SERVICE_MULTIPLE_MASTERS_H
33#include FT_SERVICE_METRICS_VARIATIONS_H
36#include FT_INTERNAL_CFF_OBJECTS_TYPES_H
44#include FT_INTERNAL_POSTSCRIPT_AUX_H
45#include FT_SERVICE_CFF_TABLE_LOAD_H
55#define FT_COMPONENT trace_cffobjs
105 for (
i =
font->num_subfonts;
i > 0;
i-- )
188 error =
funcs->create( cffsize->face->memory, &priv,
193 for (
i =
font->num_subfonts;
i > 0;
i-- )
199 error =
funcs->create( cffsize->face->memory, &priv,
205 cffsize->internal->module_data =
internal;
208 size->strike_index = 0xFFFFFFFFUL;
215#ifdef TT_CONFIG_OPTION_EMBEDDED_BITMAPS
242 size->metrics.x_scale,
size->metrics.y_scale,
245 for (
i =
font->num_subfonts;
i > 0;
i-- )
252 if ( top_upm != sub_upm )
254 x_scale =
FT_MulDiv(
size->metrics.x_scale, top_upm, sub_upm );
255 y_scale =
FT_MulDiv(
size->metrics.y_scale, top_upm, sub_upm );
259 x_scale =
size->metrics.x_scale;
260 y_scale =
size->metrics.y_scale;
264 x_scale, y_scale, 0, 0 );
282#ifdef TT_CONFIG_OPTION_EMBEDDED_BITMAPS
294 return cff_size_select(
size, strike_index );
314 size->metrics.x_scale,
size->metrics.y_scale,
317 for (
i =
font->num_subfonts;
i > 0;
i-- )
324 if ( top_upm != sub_upm )
326 x_scale =
FT_MulDiv(
size->metrics.x_scale, top_upm, sub_upm );
327 y_scale =
FT_MulDiv(
size->metrics.y_scale, top_upm, sub_upm );
331 x_scale =
size->metrics.x_scale;
332 y_scale =
size->metrics.y_scale;
336 x_scale, y_scale, 0, 0 );
378 slot->internal->glyph_hints = (
void*)
funcs;
420 while ( continue_search )
431 if ( continue_search )
450 FT_Int32 family_name_length, style_name_length;
454 style_name_length = (FT_Int32)
ft_strlen( style_name );
456 if ( family_name_length > style_name_length )
461 for (
idx = 1;
idx <= style_name_length;
idx++ )
464 style_name[style_name_length -
idx] )
468 if (
idx > style_name_length )
471 idx = family_name_length - style_name_length - 1;
499 FT_Service_PsCMaps psnames;
502 FT_Service_CFFLoad cffload;
513 FT_ERROR((
"cff_face_init: cannot access `sfnt' module\n" ));
527 FT_ERROR((
"cff_face_init: cannot access `psaux' module\n" ));
548 FT_TRACE2((
" not an OpenType/CFF font\n" ));
554 if ( face_index < 0 )
586 face->is_cff2 = cff2;
628 if ( face_index < 0 )
638 cffface->face_index = face_index & 0xFFFF;
653 " cannot open CFF & CEF fonts\n"
655 " without the `PSNames' module\n" ));
660#ifdef FT_DEBUG_LEVEL_TRACE
689 for (
l = 0;
l < s1len;
l++ )
704 for (
l = 0;
l < s1len;
l++ )
711#ifdef TT_CONFIG_OPTION_GX_VAR_SUPPORT
713 FT_Service_MultiMasters mm = (FT_Service_MultiMasters)
face->mm;
714 FT_Service_MetricsVariations
var = (FT_Service_MetricsVariations)
face->var;
723 error = mm->set_instance( cffface, instance_index );
728 var->metrics_adjust( cffface );
755 if (
temp != 0x10000L )
790 if (
top->has_font_matrix )
827 if (
temp != 0x10000L )
845 char* style_name =
NULL;
861 cffface->bbox.xMax = ( dict->
font_bbox.
xMax + 0xFFFF ) >> 16;
862 cffface->bbox.yMax = ( dict->
font_bbox.
yMax + 0xFFFF ) >> 16;
866 cffface->ascender = (
FT_Short)( cffface->bbox.yMax );
867 cffface->descender = (
FT_Short)( cffface->bbox.yMin );
869 cffface->height = (
FT_Short)( ( cffface->units_per_EM * 12 ) / 10 );
870 if ( cffface->height < cffface->ascender - cffface->descender )
871 cffface->height = (
FT_Short)( cffface->ascender -
872 cffface->descender );
874 cffface->underline_position =
876 cffface->underline_thickness =
890 if ( !cffface->family_name )
894 (
FT_UInt)( face_index & 0xFFFF ) );
895 if ( cffface->family_name )
899 if ( cffface->family_name )
904 char* family = cffface->family_name;
909 if ( full && family )
914 if ( *fullp == *family )
922 if ( *fullp ==
' ' || *fullp ==
'-' )
929 if ( *family ==
' ' || *family ==
'-' )
935 if ( !*family && *fullp )
952 char *cid_font_name =
963 cffface->style_name = style_name;
986 if (
face->kern_pairs )
990 cffface->face_flags |=
flags;
1014 if ( !
ft_strncmp( cffface->style_name,
"Bold", 4 ) ||
1015 !
ft_strncmp( cffface->style_name,
"Black", 5 ) )
1018 cffface->style_flags =
flags;
1021#ifndef FT_CONFIG_OPTION_NO_GLYPH_NAMES
1046 for ( nn = 0; nn < (
FT_UInt)cffface->num_charmaps; nn++ )
1048 cmap = cffface->charmaps[nn];
1066 cmaprec.
face = cffface;
1069 cmaprec.
encoding = FT_ENCODING_UNICODE;
1071 nn = (
FT_UInt)cffface->num_charmaps;
1081 if ( !cffface->charmap && nn != (
FT_UInt)cffface->num_charmaps )
1082 cffface->charmap = cffface->charmaps[nn];
1090 cmaprec.
face = cffface;
1096 cmaprec.
encoding = FT_ENCODING_ADOBE_STANDARD;
1102 cmaprec.
encoding = FT_ENCODING_ADOBE_EXPERT;
1108 cmaprec.
encoding = FT_ENCODING_ADOBE_CUSTOM;
1133 memory = cffface->memory;
1150#ifdef TT_CONFIG_OPTION_GX_VAR_SUPPORT
1151 cff_done_blend(
face );
1166#ifdef CFF_CONFIG_OPTION_OLD_ENGINE
1184 seed = (FT_UInt32)( (
FT_Offset)(
char*)&seed ^
1187 seed = seed ^ ( seed >> 10 ) ^ ( seed >> 20 );
1189 driver->random_seed = (FT_Int32)seed;
1190 if (
driver->random_seed < 0 )
1192 else if (
driver->random_seed == 0 )
1193 driver->random_seed = 123456789;
ios_base &_STLP_CALL internal(ios_base &__s)
return cff_index_get_sid_string(cff, sid)
cff_font_done(CFF_Font font)
cff_font_load(FT_Library library, FT_Stream stream, FT_Int face_index, CFF_Font font, CFF_Face face, FT_Bool pure_cff, FT_Bool cff2)
cff_index_get_name(CFF_Font font, FT_UInt element)
cff_face_done(FT_Face cffface)
cff_slot_done(FT_GlyphSlot slot)
static void remove_style(FT_String *family_name, const FT_String *style_name)
cff_size_init(FT_Size cffsize)
static PSH_Globals_Funcs cff_size_get_globals_funcs(CFF_Size size)
cff_slot_init(FT_GlyphSlot slot)
cff_size_request(FT_Size size, FT_Size_Request req)
cff_driver_done(FT_Module module)
cff_size_done(FT_Size cffsize)
cff_driver_init(FT_Module module)
cff_face_init(FT_Stream stream, FT_Face cffface, FT_Int face_index, FT_Int num_params, FT_Parameter *params)
static FT_String * cff_strcpy(FT_Memory memory, const FT_String *source)
static void cff_make_private_dict(CFF_SubFont subfont, PS_Private priv)
static void remove_subset_prefix(FT_String *name)
FT_BEGIN_HEADER typedef TT_Face CFF_Face
struct CFF_InternalRec_ * CFF_Internal
struct CFF_SizeRec_ * CFF_Size
#define CFF_CMAP_ENCODING_CLASS_REC_GET
#define CFF_CMAP_UNICODE_CLASS_REC_GET
struct CFF_FontRec_ * CFF_Font
#define CFF_CONFIG_OPTION_DARKENING_PARAMETER_X1
#define CFF_CONFIG_OPTION_DARKENING_PARAMETER_Y4
#define CFF_CONFIG_OPTION_DARKENING_PARAMETER_X4
#define CFF_CONFIG_OPTION_DARKENING_PARAMETER_X2
#define CFF_CONFIG_OPTION_DARKENING_PARAMETER_Y2
#define CFF_CONFIG_OPTION_DARKENING_PARAMETER_Y1
#define CFF_CONFIG_OPTION_DARKENING_PARAMETER_X3
#define CFF_CONFIG_OPTION_DARKENING_PARAMETER_Y3
#define TT_MS_ID_UNICODE_CS
#define TT_PLATFORM_MICROSOFT
#define TT_PLATFORM_APPLE_UNICODE
#define FT_FACE_FLAG_KERNING
#define FT_FACE_FLAG_SFNT
#define FT_STYLE_FLAG_ITALIC
#define FT_FACE_FLAG_SCALABLE
#define FT_FACE_FLAG_HINTER
#define FT_HAS_MULTIPLE_MASTERS(face)
#define FT_FACE_FLAG_FIXED_WIDTH
FT_DivFix(FT_Long a, FT_Long b)
#define FT_FACE_FLAG_CID_KEYED
#define FT_HAS_FIXED_SIZES(face)
#define FT_FACE_FLAG_GLYPH_NAMES
#define FT_STYLE_FLAG_BOLD
#define FT_FACE_FLAG_HORIZONTAL
FT_MulDiv(FT_Long a, FT_Long b, FT_Long c)
FT_Vector_Transform_Scaled(FT_Vector *vector, const FT_Matrix *matrix, FT_Long scaling)
FT_Matrix_Multiply_Scaled(const FT_Matrix *a, FT_Matrix *b, FT_Long scaling)
#define FT_ERROR(varformat)
#define FT_TRACE2(varformat)
#define FT_TRACE4(varformat)
#define FT_HINTING_FREETYPE
FT_BEGIN_HEADER typedef signed long FT_Pos
#define FT_STRDUP(dst, str)
FT_Get_Module(FT_Library library, const char *module_name)
FT_Select_Metrics(FT_Face face, FT_ULong strike_index)
FT_Request_Metrics(FT_Face face, FT_Size_Request req)
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)
#define FT_FACE_FIND_GLOBAL_SERVICE(face, ptr, id)
#define FT_STREAM_SEEK(position)
typedefFT_BEGIN_HEADER struct FT_MemoryRec_ * FT_Memory
FT_BEGIN_HEADER typedef unsigned char FT_Bool
GLuint GLuint GLsizei count
GLdouble GLdouble GLdouble GLdouble top
GLenum GLuint GLint GLenum face
GLenum const GLfloat * params
GLuint GLsizei GLsizei * length
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
PSHinter_Interface * PSHinter_Service
static char memory[1024 *256]
struct @1679::@1680 driver
FT_BEGIN_HEADER struct PS_DriverRec_ * PS_Driver
struct PSAux_ServiceRec_ * PSAux_Service
static struct __wine_debug_functions funcs
SFNT_Interface * SFNT_Service
FT_Fixed underline_position
FT_Fixed underline_thickness
FT_Service_PsCMaps psnames
CFF_SubFont subfonts[CFF_MAX_CID_FONTS]
CFF_IndexRec charstrings_index
FT_ULong string_pool_size
PSHinter_Service pshinter
FT_Pos family_other_blues[10]
FT_Byte num_family_other_blues
CFF_PrivateRec private_dict
CFF_FontRecDictRec font_dict
PSH_Globals_Funcs(* get_globals_funcs)(FT_Module module)
T2_Hints_Funcs(* get_t2_funcs)(FT_Module module)
FT_UShort standard_width[1]
FT_Short snap_heights[13]
FT_Byte num_family_other_blues
FT_UShort standard_height[1]
FT_Short family_blues[14]
FT_Short family_other_blues[10]
TT_Load_Table_Func load_cmap
TT_Done_Face_Func done_face
TT_Init_Face_Func init_face
TT_Set_SBit_Strike_Func set_sbit_strike
TT_Load_Face_Func load_face
T1_FIELD_DICT_FONTDICT family_name
#define TT_ADOBE_ID_EXPERT
#define TT_ADOBE_ID_STANDARD
#define TT_PLATFORM_ADOBE
#define TT_ADOBE_ID_CUSTOM