zenilib  0.5.3.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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_Stringtt_name_entry_ascii_from_other (TT_NameEntry entry, FT_Memory memory)
 
static FT_Stringtt_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(!yyg->yy_init)
static FT_Error tt_face_get_name(TT_Face face, FT_UShort nameid, FT_String **name)
Definition: sfobjs.c:135
FT_Error error
Definition: cffdrivr.c:407
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 )
GLuint GLuint stream
Definition: glew.h:6573
EGLSurface EGLint x
Definition: eglext.h:293
FT_Error error
Definition: cffdrivr.c:407
GLenum face
Definition: gl2ext.h:1490
#define FT_TRACE2(varformat)
Definition: ftdebug.h:159
#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 )
GLuint GLuint stream
Definition: glew.h:6573
EGLSurface EGLint x
Definition: eglext.h:293
FT_Error error
Definition: cffdrivr.c:407
GLenum face
Definition: gl2ext.h:1490
#define FT_TRACE2(varformat)
Definition: ftdebug.h:159
#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_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_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