ReactOS 0.4.16-dev-2354-g16de117
ftobjs.h File Reference
Include dependency graph for ftobjs.h:

Go to the source code of this file.

Classes

struct  FT_CMapRec_
 
struct  FT_CMap_ClassRec_
 
struct  FT_Face_InternalRec_
 
struct  FT_Slot_InternalRec_
 
struct  FT_Size_InternalRec_
 
struct  FT_ModuleRec_
 
struct  FT_RendererRec_
 
struct  FT_DriverRec_
 
struct  FT_LibraryRec_
 

Macros

#define TRUE   1
 
#define FALSE   0
 
#define NULL   (void*)0
 
#define FT_MIN(a, b)   ( (a) < (b) ? (a) : (b) )
 
#define FT_MAX(a, b)   ( (a) > (b) ? (a) : (b) )
 
#define FT_ABS(a)   ( (a) < 0 ? -(a) : (a) )
 
#define FT_HYPOT(x, y)
 
#define FT_PAD_FLOOR(x, n)   ( (x) & ~FT_TYPEOF( x )( (n) - 1 ) )
 
#define FT_PAD_ROUND(x, n)   FT_PAD_FLOOR( (x) + (n) / 2, n )
 
#define FT_PAD_CEIL(x, n)   FT_PAD_FLOOR( (x) + (n) - 1, n )
 
#define FT_PIX_FLOOR(x)   ( (x) & ~FT_TYPEOF( x )63 )
 
#define FT_PIX_ROUND(x)   FT_PIX_FLOOR( (x) + 32 )
 
#define FT_PIX_CEIL(x)   FT_PIX_FLOOR( (x) + 63 )
 
#define FT_PAD_ROUND_LONG(x, n)
 
#define FT_PAD_CEIL_LONG(x, n)
 
#define FT_PIX_ROUND_LONG(x)   FT_PIX_FLOOR( ADD_LONG( (x), 32 ) )
 
#define FT_PIX_CEIL_LONG(x)   FT_PIX_FLOOR( ADD_LONG( (x), 63 ) )
 
#define FT_PAD_ROUND_INT32(x, n)
 
#define FT_PAD_CEIL_INT32(x, n)
 
#define FT_PIX_ROUND_INT32(x)   FT_PIX_FLOOR( ADD_INT32( (x), 32 ) )
 
#define FT_PIX_CEIL_INT32(x)   FT_PIX_FLOOR( ADD_INT32( (x), 63 ) )
 
#define ft_isdigit(x)   ( ( (unsigned)(x) - '0' ) < 10U )
 
#define ft_isxdigit(x)
 
#define ft_isupper(x)   ( ( (unsigned)(x) - 'A' ) < 26U )
 
#define ft_islower(x)   ( ( (unsigned)(x) - 'a' ) < 26U )
 
#define ft_isalpha(x)   ( ft_isupper( x ) || ft_islower( x ) )
 
#define ft_isalnum(x)   ( ft_isdigit( x ) || ft_isalpha( x ) )
 
#define FT_CMAP(x)   ( (FT_CMap)( x ) )
 
#define FT_CMAP_PLATFORM_ID(x)   FT_CMAP( x )->charmap.platform_id
 
#define FT_CMAP_ENCODING_ID(x)   FT_CMAP( x )->charmap.encoding_id
 
#define FT_CMAP_ENCODING(x)   FT_CMAP( x )->charmap.encoding
 
#define FT_CMAP_FACE(x)   FT_CMAP( x )->charmap.face
 
#define FT_DECLARE_CMAP_CLASS(class_)    FT_CALLBACK_TABLE const FT_CMap_ClassRec class_;
 
#define FT_DEFINE_CMAP_CLASS( class_, size_, init_, done_, char_index_, char_next_, char_var_index_, char_var_default_, variant_list_, charvariant_list_, variantchar_list_)
 
#define FT_GLYPH_OWN_BITMAP   0x1U
 
#define FT_MODULE(x)   ( (FT_Module)(x) )
 
#define FT_MODULE_CLASS(x)   FT_MODULE( x )->clazz
 
#define FT_MODULE_LIBRARY(x)   FT_MODULE( x )->library
 
#define FT_MODULE_MEMORY(x)   FT_MODULE( x )->memory
 
#define FT_MODULE_IS_DRIVER(x)
 
#define FT_MODULE_IS_RENDERER(x)
 
#define FT_MODULE_IS_HINTER(x)
 
#define FT_MODULE_IS_STYLER(x)
 
#define FT_DRIVER_IS_SCALABLE(x)
 
#define FT_DRIVER_USES_OUTLINES(x)
 
#define FT_DRIVER_HAS_HINTER(x)
 
#define FT_DRIVER_HINTS_LIGHTLY(x)
 
#define FT_FACE(x)   ( (FT_Face)(x) )
 
#define FT_SIZE(x)   ( (FT_Size)(x) )
 
#define FT_SLOT(x)   ( (FT_GlyphSlot)(x) )
 
#define FT_FACE_DRIVER(x)   FT_FACE( x )->driver
 
#define FT_FACE_LIBRARY(x)   FT_FACE_DRIVER( x )->root.library
 
#define FT_FACE_MEMORY(x)   FT_FACE( x )->memory
 
#define FT_FACE_STREAM(x)   FT_FACE( x )->stream
 
#define FT_SIZE_FACE(x)   FT_SIZE( x )->face
 
#define FT_SLOT_FACE(x)   FT_SLOT( x )->face
 
#define FT_FACE_SLOT(x)   FT_FACE( x )->glyph
 
#define FT_FACE_SIZE(x)   FT_FACE( x )->size
 
#define FT_REQUEST_WIDTH(req)
 
#define FT_REQUEST_HEIGHT(req)
 
#define FT_RENDERER(x)   ( (FT_Renderer)(x) )
 
#define FT_GLYPH(x)   ( (FT_Glyph)(x) )
 
#define FT_BITMAP_GLYPH(x)   ( (FT_BitmapGlyph)(x) )
 
#define FT_OUTLINE_GLYPH(x)   ( (FT_OutlineGlyph)(x) )
 
#define FT_DRIVER(x)   ( (FT_Driver)(x) )
 
#define FT_DRIVER_CLASS(x)   FT_DRIVER( x )->clazz
 
#define FT_DEFINE_OUTLINE_FUNCS( class_, move_to_, line_to_, conic_to_, cubic_to_, shift_, delta_)
 
#define FT_DEFINE_RASTER_FUNCS( class_, glyph_format_, raster_new_, raster_reset_, raster_set_mode_, raster_render_, raster_done_)
 
#define FT_DECLARE_GLYPH(class_)    FT_CALLBACK_TABLE const FT_Glyph_Class class_;
 
#define FT_DEFINE_GLYPH( class_, size_, format_, init_, done_, copy_, transform_, bbox_, prepare_)
 
#define FT_DECLARE_RENDERER(class_)    FT_EXPORT_VAR( const FT_Renderer_Class ) class_;
 
#define FT_DEFINE_RENDERER( class_, flags_, size_, name_, version_, requires_, interface_, init_, done_, get_interface_, glyph_format_, render_glyph_, transform_glyph_, get_glyph_cbox_, set_mode_, raster_class_)
 
#define FT_DECLARE_MODULE(class_)
 
#define FT_DEFINE_ROOT_MODULE( flags_, size_, name_, version_, requires_, interface_, init_, done_, get_interface_)
 
#define FT_DEFINE_MODULE( class_, flags_, size_, name_, version_, requires_, interface_, init_, done_, get_interface_)
 

Typedefs

typedef struct FT_CMapRec_FT_CMap
 
typedef const struct FT_CMap_ClassRec_FT_CMap_Class
 
typedef struct FT_CMapRec_ FT_CMapRec
 
typedef FT_Error(* FT_CMap_InitFunc) (FT_CMap cmap, FT_Pointer init_data)
 
typedef void(* FT_CMap_DoneFunc) (FT_CMap cmap)
 
typedef FT_UInt(* FT_CMap_CharIndexFunc) (FT_CMap cmap, FT_UInt32 char_code)
 
typedef FT_UInt(* FT_CMap_CharNextFunc) (FT_CMap cmap, FT_UInt32 *achar_code)
 
typedef FT_UInt(* FT_CMap_CharVarIndexFunc) (FT_CMap cmap, FT_CMap unicode_cmap, FT_UInt32 char_code, FT_UInt32 variant_selector)
 
typedef FT_Int(* FT_CMap_CharVarIsDefaultFunc) (FT_CMap cmap, FT_UInt32 char_code, FT_UInt32 variant_selector)
 
typedef FT_UInt32 *(* FT_CMap_VariantListFunc) (FT_CMap cmap, FT_Memory mem)
 
typedef FT_UInt32 *(* FT_CMap_CharVariantListFunc) (FT_CMap cmap, FT_Memory mem, FT_UInt32 char_code)
 
typedef FT_UInt32 *(* FT_CMap_VariantCharListFunc) (FT_CMap cmap, FT_Memory mem, FT_UInt32 variant_selector)
 
typedef struct FT_CMap_ClassRec_ FT_CMap_ClassRec
 
typedef struct FT_Face_InternalRec_ FT_Face_InternalRec
 
typedef struct FT_Slot_InternalRec_ FT_GlyphSlot_InternalRec
 
typedef struct FT_Size_InternalRec_ FT_Size_InternalRec
 
typedef struct FT_ModuleRec_ FT_ModuleRec
 
typedef struct FT_RendererRec_ FT_RendererRec
 
typedef struct FT_DriverRec_ FT_DriverRec
 
typedef struct FT_LibraryRec_ FT_LibraryRec
 
typedef const char *(* FT_Face_GetPostscriptNameFunc) (FT_Face face)
 
typedef FT_Error(* FT_Face_GetGlyphNameFunc) (FT_Face face, FT_UInt glyph_index, FT_Pointer buffer, FT_UInt buffer_max)
 
typedef FT_UInt(* FT_Face_GetGlyphNameIndexFunc) (FT_Face face, const FT_String *glyph_name)
 

Functions

 FT_CMap_New (FT_CMap_Class clazz, FT_Pointer init_data, FT_CharMap charmap, FT_CMap *acmap)
 
 FT_CMap_Done (FT_CMap cmap)
 
 ft_lcd_padding (FT_BBox *cbox, FT_GlyphSlot slot, FT_Render_Mode mode)
 
 FT_Get_Module_Interface (FT_Library library, const char *mod_name)
 
 ft_module_get_service (FT_Module module, const char *service_id, FT_Bool global)
 
 FT_New_GlyphSlot (FT_Face face, FT_GlyphSlot *aslot)
 
 FT_Done_GlyphSlot (FT_GlyphSlot slot)
 
 FT_Select_Metrics (FT_Face face, FT_ULong strike_index)
 
 FT_Request_Metrics (FT_Face face, FT_Size_Request req)
 
 FT_Match_Size (FT_Face face, FT_Size_Request req, FT_Bool ignore_width, FT_ULong *size_index)
 
 ft_synthesize_vertical_metrics (FT_Glyph_Metrics *metrics, FT_Pos advance)
 
 ft_glyphslot_free_bitmap (FT_GlyphSlot slot)
 
 ft_glyphslot_preset_bitmap (FT_GlyphSlot slot, FT_Render_Mode mode, const FT_Vector *origin)
 
 ft_glyphslot_alloc_bitmap (FT_GlyphSlot slot, FT_ULong size)
 
 ft_glyphslot_set_bitmap (FT_GlyphSlot slot, FT_Byte *buffer)
 
 FT_Lookup_Renderer (FT_Library library, FT_Glyph_Format format, FT_ListNode *node)
 
 FT_Render_Glyph_Internal (FT_Library library, FT_GlyphSlot slot, FT_Render_Mode render_mode)
 
 FT_New_Memory (void)
 
 FT_Done_Memory (FT_Memory memory)
 
 FT_EXPORT_VAR (FT_Raster_Funcs) ft_default_raster
 

Macro Definition Documentation

◆ FALSE

#define FALSE   0

Definition at line 57 of file ftobjs.h.

◆ FT_ABS

#define FT_ABS (   a)    ( (a) < 0 ? -(a) : (a) )

Definition at line 73 of file ftobjs.h.

◆ FT_BITMAP_GLYPH

#define FT_BITMAP_GLYPH (   x)    ( (FT_BitmapGlyph)(x) )

Definition at line 737 of file ftobjs.h.

◆ FT_CMAP

#define FT_CMAP (   x)    ( (FT_CMap)( x ) )

Definition at line 157 of file ftobjs.h.

◆ FT_CMAP_ENCODING

#define FT_CMAP_ENCODING (   x)    FT_CMAP( x )->charmap.encoding

Definition at line 162 of file ftobjs.h.

◆ FT_CMAP_ENCODING_ID

#define FT_CMAP_ENCODING_ID (   x)    FT_CMAP( x )->charmap.encoding_id

Definition at line 161 of file ftobjs.h.

◆ FT_CMAP_FACE

#define FT_CMAP_FACE (   x)    FT_CMAP( x )->charmap.face

Definition at line 163 of file ftobjs.h.

◆ FT_CMAP_PLATFORM_ID

#define FT_CMAP_PLATFORM_ID (   x)    FT_CMAP( x )->charmap.platform_id

Definition at line 160 of file ftobjs.h.

◆ FT_DECLARE_CMAP_CLASS

#define FT_DECLARE_CMAP_CLASS (   class_)     FT_CALLBACK_TABLE const FT_CMap_ClassRec class_;

Definition at line 229 of file ftobjs.h.

◆ FT_DECLARE_GLYPH

#define FT_DECLARE_GLYPH (   class_)     FT_CALLBACK_TABLE const FT_Glyph_Class class_;

Definition at line 1060 of file ftobjs.h.

◆ FT_DECLARE_MODULE

#define FT_DECLARE_MODULE (   class_)
Value:
FT_CALLBACK_TABLE \
const FT_Module_Class class_;

Definition at line 1174 of file ftobjs.h.

◆ FT_DECLARE_RENDERER

#define FT_DECLARE_RENDERER (   class_)     FT_EXPORT_VAR( const FT_Renderer_Class ) class_;

Definition at line 1105 of file ftobjs.h.

◆ FT_DEFINE_CMAP_CLASS

#define FT_DEFINE_CMAP_CLASS (   class_,
  size_,
  init_,
  done_,
  char_index_,
  char_next_,
  char_var_index_,
  char_var_default_,
  variant_list_,
  charvariant_list_,
  variantchar_list_ 
)
Value:
FT_CALLBACK_TABLE_DEF \
const FT_CMap_ClassRec class_ = \
{ \
size_, \
init_, \
done_, \
char_index_, \
char_next_, \
char_var_index_, \
char_var_default_, \
variant_list_, \
charvariant_list_, \
variantchar_list_ \
};

Definition at line 232 of file ftobjs.h.

◆ FT_DEFINE_GLYPH

#define FT_DEFINE_GLYPH (   class_,
  size_,
  format_,
  init_,
  done_,
  copy_,
  transform_,
  bbox_,
  prepare_ 
)
Value:
FT_CALLBACK_TABLE_DEF \
const FT_Glyph_Class class_ = \
{ \
size_, \
format_, \
init_, \
done_, \
copy_, \
transform_, \
bbox_, \
prepare_ \
};
typedefFT_BEGIN_HEADER struct FT_Glyph_Class_ FT_Glyph_Class
Definition: ftglyph.h:69

Definition at line 1063 of file ftobjs.h.

◆ FT_DEFINE_MODULE

#define FT_DEFINE_MODULE (   class_,
  flags_,
  size_,
  name_,
  version_,
  requires_,
  interface_,
  init_,
  done_,
  get_interface_ 
)
Value:
FT_CALLBACK_TABLE_DEF \
const FT_Module_Class class_ = \
{ \
flags_, \
size_, \
\
name_, \
version_, \
requires_, \
\
interface_, \
\
init_, \
done_, \
get_interface_, \
};

Definition at line 1203 of file ftobjs.h.

◆ FT_DEFINE_OUTLINE_FUNCS

#define FT_DEFINE_OUTLINE_FUNCS (   class_,
  move_to_,
  line_to_,
  conic_to_,
  cubic_to_,
  shift_,
  delta_ 
)
Value:
static const FT_Outline_Funcs class_ = \
{ \
move_to_, \
line_to_, \
conic_to_, \
cubic_to_, \
shift_, \
delta_ \
};

Definition at line 1002 of file ftobjs.h.

◆ FT_DEFINE_RASTER_FUNCS

#define FT_DEFINE_RASTER_FUNCS (   class_,
  glyph_format_,
  raster_new_,
  raster_reset_,
  raster_set_mode_,
  raster_render_,
  raster_done_ 
)
Value:
const FT_Raster_Funcs class_ = \
{ \
glyph_format_, \
raster_new_, \
raster_reset_, \
raster_set_mode_, \
raster_render_, \
raster_done_ \
};

Definition at line 1031 of file ftobjs.h.

◆ FT_DEFINE_RENDERER

#define FT_DEFINE_RENDERER (   class_,
  flags_,
  size_,
  name_,
  version_,
  requires_,
  interface_,
  init_,
  done_,
  get_interface_,
  glyph_format_,
  render_glyph_,
  transform_glyph_,
  get_glyph_cbox_,
  set_mode_,
  raster_class_ 
)
Value:
FT_CALLBACK_TABLE_DEF \
const FT_Renderer_Class class_ = \
{ \
FT_DEFINE_ROOT_MODULE( flags_, \
size_, \
name_, \
version_, \
requires_, \
interface_, \
init_, \
done_, \
get_interface_ ) \
glyph_format_, \
\
render_glyph_, \
transform_glyph_, \
get_glyph_cbox_, \
set_mode_, \
\
raster_class_ \
};

Definition at line 1108 of file ftobjs.h.

◆ FT_DEFINE_ROOT_MODULE

#define FT_DEFINE_ROOT_MODULE (   flags_,
  size_,
  name_,
  version_,
  requires_,
  interface_,
  init_,
  done_,
  get_interface_ 
)
Value:
{ \
flags_, \
size_, \
\
name_, \
version_, \
requires_, \
\
interface_, \
\
init_, \
done_, \
get_interface_, \
},

Definition at line 1178 of file ftobjs.h.

◆ FT_DRIVER

#define FT_DRIVER (   x)    ( (FT_Driver)(x) )

Definition at line 769 of file ftobjs.h.

◆ FT_DRIVER_CLASS

#define FT_DRIVER_CLASS (   x)    FT_DRIVER( x )->clazz

Definition at line 772 of file ftobjs.h.

◆ FT_DRIVER_HAS_HINTER

#define FT_DRIVER_HAS_HINTER (   x)
Value:
( FT_MODULE_CLASS( x )->module_flags & \
#define FT_MODULE_DRIVER_HAS_HINTER
Definition: ftmodapi.h:118
#define FT_MODULE_CLASS(x)
Definition: ftobjs.h:510
GLint GLint GLint GLint GLint x
Definition: gl.h:1548

Definition at line 533 of file ftobjs.h.

◆ FT_DRIVER_HINTS_LIGHTLY

#define FT_DRIVER_HINTS_LIGHTLY (   x)
Value:
( FT_MODULE_CLASS( x )->module_flags & \
#define FT_MODULE_DRIVER_HINTS_LIGHTLY
Definition: ftmodapi.h:120

Definition at line 536 of file ftobjs.h.

◆ FT_DRIVER_IS_SCALABLE

#define FT_DRIVER_IS_SCALABLE (   x)
Value:
( FT_MODULE_CLASS( x )->module_flags & \
#define FT_MODULE_DRIVER_SCALABLE
Definition: ftmodapi.h:114

Definition at line 527 of file ftobjs.h.

◆ FT_DRIVER_USES_OUTLINES

#define FT_DRIVER_USES_OUTLINES (   x)
Value:
!( FT_MODULE_CLASS( x )->module_flags & \
#define FT_MODULE_DRIVER_NO_OUTLINES
Definition: ftmodapi.h:116

Definition at line 530 of file ftobjs.h.

◆ FT_FACE

#define FT_FACE (   x)    ( (FT_Face)(x) )

Definition at line 597 of file ftobjs.h.

◆ FT_FACE_DRIVER

#define FT_FACE_DRIVER (   x)    FT_FACE( x )->driver

Definition at line 601 of file ftobjs.h.

◆ FT_FACE_LIBRARY

#define FT_FACE_LIBRARY (   x)    FT_FACE_DRIVER( x )->root.library

Definition at line 602 of file ftobjs.h.

◆ FT_FACE_MEMORY

#define FT_FACE_MEMORY (   x)    FT_FACE( x )->memory

Definition at line 603 of file ftobjs.h.

◆ FT_FACE_SIZE

#define FT_FACE_SIZE (   x)    FT_FACE( x )->size

Definition at line 610 of file ftobjs.h.

◆ FT_FACE_SLOT

#define FT_FACE_SLOT (   x)    FT_FACE( x )->glyph

Definition at line 609 of file ftobjs.h.

◆ FT_FACE_STREAM

#define FT_FACE_STREAM (   x)    FT_FACE( x )->stream

Definition at line 604 of file ftobjs.h.

◆ FT_GLYPH

#define FT_GLYPH (   x)    ( (FT_Glyph)(x) )

Definition at line 736 of file ftobjs.h.

◆ FT_GLYPH_OWN_BITMAP

#define FT_GLYPH_OWN_BITMAP   0x1U

Definition at line 421 of file ftobjs.h.

◆ FT_HYPOT

#define FT_HYPOT (   x,
  y 
)
Value:
( x = FT_ABS( x ), \
y = FT_ABS( y ), \
x > y ? x + ( 3 * y >> 3 ) \
: y + ( 3 * x >> 3 ) )
#define FT_ABS(a)
Definition: ftobjs.h:73
GLint GLint GLint GLint GLint GLint y
Definition: gl.h:1548

Definition at line 80 of file ftobjs.h.

◆ ft_isalnum

#define ft_isalnum (   x)    ( ft_isdigit( x ) || ft_isalpha( x ) )

Definition at line 127 of file ftobjs.h.

◆ ft_isalpha

#define ft_isalpha (   x)    ( ft_isupper( x ) || ft_islower( x ) )

Definition at line 126 of file ftobjs.h.

◆ ft_isdigit

#define ft_isdigit (   x)    ( ( (unsigned)(x) - '0' ) < 10U )

Definition at line 116 of file ftobjs.h.

◆ ft_islower

#define ft_islower (   x)    ( ( (unsigned)(x) - 'a' ) < 26U )

Definition at line 124 of file ftobjs.h.

◆ ft_isupper

#define ft_isupper (   x)    ( ( (unsigned)(x) - 'A' ) < 26U )

Definition at line 123 of file ftobjs.h.

◆ ft_isxdigit

#define ft_isxdigit (   x)
Value:
( ( (unsigned)(x) - '0' ) < 10U || \
( (unsigned)(x) - 'a' ) < 6U || \
( (unsigned)(x) - 'A' ) < 6U )
static unsigned(__cdecl *hash_bstr)(bstr_t s)

Definition at line 118 of file ftobjs.h.

◆ FT_MAX

#define FT_MAX (   a,
  b 
)    ( (a) > (b) ? (a) : (b) )

Definition at line 71 of file ftobjs.h.

◆ FT_MIN

#define FT_MIN (   a,
  b 
)    ( (a) < (b) ? (a) : (b) )

Definition at line 70 of file ftobjs.h.

◆ FT_MODULE

#define FT_MODULE (   x)    ( (FT_Module)(x) )

Definition at line 508 of file ftobjs.h.

◆ FT_MODULE_CLASS

#define FT_MODULE_CLASS (   x)    FT_MODULE( x )->clazz

Definition at line 510 of file ftobjs.h.

◆ FT_MODULE_IS_DRIVER

#define FT_MODULE_IS_DRIVER (   x)
Value:
( FT_MODULE_CLASS( x )->module_flags & \
#define FT_MODULE_FONT_DRIVER
Definition: ftmodapi.h:109

Definition at line 515 of file ftobjs.h.

◆ FT_MODULE_IS_HINTER

#define FT_MODULE_IS_HINTER (   x)
Value:
( FT_MODULE_CLASS( x )->module_flags & \
#define FT_MODULE_HINTER
Definition: ftmodapi.h:111

Definition at line 521 of file ftobjs.h.

◆ FT_MODULE_IS_RENDERER

#define FT_MODULE_IS_RENDERER (   x)
Value:
( FT_MODULE_CLASS( x )->module_flags & \
#define FT_MODULE_RENDERER
Definition: ftmodapi.h:110

Definition at line 518 of file ftobjs.h.

◆ FT_MODULE_IS_STYLER

#define FT_MODULE_IS_STYLER (   x)
Value:
( FT_MODULE_CLASS( x )->module_flags & \
#define FT_MODULE_STYLER
Definition: ftmodapi.h:112

Definition at line 524 of file ftobjs.h.

◆ FT_MODULE_LIBRARY

#define FT_MODULE_LIBRARY (   x)    FT_MODULE( x )->library

Definition at line 511 of file ftobjs.h.

◆ FT_MODULE_MEMORY

#define FT_MODULE_MEMORY (   x)    FT_MODULE( x )->memory

Definition at line 512 of file ftobjs.h.

◆ FT_OUTLINE_GLYPH

#define FT_OUTLINE_GLYPH (   x)    ( (FT_OutlineGlyph)(x) )

Definition at line 738 of file ftobjs.h.

◆ FT_PAD_CEIL

#define FT_PAD_CEIL (   x,
  n 
)    FT_PAD_FLOOR( (x) + (n) - 1, n )

Definition at line 89 of file ftobjs.h.

◆ FT_PAD_CEIL_INT32

#define FT_PAD_CEIL_INT32 (   x,
  n 
)
Value:
FT_PAD_FLOOR( ADD_INT32( (x), (n) - 1 ), \
n )
#define ADD_INT32(a, b)
Definition: ftcalc.h:481
#define FT_PAD_FLOOR(x, n)
Definition: ftobjs.h:87
GLdouble n
Definition: glext.h:7729

Definition at line 106 of file ftobjs.h.

◆ FT_PAD_CEIL_LONG

#define FT_PAD_CEIL_LONG (   x,
  n 
)
Value:
FT_PAD_FLOOR( ADD_LONG( (x), (n) - 1 ), \
n )
#define ADD_LONG(a, b)
Definition: ftcalc.h:472

Definition at line 99 of file ftobjs.h.

◆ FT_PAD_FLOOR

#define FT_PAD_FLOOR (   x,
  n 
)    ( (x) & ~FT_TYPEOF( x )( (n) - 1 ) )

Definition at line 87 of file ftobjs.h.

◆ FT_PAD_ROUND

#define FT_PAD_ROUND (   x,
  n 
)    FT_PAD_FLOOR( (x) + (n) / 2, n )

Definition at line 88 of file ftobjs.h.

◆ FT_PAD_ROUND_INT32

#define FT_PAD_ROUND_INT32 (   x,
  n 
)
Value:
FT_PAD_FLOOR( ADD_INT32( (x), (n) / 2 ), \
n )

Definition at line 104 of file ftobjs.h.

◆ FT_PAD_ROUND_LONG

#define FT_PAD_ROUND_LONG (   x,
  n 
)
Value:
FT_PAD_FLOOR( ADD_LONG( (x), (n) / 2 ), \
n )

Definition at line 97 of file ftobjs.h.

◆ FT_PIX_CEIL

#define FT_PIX_CEIL (   x)    FT_PIX_FLOOR( (x) + 63 )

Definition at line 93 of file ftobjs.h.

◆ FT_PIX_CEIL_INT32

#define FT_PIX_CEIL_INT32 (   x)    FT_PIX_FLOOR( ADD_INT32( (x), 63 ) )

Definition at line 109 of file ftobjs.h.

◆ FT_PIX_CEIL_LONG

#define FT_PIX_CEIL_LONG (   x)    FT_PIX_FLOOR( ADD_LONG( (x), 63 ) )

Definition at line 102 of file ftobjs.h.

◆ FT_PIX_FLOOR

#define FT_PIX_FLOOR (   x)    ( (x) & ~FT_TYPEOF( x )63 )

Definition at line 91 of file ftobjs.h.

◆ FT_PIX_ROUND

#define FT_PIX_ROUND (   x)    FT_PIX_FLOOR( (x) + 32 )

Definition at line 92 of file ftobjs.h.

◆ FT_PIX_ROUND_INT32

#define FT_PIX_ROUND_INT32 (   x)    FT_PIX_FLOOR( ADD_INT32( (x), 32 ) )

Definition at line 108 of file ftobjs.h.

◆ FT_PIX_ROUND_LONG

#define FT_PIX_ROUND_LONG (   x)    FT_PIX_FLOOR( ADD_LONG( (x), 32 ) )

Definition at line 101 of file ftobjs.h.

◆ FT_RENDERER

#define FT_RENDERER (   x)    ( (FT_Renderer)(x) )

Definition at line 735 of file ftobjs.h.

◆ FT_REQUEST_HEIGHT

#define FT_REQUEST_HEIGHT (   req)
Value:
( (req)->vertResolution \
? ( (req)->height * (FT_Pos)(req)->vertResolution + 36 ) / 72 \
: (req)->height )
FT_BEGIN_HEADER typedef signed long FT_Pos
Definition: ftimage.h:57

Definition at line 663 of file ftobjs.h.

◆ FT_REQUEST_WIDTH

#define FT_REQUEST_WIDTH (   req)
Value:
( (req)->horiResolution \
? ( (req)->width * (FT_Pos)(req)->horiResolution + 36 ) / 72 \
: (req)->width )

Definition at line 658 of file ftobjs.h.

◆ FT_SIZE

#define FT_SIZE (   x)    ( (FT_Size)(x) )

Definition at line 598 of file ftobjs.h.

◆ FT_SIZE_FACE

#define FT_SIZE_FACE (   x)    FT_SIZE( x )->face

Definition at line 606 of file ftobjs.h.

◆ FT_SLOT

#define FT_SLOT (   x)    ( (FT_GlyphSlot)(x) )

Definition at line 599 of file ftobjs.h.

◆ FT_SLOT_FACE

#define FT_SLOT_FACE (   x)    FT_SLOT( x )->face

Definition at line 607 of file ftobjs.h.

◆ NULL

#define NULL   (void*)0

Definition at line 61 of file ftobjs.h.

◆ TRUE

#define TRUE   1

Definition at line 53 of file ftobjs.h.

Typedef Documentation

◆ FT_CMap

Definition at line 143 of file ftobjs.h.

◆ FT_CMap_CharIndexFunc

typedef FT_UInt(* FT_CMap_CharIndexFunc) (FT_CMap cmap, FT_UInt32 char_code)

Definition at line 174 of file ftobjs.h.

◆ FT_CMap_CharNextFunc

typedef FT_UInt(* FT_CMap_CharNextFunc) (FT_CMap cmap, FT_UInt32 *achar_code)

Definition at line 178 of file ftobjs.h.

◆ FT_CMap_CharVariantListFunc

typedef FT_UInt32 *(* FT_CMap_CharVariantListFunc) (FT_CMap cmap, FT_Memory mem, FT_UInt32 char_code)

Definition at line 197 of file ftobjs.h.

◆ FT_CMap_CharVarIndexFunc

typedef FT_UInt(* FT_CMap_CharVarIndexFunc) (FT_CMap cmap, FT_CMap unicode_cmap, FT_UInt32 char_code, FT_UInt32 variant_selector)

Definition at line 182 of file ftobjs.h.

◆ FT_CMap_CharVarIsDefaultFunc

typedef FT_Int(* FT_CMap_CharVarIsDefaultFunc) (FT_CMap cmap, FT_UInt32 char_code, FT_UInt32 variant_selector)

Definition at line 188 of file ftobjs.h.

◆ FT_CMap_Class

Definition at line 146 of file ftobjs.h.

◆ FT_CMap_ClassRec

◆ FT_CMap_DoneFunc

typedef void(* FT_CMap_DoneFunc) (FT_CMap cmap)

Definition at line 171 of file ftobjs.h.

◆ FT_CMap_InitFunc

typedef FT_Error(* FT_CMap_InitFunc) (FT_CMap cmap, FT_Pointer init_data)

Definition at line 167 of file ftobjs.h.

◆ FT_CMap_VariantCharListFunc

typedef FT_UInt32 *(* FT_CMap_VariantCharListFunc) (FT_CMap cmap, FT_Memory mem, FT_UInt32 variant_selector)

Definition at line 202 of file ftobjs.h.

◆ FT_CMap_VariantListFunc

typedef FT_UInt32 *(* FT_CMap_VariantListFunc) (FT_CMap cmap, FT_Memory mem)

Definition at line 193 of file ftobjs.h.

◆ FT_CMapRec

◆ FT_DriverRec

◆ FT_Face_GetGlyphNameFunc

typedef FT_Error(* FT_Face_GetGlyphNameFunc) (FT_Face face, FT_UInt glyph_index, FT_Pointer buffer, FT_UInt buffer_max)

Definition at line 935 of file ftobjs.h.

◆ FT_Face_GetGlyphNameIndexFunc

typedef FT_UInt(* FT_Face_GetGlyphNameIndexFunc) (FT_Face face, const FT_String *glyph_name)

Definition at line 941 of file ftobjs.h.

◆ FT_Face_GetPostscriptNameFunc

typedef const char *(* FT_Face_GetPostscriptNameFunc) (FT_Face face)

Definition at line 932 of file ftobjs.h.

◆ FT_Face_InternalRec

◆ FT_GlyphSlot_InternalRec

◆ FT_LibraryRec

◆ FT_ModuleRec

◆ FT_RendererRec

◆ FT_Size_InternalRec

Function Documentation

◆ FT_CMap_Done()

FT_CMap_Done ( FT_CMap  cmap)

Definition at line 3631 of file ftobjs.c.

3632 {
3633 if ( cmap )
3634 {
3635 FT_Face face = cmap->charmap.face;
3638 FT_Int i, j;
3639
3640
3641 for ( i = 0; i < face->num_charmaps; i++ )
3642 {
3643 if ( (FT_CMap)face->charmaps[i] == cmap )
3644 {
3645 FT_CharMap last_charmap = face->charmaps[face->num_charmaps - 1];
3646
3647
3648 if ( FT_RENEW_ARRAY( face->charmaps,
3649 face->num_charmaps,
3650 face->num_charmaps - 1 ) )
3651 return;
3652
3653 /* remove it from our list of charmaps */
3654 for ( j = i + 1; j < face->num_charmaps; j++ )
3655 {
3656 if ( j == face->num_charmaps - 1 )
3657 face->charmaps[j - 1] = last_charmap;
3658 else
3659 face->charmaps[j - 1] = face->charmaps[j];
3660 }
3661
3662 face->num_charmaps--;
3663
3664 if ( (FT_CMap)face->charmap == cmap )
3665 face->charmap = NULL;
3666
3667 ft_cmap_done_internal( cmap );
3668
3669 break;
3670 }
3671 }
3672 }
3673 }
#define NULL
Definition: types.h:112
#define FT_RENEW_ARRAY(ptr, curcnt, newcnt)
Definition: ftmemory.h:344
static void ft_cmap_done_internal(FT_CMap cmap)
Definition: ftobjs.c:3616
#define FT_FACE_MEMORY(x)
Definition: ftobjs.h:603
typedefFT_BEGIN_HEADER struct FT_MemoryRec_ * FT_Memory
Definition: ftsystem.h:64
int FT_Error
Definition: fttypes.h:299
signed int FT_Int
Definition: fttypes.h:220
GLenum GLuint GLint GLenum face
Definition: glext.h:7025
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
Definition: glfuncs.h:248
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 GLint GLint j
Definition: glfuncs.h:250
#define error(str)
Definition: mkdosfs.c:1605
static char memory[1024 *256]
Definition: process.c:122
FT_CharMapRec charmap
Definition: ftobjs.h:151
FT_Face face
Definition: freetype.h:819

◆ FT_CMap_New()

FT_CMap_New ( FT_CMap_Class  clazz,
FT_Pointer  init_data,
FT_CharMap  charmap,
FT_CMap acmap 
)

Definition at line 3677 of file ftobjs.c.

3681 {
3683 FT_Face face;
3685 FT_CMap cmap = NULL;
3686
3687
3688 if ( !clazz || !charmap || !charmap->face )
3689 return FT_THROW( Invalid_Argument );
3690
3691 face = charmap->face;
3693
3694 if ( !FT_ALLOC( cmap, clazz->size ) )
3695 {
3696 cmap->charmap = *charmap;
3697 cmap->clazz = clazz;
3698
3699 if ( clazz->init )
3700 {
3701 error = clazz->init( cmap, init_data );
3702 if ( error )
3703 goto Fail;
3704 }
3705
3706 /* add it to our list of charmaps */
3707 if ( FT_RENEW_ARRAY( face->charmaps,
3708 face->num_charmaps,
3709 face->num_charmaps + 1 ) )
3710 goto Fail;
3711
3712 face->charmaps[face->num_charmaps++] = (FT_CharMap)cmap;
3713 }
3714
3715 Exit:
3716 if ( acmap )
3717 *acmap = cmap;
3718
3719 return error;
3720
3721 Fail:
3722 ft_cmap_done_internal( cmap );
3723 cmap = NULL;
3724 goto Exit;
3725 }
WORD face[3]
Definition: mesh.c:4747
int Fail
Definition: ehthrow.cxx:24
struct FT_CharMapRec_ * FT_CharMap
Definition: freetype.h:566
return FT_Err_Ok
Definition: ftbbox.c:526
#define FT_THROW(e)
Definition: ftdebug.h:243
#define FT_ALLOC(ptr, size)
Definition: ftmemory.h:311
static void Exit(void)
Definition: sock.c:1330
FT_CMap_Class clazz
Definition: ftobjs.h:152
FT_ULong size
Definition: ftobjs.h:210
FT_CMap_InitFunc init
Definition: ftobjs.h:212

Referenced by BDF_Face_Init(), cff_face_init(), FNT_Face_Init(), PCF_Face_Init(), pfr_face_init(), sfnt_load_face(), T1_Face_Init(), T42_Face_Init(), and tt_face_build_cmaps().

◆ FT_Done_GlyphSlot()

FT_Done_GlyphSlot ( FT_GlyphSlot  slot)

Definition at line 648 of file ftobjs.c.

649 {
650 if ( slot )
651 {
652 FT_Driver driver = slot->face->driver;
653 FT_Memory memory = driver->root.memory;
654 FT_GlyphSlot prev;
656
657
658 /* Remove slot from its parent face's list */
659 prev = NULL;
660 cur = slot->face->glyph;
661
662 while ( cur )
663 {
664 if ( cur == slot )
665 {
666 if ( !prev )
667 slot->face->glyph = cur->next;
668 else
669 prev->next = cur->next;
670
671 /* finalize client-specific data */
672 if ( slot->generic.finalizer )
673 slot->generic.finalizer( slot );
674
676 FT_FREE( slot );
677 break;
678 }
679 prev = cur;
680 cur = cur->next;
681 }
682 }
683 }
#define FT_FREE(ptr)
Definition: ftmemory.h:337
static void ft_glyphslot_done(FT_GlyphSlot slot)
Definition: ftobjs.c:564
FxCollectionEntry * cur
struct @1789::@1790 driver
FT_GlyphSlot next
Definition: freetype.h:1875
Definition: vfat.h:185

Referenced by destroy_face(), FT_Render_Glyph_Internal(), and T42_GlyphSlot_Done().

◆ FT_Done_Memory()

FT_Done_Memory ( FT_Memory  memory)

Definition at line 324 of file ftsystem.c.

325 {
326#ifdef FT_DEBUG_MEMORY
327 ft_mem_debug_done( memory );
328#endif
329 ft_sfree( memory );
330 }
#define ft_sfree
Definition: ftstdlib.h:133

Referenced by FT_Done_FreeType(), and FT_Init_FreeType().

◆ FT_EXPORT_VAR()

FT_EXPORT_VAR ( FT_Raster_Funcs  )

◆ FT_Get_Module_Interface()

FT_Get_Module_Interface ( FT_Library  library,
const char mod_name 
)

Definition at line 5012 of file ftobjs.c.

5014 {
5016
5017
5018 /* test for valid `library' delayed to FT_Get_Module() */
5019
5020 module = FT_Get_Module( library, mod_name );
5021
5022 return module ? module->clazz->module_interface : 0;
5023 }
FT_Library library
Definition: cffdrivr.c:660
FT_Get_Module(FT_Library library, const char *module_name)
Definition: ftobjs.c:4984

Referenced by cff_face_init(), cff_parser_run(), cid_face_init(), sfnt_init_face(), T1_Face_Init(), T42_Face_Init(), and tt_face_init().

◆ ft_glyphslot_alloc_bitmap()

ft_glyphslot_alloc_bitmap ( FT_GlyphSlot  slot,
FT_ULong  size 
)

Definition at line 514 of file ftobjs.c.

516 {
519
520
521 if ( slot->internal->flags & FT_GLYPH_OWN_BITMAP )
522 FT_FREE( slot->bitmap.buffer );
523 else
524 slot->internal->flags |= FT_GLYPH_OWN_BITMAP;
525
526 (void)FT_ALLOC( slot->bitmap.buffer, size );
527 return error;
528 }
#define FT_GLYPH_OWN_BITMAP
Definition: ftobjs.h:421
GLsizeiptr size
Definition: glext.h:5919

Referenced by PCF_Glyph_Load().

◆ ft_glyphslot_free_bitmap()

ft_glyphslot_free_bitmap ( FT_GlyphSlot  slot)

Definition at line 325 of file ftobjs.c.

326 {
327 if ( slot->internal && ( slot->internal->flags & FT_GLYPH_OWN_BITMAP ) )
328 {
330
331
332 FT_FREE( slot->bitmap.buffer );
333 slot->internal->flags &= ~FT_GLYPH_OWN_BITMAP;
334 }
335 else
336 {
337 /* assume that the bitmap buffer was stolen or not */
338 /* allocated from the heap */
339 slot->bitmap.buffer = NULL;
340 }
341 }

Referenced by ft_glyphslot_clear(), ft_glyphslot_done(), ft_glyphslot_set_bitmap(), and t42_glyphslot_clear().

◆ ft_glyphslot_preset_bitmap()

ft_glyphslot_preset_bitmap ( FT_GlyphSlot  slot,
FT_Render_Mode  mode,
const FT_Vector origin 
)

Definition at line 347 of file ftobjs.c.

350 {
351 FT_Outline* outline = &slot->outline;
352 FT_Bitmap* bitmap = &slot->bitmap;
353
354 FT_Pixel_Mode pixel_mode;
355
356 FT_BBox cbox, pbox;
357 FT_Pos x_shift = 0;
358 FT_Pos y_shift = 0;
359 FT_Pos x_left, y_top;
360 FT_Pos width, height, pitch;
361
362
363 if ( slot->format != FT_GLYPH_FORMAT_OUTLINE )
364 return 1;
365
366 if ( origin )
367 {
368 x_shift = origin->x;
369 y_shift = origin->y;
370 }
371
372 /* compute the control box, and grid-fit it, */
373 /* taking into account the origin shift */
375
376 /* rough estimate of pixel box */
377 pbox.xMin = ( cbox.xMin >> 6 ) + ( x_shift >> 6 );
378 pbox.yMin = ( cbox.yMin >> 6 ) + ( y_shift >> 6 );
379 pbox.xMax = ( cbox.xMax >> 6 ) + ( x_shift >> 6 );
380 pbox.yMax = ( cbox.yMax >> 6 ) + ( y_shift >> 6 );
381
382 /* tiny remainder box */
383 cbox.xMin = ( cbox.xMin & 63 ) + ( x_shift & 63 );
384 cbox.yMin = ( cbox.yMin & 63 ) + ( y_shift & 63 );
385 cbox.xMax = ( cbox.xMax & 63 ) + ( x_shift & 63 );
386 cbox.yMax = ( cbox.yMax & 63 ) + ( y_shift & 63 );
387
388 switch ( mode )
389 {
391 pixel_mode = FT_PIXEL_MODE_MONO;
392#if 1
393 /* x */
394
395 /* undocumented but confirmed: bbox values get rounded; */
396 /* we do asymmetric rounding so that the center of a pixel */
397 /* gets always included */
398
399 pbox.xMin += ( cbox.xMin + 31 ) >> 6;
400 pbox.xMax += ( cbox.xMax + 32 ) >> 6;
401
402 /* if the bbox collapsed, we add a pixel based on the total */
403 /* rounding remainder to cover most of the original cbox */
404
405 if ( pbox.xMin == pbox.xMax )
406 {
407 if ( ( ( cbox.xMin + 31 ) & 63 ) - 31 +
408 ( ( cbox.xMax + 32 ) & 63 ) - 32 < 0 )
409 pbox.xMin -= 1;
410 else
411 pbox.xMax += 1;
412 }
413
414 /* y */
415
416 pbox.yMin += ( cbox.yMin + 31 ) >> 6;
417 pbox.yMax += ( cbox.yMax + 32 ) >> 6;
418
419 if ( pbox.yMin == pbox.yMax )
420 {
421 if ( ( ( cbox.yMin + 31 ) & 63 ) - 31 +
422 ( ( cbox.yMax + 32 ) & 63 ) - 32 < 0 )
423 pbox.yMin -= 1;
424 else
425 pbox.yMax += 1;
426 }
427
428 break;
429#else
430 goto Adjust;
431#endif
432
434 pixel_mode = FT_PIXEL_MODE_LCD;
435 ft_lcd_padding( &cbox, slot, mode );
436 goto Adjust;
437
439 pixel_mode = FT_PIXEL_MODE_LCD_V;
440 ft_lcd_padding( &cbox, slot, mode );
441 goto Adjust;
442
445 default:
446 pixel_mode = FT_PIXEL_MODE_GRAY;
447 Adjust:
448 pbox.xMin += cbox.xMin >> 6;
449 pbox.yMin += cbox.yMin >> 6;
450 pbox.xMax += ( cbox.xMax + 63 ) >> 6;
451 pbox.yMax += ( cbox.yMax + 63 ) >> 6;
452 }
453
454 x_left = pbox.xMin;
455 y_top = pbox.yMax;
456
457 width = pbox.xMax - pbox.xMin;
458 height = pbox.yMax - pbox.yMin;
459
460 switch ( pixel_mode )
461 {
463 pitch = ( ( width + 15 ) >> 4 ) << 1;
464 break;
465
467 width *= 3;
468 pitch = FT_PAD_CEIL( width, 4 );
469 break;
470
472 height *= 3;
473 /* fall through */
474
476 default:
477 pitch = width;
478 }
479
480 slot->bitmap_left = (FT_Int)x_left;
481 slot->bitmap_top = (FT_Int)y_top;
482
483 bitmap->pixel_mode = (unsigned char)pixel_mode;
484 bitmap->num_grays = 256;
485 bitmap->width = (unsigned int)width;
486 bitmap->rows = (unsigned int)height;
487 bitmap->pitch = pitch;
488
489 if ( pbox.xMin < -0x8000 || pbox.xMax > 0x7FFF ||
490 pbox.yMin < -0x8000 || pbox.yMax > 0x7FFF )
491 {
492 FT_TRACE3(( "ft_glyphslot_preset_bitmap: [%ld %ld %ld %ld]\n",
493 pbox.xMin, pbox.yMin, pbox.xMax, pbox.yMax ));
494 return 1;
495 }
496
497 return 0;
498 }
unsigned char
Definition: typeof.h:29
unsigned int(__cdecl typeof(jpeg_read_scanlines))(struct jpeg_decompress_struct *
Definition: typeof.h:31
@ FT_RENDER_MODE_MONO
Definition: freetype.h:3251
@ FT_RENDER_MODE_NORMAL
Definition: freetype.h:3249
@ FT_RENDER_MODE_LIGHT
Definition: freetype.h:3250
@ FT_RENDER_MODE_LCD_V
Definition: freetype.h:3253
@ FT_RENDER_MODE_LCD
Definition: freetype.h:3252
#define FT_TRACE3(varformat)
Definition: ftdebug.h:190
@ FT_PIXEL_MODE_LCD_V
Definition: ftimage.h:188
@ FT_PIXEL_MODE_MONO
Definition: ftimage.h:183
@ FT_PIXEL_MODE_GRAY
Definition: ftimage.h:184
@ FT_PIXEL_MODE_LCD
Definition: ftimage.h:187
enum FT_Pixel_Mode_ FT_Pixel_Mode
ft_lcd_padding(FT_BBox *cbox, FT_GlyphSlot slot, FT_Render_Mode mode)
Definition: ftlcdfil.c:372
#define FT_PAD_CEIL(x, n)
Definition: ftobjs.h:89
FT_Outline_Get_CBox(const FT_Outline *outline, FT_BBox *acbox)
Definition: ftoutln.c:457
GLint GLint GLsizei GLsizei height
Definition: gl.h:1546
GLint GLint GLsizei width
Definition: gl.h:1546
GLenum mode
Definition: glext.h:6217
voidpf uLong int origin
Definition: ioapi.h:144
static LONGLONG Adjust(LONGLONG value, const LONGLONG *pModifier, DWORD dwFlags)
Definition: seeking.c:201
FT_Pos xMin
Definition: ftimage.h:120
FT_Pos yMax
Definition: ftimage.h:121
FT_Pos yMin
Definition: ftimage.h:120
FT_Pos xMax
Definition: ftimage.h:121
Definition: uimain.c:89
uint32 width
Definition: uimain.c:91
Definition: mesh.c:5330

Referenced by FT_Load_Glyph(), ft_raster1_render(), and ft_smooth_render().

◆ ft_glyphslot_set_bitmap()

ft_glyphslot_set_bitmap ( FT_GlyphSlot  slot,
FT_Byte buffer 
)

Definition at line 502 of file ftobjs.c.

504 {
506
507 slot->bitmap.buffer = buffer;
508
509 FT_ASSERT( (slot->internal->flags & FT_GLYPH_OWN_BITMAP) == 0 );
510 }
#define FT_ASSERT(condition)
Definition: ftdebug.h:241
ft_glyphslot_free_bitmap(FT_GlyphSlot slot)
Definition: ftobjs.c:325
GLuint buffer
Definition: glext.h:5915

Referenced by BDF_Glyph_Load().

◆ ft_lcd_padding()

ft_lcd_padding ( FT_BBox cbox,
FT_GlyphSlot  slot,
FT_Render_Mode  mode 
)

Definition at line 372 of file ftlcdfil.c.

375 {
376 FT_Vector* sub = slot->library->lcd_geometry;
377
378 if ( mode == FT_RENDER_MODE_LCD )
379 {
380 cbox->xMin -= FT_MAX( FT_MAX( sub[0].x, sub[1].x ), sub[2].x );
381 cbox->xMax -= FT_MIN( FT_MIN( sub[0].x, sub[1].x ), sub[2].x );
382 cbox->yMin -= FT_MAX( FT_MAX( sub[0].y, sub[1].y ), sub[2].y );
383 cbox->yMax -= FT_MIN( FT_MIN( sub[0].y, sub[1].y ), sub[2].y );
384 }
385 else if ( mode == FT_RENDER_MODE_LCD_V )
386 {
387 cbox->xMin -= FT_MAX( FT_MAX( sub[0].y, sub[1].y ), sub[2].y );
388 cbox->xMax -= FT_MIN( FT_MIN( sub[0].y, sub[1].y ), sub[2].y );
389 cbox->yMin += FT_MIN( FT_MIN( sub[0].x, sub[1].x ), sub[2].x );
390 cbox->yMax += FT_MAX( FT_MAX( sub[0].x, sub[1].x ), sub[2].x );
391 }
392 }
#define FT_MIN(a, b)
Definition: ftobjs.h:70
#define FT_MAX(a, b)
Definition: ftobjs.h:71

Referenced by ft_glyphslot_preset_bitmap().

◆ FT_Lookup_Renderer()

FT_Lookup_Renderer ( FT_Library  library,
FT_Glyph_Format  format,
FT_ListNode node 
)

Definition at line 4327 of file ftobjs.c.

4330 {
4333
4334
4335 if ( !library )
4336 goto Exit;
4337
4339
4340 if ( node )
4341 {
4342 if ( *node )
4343 cur = (*node)->next;
4344 *node = NULL;
4345 }
4346
4347 while ( cur )
4348 {
4349 FT_Renderer renderer = FT_RENDERER( cur->data );
4350
4351
4352 if ( renderer->glyph_format == format )
4353 {
4354 if ( node )
4355 *node = cur;
4356
4357 result = renderer;
4358 break;
4359 }
4360 cur = cur->next;
4361 }
4362
4363 Exit:
4364 return result;
4365 }
#define FT_RENDERER(x)
Definition: ftobjs.h:735
GLuint64EXT * result
Definition: glext.h:11304
FT_ListRec renderers
Definition: ftobjs.h:904
FT_ListNode head
Definition: fttypes.h:582
FT_Glyph_Format glyph_format
Definition: ftobjs.h:745
Definition: format.c:58
Definition: dlist.c:348

Referenced by FT_Get_Renderer(), ft_lookup_glyph_renderer(), FT_New_Glyph(), FT_Outline_Render(), FT_Render_Glyph_Internal(), and ft_set_current_renderer().

◆ FT_Match_Size()

FT_Match_Size ( FT_Face  face,
FT_Size_Request  req,
FT_Bool  ignore_width,
FT_ULong size_index 
)

Definition at line 2939 of file ftobjs.c.

2943 {
2944 FT_Int i;
2945 FT_Long w, h;
2946
2947
2948 if ( !FT_HAS_FIXED_SIZES( face ) )
2949 return FT_THROW( Invalid_Face_Handle );
2950
2951 /* FT_Bitmap_Size doesn't provide enough info... */
2952 if ( req->type != FT_SIZE_REQUEST_TYPE_NOMINAL )
2953 return FT_THROW( Unimplemented_Feature );
2954
2955 w = FT_REQUEST_WIDTH ( req );
2956 h = FT_REQUEST_HEIGHT( req );
2957
2958 if ( req->width && !req->height )
2959 h = w;
2960 else if ( !req->width && req->height )
2961 w = h;
2962
2963 w = FT_PIX_ROUND( w );
2964 h = FT_PIX_ROUND( h );
2965
2966 if ( !w || !h )
2967 return FT_THROW( Invalid_Pixel_Size );
2968
2969 for ( i = 0; i < face->num_fixed_sizes; i++ )
2970 {
2971 FT_Bitmap_Size* bsize = face->available_sizes + i;
2972
2973
2974 if ( h != FT_PIX_ROUND( bsize->y_ppem ) )
2975 continue;
2976
2977 if ( w == FT_PIX_ROUND( bsize->x_ppem ) || ignore_width )
2978 {
2979 FT_TRACE3(( "FT_Match_Size: bitmap strike %d matches\n", i ));
2980
2981 if ( size_index )
2982 *size_index = (FT_ULong)i;
2983
2984 return FT_Err_Ok;
2985 }
2986 }
2987
2988 FT_TRACE3(( "FT_Match_Size: no matching bitmap strike\n" ));
2989
2990 return FT_THROW( Invalid_Pixel_Size );
2991 }
@ FT_SIZE_REQUEST_TYPE_NOMINAL
Definition: freetype.h:2552
#define FT_HAS_FIXED_SIZES(face)
Definition: freetype.h:1320
#define FT_REQUEST_WIDTH(req)
Definition: ftobjs.h:658
#define FT_REQUEST_HEIGHT(req)
Definition: ftobjs.h:663
#define FT_PIX_ROUND(x)
Definition: ftobjs.h:92
unsigned long FT_ULong
Definition: fttypes.h:253
signed long FT_Long
Definition: fttypes.h:242
GLubyte GLubyte GLubyte GLubyte w
Definition: glext.h:6102
GLfloat GLfloat GLfloat GLfloat h
Definition: glext.h:7723
FT_Pos y_ppem
Definition: freetype.h:363
FT_Pos x_ppem
Definition: freetype.h:362
FT_Size_Request_Type type
Definition: freetype.h:2604

Referenced by FT_Request_Size().

◆ ft_module_get_service()

ft_module_get_service ( FT_Module  module,
const char service_id,
FT_Bool  global 
)

Definition at line 5027 of file ftobjs.c.

5030 {
5032
5033
5034 if ( module )
5035 {
5036 FT_ASSERT( module->clazz && module->clazz->get_interface );
5037
5038 /* first, look for the service in the module */
5039 if ( module->clazz->get_interface )
5040 result = module->clazz->get_interface( module, service_id );
5041
5042 if ( global && !result )
5043 {
5044 /* we didn't find it, look in all other modules then */
5045 FT_Library library = module->library;
5048
5049
5050 for ( ; cur < limit; cur++ )
5051 {
5052 if ( cur[0] != module )
5053 {
5054 FT_ASSERT( cur[0]->clazz );
5055
5056 if ( cur[0]->clazz->get_interface )
5057 {
5058 result = cur[0]->clazz->get_interface( cur[0], service_id );
5059 if ( result )
5060 break;
5061 }
5062 }
5063 }
5064 }
5065 }
5066
5067 return result;
5068 }
int global
Definition: ehframes.cpp:22
GLint limit
Definition: glext.h:10326
FT_Module modules[FT_MAX_MODULES]
Definition: ftobjs.h:902
FT_UInt num_modules
Definition: ftobjs.h:901

Referenced by cff_get_glyph_name(), cff_get_name_index(), FT_DEFINE_SERVICE_PSINFOREC(), FT_Get_TrueType_Engine_Type(), if(), and sfnt_init_face().

◆ FT_New_GlyphSlot()

FT_New_GlyphSlot ( FT_Face  face,
FT_GlyphSlot aslot 
)

Definition at line 595 of file ftobjs.c.

597 {
600 FT_Driver_Class clazz;
603
604
605 if ( !face )
606 return FT_THROW( Invalid_Face_Handle );
607
608 if ( !face->driver )
609 return FT_THROW( Invalid_Argument );
610
611 driver = face->driver;
612 clazz = driver->clazz;
613 memory = driver->root.memory;
614
615 FT_TRACE4(( "FT_New_GlyphSlot: Creating new slot object\n" ));
616 if ( !FT_ALLOC( slot, clazz->slot_object_size ) )
617 {
618 slot->face = face;
619
621 if ( error )
622 {
624 FT_FREE( slot );
625 goto Exit;
626 }
627
628 slot->next = face->glyph;
629 face->glyph = slot;
630
631 if ( aslot )
632 *aslot = slot;
633 }
634 else if ( aslot )
635 *aslot = NULL;
636
637
638 Exit:
639 FT_TRACE4(( "FT_New_GlyphSlot: Return 0x%x\n", error ));
640
641 return error;
642 }
#define FT_TRACE4(varformat)
Definition: ftdebug.h:191
static FT_Error ft_glyphslot_init(FT_GlyphSlot slot)
Definition: ftobjs.c:297
FT_Long slot_object_size
Definition: ftdrv.h:170
struct _slot slot
Definition: vfat.h:196

Referenced by ft_open_face_internal(), FT_Render_Glyph_Internal(), and T42_GlyphSlot_Init().

◆ FT_New_Memory()

FT_New_Memory ( void  )

Definition at line 300 of file ftsystem.c.

301 {
303
304
305 memory = (FT_Memory)ft_smalloc( sizeof ( *memory ) );
306 if ( memory )
307 {
308 memory->user = NULL;
309 memory->alloc = ft_alloc;
310 memory->realloc = ft_realloc;
311 memory->free = ft_free;
312#ifdef FT_DEBUG_MEMORY
313 ft_mem_debug_init( memory );
314#endif
315 }
316
317 return memory;
318 }
#define ft_smalloc
Definition: ftstdlib.h:134
ft_realloc(FT_Memory memory, long cur_size, long new_size, void *block)
Definition: ftsystem.c:105
ft_free(FT_Memory memory, void *block)
Definition: ftsystem.c:133
ft_alloc(FT_Memory memory, long size)
Definition: ftsystem.c:71

Referenced by FT_Init_FreeType().

◆ FT_Render_Glyph_Internal()

FT_Render_Glyph_Internal ( FT_Library  library,
FT_GlyphSlot  slot,
FT_Render_Mode  render_mode 
)

Definition at line 4548 of file ftobjs.c.

4551 {
4553 FT_Face face = slot->face;
4554 FT_Renderer renderer;
4555
4556
4557 switch ( slot->format )
4558 {
4559 case FT_GLYPH_FORMAT_BITMAP: /* already a bitmap, don't do anything */
4560 break;
4561
4562 default:
4563 if ( slot->internal->load_flags & FT_LOAD_COLOR )
4564 {
4566
4567 FT_UInt base_glyph = slot->glyph_index;
4568
4569 FT_Bool have_layers;
4570 FT_UInt glyph_index;
4571 FT_UInt color_index;
4572
4573
4574 /* check whether we have colored glyph layers */
4575 iterator.p = NULL;
4576 have_layers = FT_Get_Color_Glyph_Layer( face,
4577 base_glyph,
4578 &glyph_index,
4579 &color_index,
4580 &iterator );
4581 if ( have_layers )
4582 {
4584 if ( !error )
4585 {
4586 TT_Face ttface = (TT_Face)face;
4588
4589
4590 do
4591 {
4592 FT_Int32 load_flags = slot->internal->load_flags;
4593
4594
4595 /* disable the `FT_LOAD_COLOR' flag to avoid recursion */
4596 /* right here in this function */
4597 load_flags &= ~FT_LOAD_COLOR;
4598
4599 /* render into the new `face->glyph' glyph slot */
4600 load_flags |= FT_LOAD_RENDER;
4601
4602 error = FT_Load_Glyph( face, glyph_index, load_flags );
4603 if ( error )
4604 break;
4605
4606 /* blend new `face->glyph' into old `slot'; */
4607 /* at the first call, `slot' is still empty */
4608 error = sfnt->colr_blend( ttface,
4609 color_index,
4610 slot,
4611 face->glyph );
4612 if ( error )
4613 break;
4614
4615 } while ( FT_Get_Color_Glyph_Layer( face,
4616 base_glyph,
4617 &glyph_index,
4618 &color_index,
4619 &iterator ) );
4620
4621 if ( !error )
4622 slot->format = FT_GLYPH_FORMAT_BITMAP;
4623
4624 /* this call also restores `slot' as the glyph slot */
4625 FT_Done_GlyphSlot( face->glyph );
4626 }
4627
4628 if ( !error )
4629 return error;
4630
4631 /* Failed to do the colored layer. Draw outline instead. */
4632 slot->format = FT_GLYPH_FORMAT_OUTLINE;
4633 }
4634 }
4635
4636 {
4638
4639
4640 /* small shortcut for the very common case */
4641 if ( slot->format == FT_GLYPH_FORMAT_OUTLINE )
4642 {
4643 renderer = library->cur_renderer;
4645 }
4646 else
4647 renderer = FT_Lookup_Renderer( library, slot->format, &node );
4648
4649 error = FT_ERR( Unimplemented_Feature );
4650 while ( renderer )
4651 {
4652 error = renderer->render( renderer, slot, render_mode, NULL );
4653 if ( !error ||
4654 FT_ERR_NEQ( error, Cannot_Render_Glyph ) )
4655 break;
4656
4657 /* FT_Err_Cannot_Render_Glyph is returned if the render mode */
4658 /* is unsupported by the current renderer for this glyph image */
4659 /* format. */
4660
4661 /* now, look for another renderer that supports the same */
4662 /* format. */
4663 renderer = FT_Lookup_Renderer( library, slot->format, &node );
4664 }
4665 }
4666 }
4667
4668#ifdef FT_DEBUG_LEVEL_TRACE
4669
4670#undef FT_COMPONENT
4671#define FT_COMPONENT checksum
4672
4673 /*
4674 * Computing the MD5 checksum is expensive, unnecessarily distorting a
4675 * possible profiling of FreeType if compiled with tracing support. For
4676 * this reason, we execute the following code only if explicitly
4677 * requested.
4678 */
4679
4680 /* we use FT_TRACE3 in this block */
4681 if ( !error &&
4682 ft_trace_levels[trace_checksum] >= 3 &&
4683 slot->bitmap.buffer )
4684 {
4686 FT_Error err;
4687
4688
4690
4691 /* we convert to a single bitmap format for computing the checksum */
4692 /* this also converts the bitmap flow to `down' (i.e., pitch > 0) */
4693 err = FT_Bitmap_Convert( library, &slot->bitmap, &bitmap, 1 );
4694 if ( !err )
4695 {
4696 MD5_CTX ctx;
4697 unsigned char md5[16];
4698 unsigned long coverage = 0;
4699 int i, j;
4700 int rows = (int)bitmap.rows;
4701 int pitch = bitmap.pitch;
4702
4703
4704 FT_TRACE3(( "FT_Render_Glyph: bitmap %dx%d, %s (mode %d)\n",
4705 pitch,
4706 rows,
4707 pixel_modes[slot->bitmap.pixel_mode],
4708 slot->bitmap.pixel_mode ));
4709
4710 for ( i = 0; i < rows; i++ )
4711 for ( j = 0; j < pitch; j++ )
4712 coverage += bitmap.buffer[i * pitch + j];
4713
4714 FT_TRACE3(( " Total coverage: %lu\n", coverage ));
4715
4716 MD5_Init( &ctx );
4717 if ( bitmap.buffer )
4718 MD5_Update( &ctx, bitmap.buffer,
4719 (unsigned long)rows * (unsigned long)pitch );
4720 MD5_Final( md5, &ctx );
4721
4722 FT_TRACE3(( " MD5 checksum: " ));
4723 for ( i = 0; i < 16; i++ )
4724 FT_TRACE3(( "%02X", md5[i] ));
4725 FT_TRACE3(( "\n" ));
4726 }
4727
4729 }
4730
4731 /*
4732 * Dump bitmap in Netpbm format (PBM or PGM).
4733 */
4734
4735 /* we use FT_TRACE7 in this block */
4736 if ( !error &&
4737 ft_trace_levels[trace_checksum] >= 7 )
4738 {
4739 if ( slot->bitmap.rows < 128U &&
4740 slot->bitmap.width < 128U &&
4741 slot->bitmap.buffer )
4742 {
4743 int rows = (int)slot->bitmap.rows;
4744 int width = (int)slot->bitmap.width;
4745 int pitch = slot->bitmap.pitch;
4746 int i, j, m;
4747
4748 unsigned char* topleft = slot->bitmap.buffer;
4749
4750
4751 if ( pitch < 0 )
4752 topleft -= pitch * ( rows - 1 );
4753
4754 FT_TRACE7(( "Netpbm image: start\n" ));
4755 switch ( slot->bitmap.pixel_mode )
4756 {
4757 case FT_PIXEL_MODE_MONO:
4758 FT_TRACE7(( "P1 %d %d\n", width, rows ));
4759 for ( i = 0; i < rows; i++ )
4760 {
4761 for ( j = 0; j < width; )
4762 for ( m = 128; m > 0 && j < width; m >>= 1, j++ )
4763 FT_TRACE7(( " %d",
4764 ( topleft[i * pitch + j / 8] & m ) != 0 ));
4765 FT_TRACE7(( "\n" ));
4766 }
4767 break;
4768
4769 default:
4770 FT_TRACE7(( "P2 %d %d 255\n", width, rows ));
4771 for ( i = 0; i < rows; i++ )
4772 {
4773 for ( j = 0; j < width; j += 1 )
4774 FT_TRACE7(( " %3u", topleft[i * pitch + j] ));
4775 FT_TRACE7(( "\n" ));
4776 }
4777 }
4778 FT_TRACE7(( "Netpbm image: end\n" ));
4779 }
4780 else
4781 FT_TRACE7(( "Netpbm image: too large, omitted\n" ));
4782 }
4783
4784#undef FT_COMPONENT
4785#define FT_COMPONENT objs
4786
4787#endif /* FT_DEBUG_LEVEL_TRACE */
4788
4789 return error;
4790 }
#define md5
Definition: compat-1.3.h:2034
#define FT_LOAD_RENDER
Definition: freetype.h:3024
#define FT_LOAD_COLOR
Definition: freetype.h:3037
FT_Bitmap_Convert(FT_Library library, const FT_Bitmap *source, FT_Bitmap *target, FT_Int alignment)
Definition: ftbitmap.c:523
FT_BEGIN_HEADER FT_Bitmap_Init(FT_Bitmap *abitmap)
Definition: ftbitmap.c:43
FT_Bitmap_Done(FT_Library library, FT_Bitmap *bitmap)
Definition: ftbitmap.c:1197
#define FT_TRACE7(varformat)
Definition: ftdebug.h:194
FT_Load_Glyph(FT_Face face, FT_UInt glyph_index, FT_Int32 load_flags)
Definition: ftobjs.c:796
FT_New_GlyphSlot(FT_Face face, FT_GlyphSlot *aslot)
Definition: ftobjs.c:595
FT_Get_Color_Glyph_Layer(FT_Face face, FT_UInt base_glyph, FT_UInt *aglyph_index, FT_UInt *acolor_index, FT_LayerIterator *iterator)
Definition: ftobjs.c:5536
FT_Done_GlyphSlot(FT_GlyphSlot slot)
Definition: ftobjs.c:648
FT_Lookup_Renderer(FT_Library library, FT_Glyph_Format format, FT_ListNode *node)
Definition: ftobjs.c:4327
FT_BEGIN_HEADER typedef unsigned char FT_Bool
Definition: fttypes.h:108
#define FT_ERR_NEQ(x, e)
Definition: fttypes.h:606
#define FT_ERR(e)
Definition: fttypes.h:599
unsigned int FT_UInt
Definition: fttypes.h:231
const GLfloat * m
Definition: glext.h:10848
#define err(...)
void MD5_Init(MD5_CTX *ctx)
Definition: md5.c:207
void MD5_Update(MD5_CTX *ctx, const void *data, unsigned long size)
Definition: md5.c:218
void MD5_Final(unsigned char *result, MD5_CTX *ctx)
Definition: md5.c:258
SFNT_Interface * SFNT_Service
Definition: sfnt.h:784
FT_Renderer cur_renderer
Definition: ftobjs.h:905
FT_Renderer_RenderFunc render
Definition: ftobjs.h:750
TT_Blend_Colr_Func colr_blend
Definition: sfnt.h:773
void * sfnt
Definition: tttypes.h:1499
SFNT_Service sfnt
Definition: ttdriver.c:208
struct TT_FaceRec_ * TT_Face
Definition: tttypes.h:988

Referenced by FT_Glyph_To_Bitmap(), and FT_Render_Glyph().

◆ FT_Request_Metrics()

FT_Request_Metrics ( FT_Face  face,
FT_Size_Request  req 
)

Definition at line 3092 of file ftobjs.c.

3094 {
3096
3097
3098 metrics = &face->size->metrics;
3099
3100 if ( FT_IS_SCALABLE( face ) )
3101 {
3102 FT_Long w = 0, h = 0, scaled_w = 0, scaled_h = 0;
3103
3104
3105 switch ( req->type )
3106 {
3108 w = h = face->units_per_EM;
3109 break;
3110
3112 w = h = face->ascender - face->descender;
3113 break;
3114
3116 w = face->bbox.xMax - face->bbox.xMin;
3117 h = face->bbox.yMax - face->bbox.yMin;
3118 break;
3119
3121 w = face->max_advance_width;
3122 h = face->ascender - face->descender;
3123 break;
3124
3126 metrics->x_scale = (FT_Fixed)req->width;
3127 metrics->y_scale = (FT_Fixed)req->height;
3128 if ( !metrics->x_scale )
3129 metrics->x_scale = metrics->y_scale;
3130 else if ( !metrics->y_scale )
3131 metrics->y_scale = metrics->x_scale;
3132 goto Calculate_Ppem;
3133
3135 break;
3136 }
3137
3138 /* to be on the safe side */
3139 if ( w < 0 )
3140 w = -w;
3141
3142 if ( h < 0 )
3143 h = -h;
3144
3145 scaled_w = FT_REQUEST_WIDTH ( req );
3146 scaled_h = FT_REQUEST_HEIGHT( req );
3147
3148 /* determine scales */
3149 if ( req->width )
3150 {
3151 metrics->x_scale = FT_DivFix( scaled_w, w );
3152
3153 if ( req->height )
3154 {
3155 metrics->y_scale = FT_DivFix( scaled_h, h );
3156
3157 if ( req->type == FT_SIZE_REQUEST_TYPE_CELL )
3158 {
3159 if ( metrics->y_scale > metrics->x_scale )
3160 metrics->y_scale = metrics->x_scale;
3161 else
3162 metrics->x_scale = metrics->y_scale;
3163 }
3164 }
3165 else
3166 {
3167 metrics->y_scale = metrics->x_scale;
3168 scaled_h = FT_MulDiv( scaled_w, h, w );
3169 }
3170 }
3171 else
3172 {
3173 metrics->x_scale = metrics->y_scale = FT_DivFix( scaled_h, h );
3174 scaled_w = FT_MulDiv( scaled_h, w, h );
3175 }
3176
3177 Calculate_Ppem:
3178 /* calculate the ppems */
3179 if ( req->type != FT_SIZE_REQUEST_TYPE_NOMINAL )
3180 {
3181 scaled_w = FT_MulFix( face->units_per_EM, metrics->x_scale );
3182 scaled_h = FT_MulFix( face->units_per_EM, metrics->y_scale );
3183 }
3184
3185 metrics->x_ppem = (FT_UShort)( ( scaled_w + 32 ) >> 6 );
3186 metrics->y_ppem = (FT_UShort)( ( scaled_h + 32 ) >> 6 );
3187
3189 }
3190 else
3191 {
3192 FT_ZERO( metrics );
3193 metrics->x_scale = 1L << 16;
3194 metrics->y_scale = 1L << 16;
3195 }
3196 }
@ FT_SIZE_REQUEST_TYPE_BBOX
Definition: freetype.h:2554
@ FT_SIZE_REQUEST_TYPE_REAL_DIM
Definition: freetype.h:2553
@ FT_SIZE_REQUEST_TYPE_SCALES
Definition: freetype.h:2556
@ FT_SIZE_REQUEST_TYPE_MAX
Definition: freetype.h:2558
@ FT_SIZE_REQUEST_TYPE_CELL
Definition: freetype.h:2555
FT_DivFix(FT_Long a, FT_Long b)
Definition: ftcalc.c:607
#define FT_IS_SCALABLE(face)
Definition: freetype.h:1271
FT_MulDiv(FT_Long a, FT_Long b, FT_Long c)
Definition: ftcalc.c:415
FT_MulFix(FT_Long a, FT_Long b)
Definition: ftcalc.c:508
#define FT_ZERO(p)
Definition: ftmemory.h:246
static void ft_recompute_scaled_metrics(FT_Face face, FT_Size_Metrics *metrics)
Definition: ftobjs.c:3023
signed long FT_Fixed
Definition: fttypes.h:287
unsigned short FT_UShort
Definition: fttypes.h:209
GLsizei GLenum const GLvoid GLuint GLsizei GLfloat * metrics
Definition: glext.h:11745

Referenced by cff_size_request(), cid_size_request(), FT_Request_Size(), T1_Size_Request(), and tt_size_request().

◆ FT_Select_Metrics()

FT_Select_Metrics ( FT_Face  face,
FT_ULong  strike_index 
)

Definition at line 3057 of file ftobjs.c.

3059 {
3061 FT_Bitmap_Size* bsize;
3062
3063
3064 metrics = &face->size->metrics;
3065 bsize = face->available_sizes + strike_index;
3066
3067 metrics->x_ppem = (FT_UShort)( ( bsize->x_ppem + 32 ) >> 6 );
3068 metrics->y_ppem = (FT_UShort)( ( bsize->y_ppem + 32 ) >> 6 );
3069
3070 if ( FT_IS_SCALABLE( face ) )
3071 {
3072 metrics->x_scale = FT_DivFix( bsize->x_ppem,
3073 face->units_per_EM );
3074 metrics->y_scale = FT_DivFix( bsize->y_ppem,
3075 face->units_per_EM );
3076
3078 }
3079 else
3080 {
3081 metrics->x_scale = 1L << 16;
3082 metrics->y_scale = 1L << 16;
3083 metrics->ascender = bsize->y_ppem;
3084 metrics->descender = 0;
3085 metrics->height = bsize->height << 6;
3086 metrics->max_advance = bsize->x_ppem;
3087 }
3088 }
FT_Short height
Definition: freetype.h:357

Referenced by BDF_Size_Select(), FNT_Size_Select(), FT_Select_Size(), and PCF_Size_Select().

◆ ft_synthesize_vertical_metrics()

ft_synthesize_vertical_metrics ( FT_Glyph_Metrics metrics,
FT_Pos  advance 
)

Definition at line 2997 of file ftobjs.c.

2999 {
3000 FT_Pos height = metrics->height;
3001
3002
3003 /* compensate for glyph with bbox above/below the baseline */
3004 if ( metrics->horiBearingY < 0 )
3005 {
3006 if ( height < metrics->horiBearingY )
3007 height = metrics->horiBearingY;
3008 }
3009 else if ( metrics->horiBearingY > 0 )
3010 height -= metrics->horiBearingY;
3011
3012 /* the factor 1.2 is a heuristical value */
3013 if ( !advance )
3014 advance = height * 12 / 10;
3015
3016 metrics->vertBearingX = metrics->horiBearingX - metrics->horiAdvance / 2;
3017 metrics->vertBearingY = ( advance - height ) / 2;
3018 metrics->vertAdvance = advance;
3019 }
_STLP_MOVE_TO_STD_NAMESPACE void _STLP_CALL advance(_InputIterator &__i, _Distance __n)

Referenced by BDF_Glyph_Load(), cff_slot_load(), cid_slot_load_glyph(), FNT_Load_Glyph(), PCF_Glyph_Load(), and T1_Load_Glyph().