zenilib: zenilib/jni/external/freetype2/src/sfnt/sfobjs.c File Reference

zenilib 0.5.3.0

- Main Page
- Modules
- Namespaces
- Classes
- Files

- File List
- File Members

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
Macros | Typedefs | Functions
sfobjs.c File Reference
`#include <ft2build.h>`
`#include "sfobjs.h"`
`#include "ttload.h"`
`#include "ttcmap.h"`
`#include "ttkern.h"`
`#include <FT_INTERNAL_SFNT_H>`
`#include <FT_INTERNAL_DEBUG_H>`
`#include <FT_TRUETYPE_IDS_H>`
`#include <FT_TRUETYPE_TAGS_H>`
`#include <FT_SERVICE_POSTSCRIPT_CMAPS_H>`
`#include <FT_SFNT_NAMES_H>`
`#include "sferrors.h"`

Go to the source code of this file.

## Macros

#define | FT_COMPONENT trace_sfobjs
#define | FT_STRUCTURE TTC_HeaderRec
#define | GET_NAME(id, field)
#define | LOAD_(x)
#define | LOADM_(x, vertical)

## Typedefs

typedef FT_String *(* | TT_NameEntry_ConvertFunc )(TT_NameEntry entry, FT_Memory memory)

## Functions

| sfnt_done_face (TT_Face face)
static FT_Encoding | sfnt_find_encoding (int platform_id, int encoding_id)
| 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)
static FT_Error | sfnt_open_font (FT_Stream stream, TT_Face face)
static FT_Error | tt_face_get_name (TT_Face face, FT_UShort nameid, FT_String **name)
static FT_String * | tt_name_entry_ascii_from_other (TT_NameEntry entry, FT_Memory memory)
static FT_String * | tt_name_entry_ascii_from_utf16 (TT_NameEntry entry, FT_Memory memory)

## Macro Definition Documentation

#define FT_COMPONENT trace_sfobjs

Definition at line 44 of file sfobjs.c.

#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 )
if
if(!yyg->yy_init)
Definition: glslang_lex.cpp:1037
tt_face_get_name
static FT_Error tt_face_get_name(TT_Face face, FT_UShort nameid, FT_String **name)
Definition: sfobjs.c:135
error
FT_Error error
Definition: cffdrivr.c:407
face
GLenum face
Definition: gl2ext.h:1490

Definition at line 529 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 )
stream
GLuint GLuint stream
Definition: glew.h:6573
x
EGLSurface EGLint x
Definition: eglext.h:293
error
FT_Error error
Definition: cffdrivr.c:407
face
GLenum face
Definition: gl2ext.h:1490
FT_TRACE2
#define FT_TRACE2(varformat)
Definition: ftdebug.h:159
FT_TRACE3
#define FT_TRACE3(varformat)
Definition: ftdebug.h:160

Definition at line 498 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 )
stream
GLuint GLuint stream
Definition: glew.h:6573
x
EGLSurface EGLint x
Definition: eglext.h:293
error
FT_Error error
Definition: cffdrivr.c:407
face
GLenum face
Definition: gl2ext.h:1490
FT_TRACE2
#define FT_TRACE2(varformat)
Definition: ftdebug.h:159
FT_TRACE3
#define FT_TRACE3(varformat)
Definition: ftdebug.h:160

Definition at line 513 of file sfobjs.c.

Referenced by sfnt_load_face().

## Typedef Documentation

typedef FT_String*(* TT_NameEntry_ConvertFunc)(TT_NameEntry entry, FT_Memory memory)

Definition at line 110 of file sfobjs.c.

## Function Documentation

sfnt_done_face | ( | TT_Face | face | ) |

Definition at line 1069 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(), 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 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 437 of file sfobjs.c.

References error, FT_ERROR, FT_FACE_FIND_GLOBAL_SERVICE, FT_Get_Module_Interface(), FT_STREAM_SEEK, FT_TRACE2, FT_UNUSED, SFNT_Interface_::goto_table, if(), library, 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 538 of file sfobjs.c.

References FT_FaceRec_::ascender, FT_FaceRec_::available_sizes, FT_FaceRec_::bbox, FT_FaceRec_::charmap, FT_FaceRec_::charmaps, cmap, FT_FaceRec_::descender, FT_CharMapRec_::encoding, FT_CharMapRec_::encoding_id, error, FT_FaceRec_::face_flags, FALSE, FT_Bool, FT_BOOL, 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_HAS_FIXED_SIZES, FT_IS_SCALABLE, 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, head, FT_Bitmap_Size_::height, FT_FaceRec_::height, FT_Size_Metrics_::height, i, if(), LOAD_, SFNT_Interface_::load_bhed, SFNT_Interface_::load_eblc, SFNT_Interface_::load_strike_metrics, LOADM_, m, FT_FaceRec_::max_advance_height, FT_FaceRec_::max_advance_width, NULL, FT_FaceRec_::num_charmaps, FT_FaceRec_::num_fixed_sizes, FT_CharMapRec_::platform_id, sfnt_find_encoding(), FT_Bitmap_Size_::size, FT_FaceRec_::style_flags, TRUE, tt_face_build_cmaps(), TT_FACE_HAS_KERNING, tt_face_lookup_table(), TTAG_CFF, TTAG_fvar, TTAG_glyf, TTAG_gvar, TTAG_true, FT_FaceRec_::underline_position, FT_FaceRec_::underline_thickness, FT_FaceRec_::units_per_EM, FT_Bitmap_Size_::width, FT_Bitmap_Size_::x_ppem, FT_Size_Metrics_::x_ppem, FT_BBox_::xMax, FT_BBox_::xMin, FT_Bitmap_Size_::y_ppem, FT_Size_Metrics_::y_ppem, FT_BBox_::yMax, and FT_BBox_::yMin.

static FT_Error sfnt_open_font | ( | FT_Stream | stream,
|  | TT_Face | face
| ) |  |

static

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_TRACE2, FT_TRACE3, FT_StreamRec_::memory, FT_StreamRec_::size, TTAG_OTTO, TTAG_true, TTAG_ttcf, TTAG_typ1, TT_FaceRec_::ttc_header, and version.

Referenced by sfnt_init_face().

static FT_Error tt_face_get_name | ( | TT_Face | face,
|  | FT_UShort | nameid,
|  | FT_String ** | name
| ) |  |

static

Definition at line 135 of file sfobjs.c.

References TT_NameEntryRec_::encodingID, error, FT_ASSERT, FT_Bool, FT_BOOL, FT_FREE, FT_QNEW_ARRAY, FT_STREAM_READ, FT_STREAM_SEEK, TT_NameEntryRec_::languageID, FT_FaceRec_::memory, TT_FaceRec_::name_table, TT_NameEntryRec_::nameID, TT_NameTableRec_::names, NULL, TT_FaceRec_::num_names, TT_NameEntryRec_::platformID, TT_FaceRec_::root, TT_NameTableRec_::stream, TT_NameEntryRec_::string, TT_NameEntryRec_::stringLength, TT_NameEntryRec_::stringOffset, TT_MAC_ID_ROMAN, TT_MAC_LANGID_ENGLISH, TT_MS_ID_SYMBOL_CS, TT_MS_ID_UCS_4, TT_MS_ID_UNICODE_CS, tt_name_entry_ascii_from_other(), tt_name_entry_ascii_from_utf16(), 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

Definition at line 81 of file sfobjs.c.

References error, FT_NEW_ARRAY, NULL, TT_NameEntryRec_::string, and TT_NameEntryRec_::stringLength.

Referenced by tt_face_get_name().

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 error, FT_NEW_ARRAY, FT_NEXT_USHORT, NULL, TT_NameEntryRec_::string, and TT_NameEntryRec_::stringLength.

Referenced by tt_face_get_name().