#include <ft2build.h>
#include "sfobjs.h"
#include "ttload.h"
#include "ttcmap.h"
#include "ttkern.h"
#include "sferrors.h"
Go to the source code of this file.
Defines | |
#define | FT_COMPONENT trace_sfobjs |
#define | FT_STRUCTURE TTC_HeaderRec |
#define | LOAD_(x) |
#define | LOADM_(x, vertical) |
#define | GET_NAME(id, field) |
Typedefs | |
typedef FT_String *(*) | TT_NameEntry_ConvertFunc (TT_NameEntry entry, FT_Memory memory) |
Functions | |
static FT_String * | tt_name_entry_ascii_from_utf16 (TT_NameEntry entry, FT_Memory memory) |
static FT_String * | tt_name_entry_ascii_from_other (TT_NameEntry entry, FT_Memory memory) |
static FT_Error | tt_face_get_name (TT_Face face, FT_UShort nameid, FT_String **name) |
static FT_Encoding | sfnt_find_encoding (int platform_id, int encoding_id) |
static FT_Error | sfnt_open_font (FT_Stream stream, TT_Face face) |
sfnt_init_face (FT_Stream stream, TT_Face face, FT_Int face_index, FT_Int num_params, FT_Parameter *params) | |
sfnt_load_face (FT_Stream stream, TT_Face face, FT_Int face_index, FT_Int num_params, FT_Parameter *params) | |
sfnt_done_face (TT_Face face) |
#define FT_STRUCTURE TTC_HeaderRec |
#define GET_NAME | ( | id, | |||
field | ) |
Value:
do { \ error = tt_face_get_name( face, TT_NAME_ID_##id, field ); \ if ( error ) \ goto Exit; \ } while ( 0 )
Definition at line 510 of file sfobjs.c.
Referenced by sfnt_load_face().
#define LOAD_ | ( | x | ) |
Value:
do { \ FT_TRACE2(( "`" #x "' " )); \ FT_TRACE3(( "-->\n" )); \ \ error = sfnt->load_##x( face, stream ); \ \ FT_TRACE2(( "%s\n", ( !error ) \ ? "loaded" \ : ( error == SFNT_Err_Table_Missing ) \ ? "missing" \ : "failed to load" )); \ FT_TRACE3(( "\n" )); \ } while ( 0 )
Definition at line 479 of file sfobjs.c.
Referenced by sfnt_load_face().
#define LOADM_ | ( | x, | |||
vertical | ) |
Value:
do { \ FT_TRACE2(( "`%s" #x "' ", \ vertical ? "vertical " : "" )); \ FT_TRACE3(( "-->\n" )); \ \ error = sfnt->load_##x( face, stream, vertical ); \ \ FT_TRACE2(( "%s\n", ( !error ) \ ? "loaded" \ : ( error == SFNT_Err_Table_Missing ) \ ? "missing" \ : "failed to load" )); \ FT_TRACE3(( "\n" )); \ } while ( 0 )
Definition at line 494 of file sfobjs.c.
Referenced by sfnt_load_face().
typedef FT_String*(*) TT_NameEntry_ConvertFunc(TT_NameEntry entry, FT_Memory memory) |
sfnt_done_face | ( | TT_Face | face | ) |
Definition at line 1055 of file sfobjs.c.
References SFNT_Interface_::free_eblc, SFNT_Interface_::free_name, SFNT_Interface_::free_psnames, FT_FACE_STREAM, FT_FRAME_RELEASE, FT_FREE, if(), PC3::stream(), tt_face_done_kern(), and tt_face_free_bdf_props().
static FT_Encoding sfnt_find_encoding | ( | int | platform_id, | |
int | encoding_id | |||
) | [static] |
Definition at line 292 of file sfobjs.c.
References FT_ENCODING_BIG5, FT_ENCODING_GB2312, FT_ENCODING_JOHAB, FT_ENCODING_MS_SYMBOL, FT_ENCODING_SJIS, FT_ENCODING_UNICODE, FT_ENCODING_WANSUNG, if(), TT_MAC_ID_ROMAN, TT_MS_ID_BIG_5, TT_MS_ID_GB2312, TT_MS_ID_JOHAB, TT_MS_ID_SJIS, TT_MS_ID_SYMBOL_CS, TT_MS_ID_UCS_4, TT_MS_ID_UNICODE_CS, TT_MS_ID_WANSUNG, TT_PLATFORM_APPLE_UNICODE, TT_PLATFORM_ISO, TT_PLATFORM_MACINTOSH, and TT_PLATFORM_MICROSOFT.
Referenced by sfnt_load_face().
sfnt_init_face | ( | FT_Stream | stream, | |
TT_Face | face, | |||
FT_Int | face_index, | |||
FT_Int | num_params, | |||
FT_Parameter * | params | |||
) |
Definition at line 423 of file sfobjs.c.
References error, FT_FACE_FIND_GLOBAL_SERVICE, FT_Get_Module_Interface(), FT_STREAM_SEEK, FT_TRACE2, FT_UNUSED, SFNT_Interface_::goto_table, if(), SFNT_Interface_::load_font_dir, and sfnt_open_font().
sfnt_load_face | ( | FT_Stream | stream, | |
TT_Face | face, | |||
FT_Int | face_index, | |||
FT_Int | num_params, | |||
FT_Parameter * | params | |||
) |
Definition at line 519 of file sfobjs.c.
References bsize, error, FALSE, flags, FONT_FAMILY, for(), FT_Bool, FT_BOOL, FT_ENCODING_UNICODE, FT_FACE_FLAG_FIXED_SIZES, FT_FACE_FLAG_FIXED_WIDTH, FT_FACE_FLAG_GLYPH_NAMES, FT_FACE_FLAG_HORIZONTAL, FT_FACE_FLAG_KERNING, FT_FACE_FLAG_MULTIPLE_MASTERS, FT_FACE_FLAG_SCALABLE, FT_FACE_FLAG_SFNT, FT_FACE_FLAG_VERTICAL, FT_NEW_ARRAY, FT_PARAM_TAG_IGNORE_PREFERRED_FAMILY, FT_PARAM_TAG_IGNORE_PREFERRED_SUBFAMILY, FT_STYLE_FLAG_BOLD, FT_STYLE_FLAG_ITALIC, FT_TRACE2, FT_UNUSED, GET_NAME, i, if(), LOAD_, SFNT_Interface_::load_bhed, SFNT_Interface_::load_eblc, SFNT_Interface_::load_strike_metrics, LOADM_, m, metrics(), name, NULL, root, sfnt_find_encoding(), TRUE, tt_face_build_cmaps(), TT_FACE_HAS_KERNING, tt_face_lookup_table(), TTAG_CFF, TTAG_fvar, TTAG_glyf, TTAG_gvar, and TTAG_true.
Definition at line 345 of file sfobjs.c.
References error, FT_FRAME_END, FT_FRAME_ENTER, FT_FRAME_EXIT, FT_FRAME_LONG, FT_FRAME_START, FT_GET_ULONG, FT_NEW, FT_NEW_ARRAY, FT_READ_ULONG, FT_STREAM_POS, FT_STREAM_READ_FIELDS, FT_TRACE3, RooFitShortHand::L(), n, PC3::stream(), TTAG_OTTO, TTAG_true, TTAG_ttcf, TTAG_typ1, and version.
Referenced by sfnt_init_face().
Definition at line 135 of file sfobjs.c.
References ROOT::Math::gv_detail::convert(), TT_NameEntryRec_::encodingID, error, FT_ASSERT, FT_Bool, FT_BOOL, if(), TT_NameEntryRec_::languageID, n, TT_NameEntryRec_::nameID, NULL, TT_NameEntryRec_::platformID, result(), TT_NameEntryRec_::stringLength, TT_MAC_ID_ROMAN, TT_MAC_LANGID_ENGLISH, TT_MS_ID_SYMBOL_CS, TT_MS_ID_UCS_4, TT_MS_ID_UNICODE_CS, TT_PLATFORM_APPLE_UNICODE, TT_PLATFORM_ISO, TT_PLATFORM_MACINTOSH, and TT_PLATFORM_MICROSOFT.
static FT_String* tt_name_entry_ascii_from_other | ( | TT_NameEntry | entry, | |
FT_Memory | memory | |||
) | [static] |
static FT_String* tt_name_entry_ascii_from_utf16 | ( | TT_NameEntry | entry, | |
FT_Memory | memory | |||
) | [static] |
Definition at line 50 of file sfobjs.c.
References entry, error, FT_NEW_ARRAY, FT_NEXT_USHORT, len, n, NULL, and read.