ReactOS 0.4.15-dev-8102-g108db8f
ftobjs.h File Reference
#include <ft2build.h>
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_DEBUG_HOOK_TRUETYPE   0
 
#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_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_Bool(* 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, 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_Pos *Min, FT_Pos *Max, FT_GlyphSlot slot)
 
 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 58 of file ftobjs.h.

◆ FT_ABS

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

Definition at line 74 of file ftobjs.h.

◆ FT_BITMAP_GLYPH

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

Definition at line 767 of file ftobjs.h.

◆ FT_CMAP

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

Definition at line 159 of file ftobjs.h.

◆ FT_CMAP_ENCODING

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

Definition at line 164 of file ftobjs.h.

◆ FT_CMAP_ENCODING_ID

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

Definition at line 163 of file ftobjs.h.

◆ FT_CMAP_FACE

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

Definition at line 165 of file ftobjs.h.

◆ FT_CMAP_PLATFORM_ID

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

Definition at line 162 of file ftobjs.h.

◆ FT_DEBUG_HOOK_TRUETYPE

#define FT_DEBUG_HOOK_TRUETYPE   0

Definition at line 852 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 233 of file ftobjs.h.

◆ FT_DECLARE_MODULE

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

Definition at line 1468 of file ftobjs.h.

◆ FT_DECLARE_RENDERER

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

Definition at line 1256 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 236 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 1166 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 1497 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 1047 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 1106 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 1259 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 1472 of file ftobjs.h.

◆ FT_DRIVER

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

Definition at line 799 of file ftobjs.h.

◆ FT_DRIVER_CLASS

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

Definition at line 802 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:119
#define FT_MODULE_CLASS(x)
Definition: ftobjs.h:545
GLint GLint GLint GLint GLint x
Definition: gl.h:1548

Definition at line 568 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:121

Definition at line 571 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:115

Definition at line 562 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:117

Definition at line 565 of file ftobjs.h.

◆ FT_FACE

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

Definition at line 630 of file ftobjs.h.

◆ FT_FACE_DRIVER

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

Definition at line 634 of file ftobjs.h.

◆ FT_FACE_LIBRARY

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

Definition at line 635 of file ftobjs.h.

◆ FT_FACE_MEMORY

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

Definition at line 636 of file ftobjs.h.

◆ FT_FACE_SIZE

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

Definition at line 643 of file ftobjs.h.

◆ FT_FACE_SLOT

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

Definition at line 642 of file ftobjs.h.

◆ FT_FACE_STREAM

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

Definition at line 637 of file ftobjs.h.

◆ FT_GLYPH

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

Definition at line 766 of file ftobjs.h.

◆ FT_GLYPH_OWN_BITMAP

#define FT_GLYPH_OWN_BITMAP   0x1U

Definition at line 463 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:74
GLint GLint GLint GLint GLint GLint y
Definition: gl.h:1548

Definition at line 81 of file ftobjs.h.

◆ ft_isalnum

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

Definition at line 129 of file ftobjs.h.

◆ ft_isalpha

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

Definition at line 128 of file ftobjs.h.

◆ ft_isdigit

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

Definition at line 118 of file ftobjs.h.

◆ ft_islower

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

Definition at line 126 of file ftobjs.h.

◆ ft_isupper

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

Definition at line 125 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 120 of file ftobjs.h.

◆ FT_MAX

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

Definition at line 72 of file ftobjs.h.

◆ FT_MIN

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

Definition at line 71 of file ftobjs.h.

◆ FT_MODULE

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

Definition at line 543 of file ftobjs.h.

◆ FT_MODULE_CLASS

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

Definition at line 545 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:110

Definition at line 550 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:112

Definition at line 556 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:111

Definition at line 553 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:113

Definition at line 559 of file ftobjs.h.

◆ FT_MODULE_LIBRARY

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

Definition at line 546 of file ftobjs.h.

◆ FT_MODULE_MEMORY

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

Definition at line 547 of file ftobjs.h.

◆ FT_OUTLINE_GLYPH

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

Definition at line 768 of file ftobjs.h.

◆ FT_PAD_CEIL

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

Definition at line 90 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:429
#define FT_PAD_FLOOR(x, n)
Definition: ftobjs.h:88
GLdouble n
Definition: glext.h:7729

Definition at line 107 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:420

Definition at line 100 of file ftobjs.h.

◆ FT_PAD_FLOOR

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

Definition at line 88 of file ftobjs.h.

◆ FT_PAD_ROUND

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

Definition at line 89 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 105 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 98 of file ftobjs.h.

◆ FT_PIX_CEIL

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

Definition at line 94 of file ftobjs.h.

◆ FT_PIX_CEIL_INT32

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

Definition at line 110 of file ftobjs.h.

◆ FT_PIX_CEIL_LONG

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

Definition at line 103 of file ftobjs.h.

◆ FT_PIX_FLOOR

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

Definition at line 92 of file ftobjs.h.

◆ FT_PIX_ROUND

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

Definition at line 93 of file ftobjs.h.

◆ FT_PIX_ROUND_INT32

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

Definition at line 109 of file ftobjs.h.

◆ FT_PIX_ROUND_LONG

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

Definition at line 102 of file ftobjs.h.

◆ FT_RENDERER

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

Definition at line 765 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:58

Definition at line 694 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 689 of file ftobjs.h.

◆ FT_SIZE

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

Definition at line 631 of file ftobjs.h.

◆ FT_SIZE_FACE

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

Definition at line 639 of file ftobjs.h.

◆ FT_SLOT

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

Definition at line 632 of file ftobjs.h.

◆ FT_SLOT_FACE

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

Definition at line 640 of file ftobjs.h.

◆ NULL

#define NULL   (void*)0

Definition at line 62 of file ftobjs.h.

◆ TRUE

#define TRUE   1

Definition at line 54 of file ftobjs.h.

Typedef Documentation

◆ FT_CMap

Definition at line 145 of file ftobjs.h.

◆ FT_CMap_CharIndexFunc

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

Definition at line 176 of file ftobjs.h.

◆ FT_CMap_CharNextFunc

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

Definition at line 180 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 199 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 184 of file ftobjs.h.

◆ FT_CMap_CharVarIsDefaultFunc

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

Definition at line 190 of file ftobjs.h.

◆ FT_CMap_Class

Definition at line 148 of file ftobjs.h.

◆ FT_CMap_ClassRec

◆ FT_CMap_DoneFunc

typedef void(* FT_CMap_DoneFunc) (FT_CMap cmap)

Definition at line 173 of file ftobjs.h.

◆ FT_CMap_InitFunc

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

Definition at line 169 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 204 of file ftobjs.h.

◆ FT_CMap_VariantListFunc

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

Definition at line 195 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 960 of file ftobjs.h.

◆ FT_Face_GetGlyphNameIndexFunc

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

Definition at line 966 of file ftobjs.h.

◆ FT_Face_GetPostscriptNameFunc

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

Definition at line 957 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 3568 of file ftobjs.c.

3569 {
3570 if ( cmap )
3571 {
3572 FT_Face face = cmap->charmap.face;
3575 FT_Int i, j;
3576
3577
3578 for ( i = 0; i < face->num_charmaps; i++ )
3579 {
3580 if ( (FT_CMap)face->charmaps[i] == cmap )
3581 {
3582 FT_CharMap last_charmap = face->charmaps[face->num_charmaps - 1];
3583
3584
3585 if ( FT_RENEW_ARRAY( face->charmaps,
3586 face->num_charmaps,
3587 face->num_charmaps - 1 ) )
3588 return;
3589
3590 /* remove it from our list of charmaps */
3591 for ( j = i + 1; j < face->num_charmaps; j++ )
3592 {
3593 if ( j == face->num_charmaps - 1 )
3594 face->charmaps[j - 1] = last_charmap;
3595 else
3596 face->charmaps[j - 1] = face->charmaps[j];
3597 }
3598
3599 face->num_charmaps--;
3600
3601 if ( (FT_CMap)face->charmap == cmap )
3602 face->charmap = NULL;
3603
3604 ft_cmap_done_internal( cmap );
3605
3606 break;
3607 }
3608 }
3609 }
3610 }
#define NULL
Definition: types.h:112
#define FT_RENEW_ARRAY(ptr, curcnt, newcnt)
Definition: ftmemory.h:336
static void ft_cmap_done_internal(FT_CMap cmap)
Definition: ftobjs.c:3553
#define FT_FACE_MEMORY(x)
Definition: ftobjs.h:636
typedefFT_BEGIN_HEADER struct FT_MemoryRec_ * FT_Memory
Definition: ftsystem.h:66
int FT_Error
Definition: fttypes.h:300
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:116
FT_CharMapRec charmap
Definition: ftobjs.h:153
FT_Face face
Definition: freetype.h:842

◆ FT_CMap_New()

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

Definition at line 3614 of file ftobjs.c.

3618 {
3620 FT_Face face;
3622 FT_CMap cmap = NULL;
3623
3624
3625 if ( !clazz || !charmap || !charmap->face )
3626 return FT_THROW( Invalid_Argument );
3627
3628 face = charmap->face;
3630
3631 if ( !FT_ALLOC( cmap, clazz->size ) )
3632 {
3633 cmap->charmap = *charmap;
3634 cmap->clazz = clazz;
3635
3636 if ( clazz->init )
3637 {
3638 error = clazz->init( cmap, init_data );
3639 if ( error )
3640 goto Fail;
3641 }
3642
3643 /* add it to our list of charmaps */
3644 if ( FT_RENEW_ARRAY( face->charmaps,
3645 face->num_charmaps,
3646 face->num_charmaps + 1 ) )
3647 goto Fail;
3648
3649 face->charmaps[face->num_charmaps++] = (FT_CharMap)cmap;
3650 }
3651
3652 Exit:
3653 if ( acmap )
3654 *acmap = cmap;
3655
3656 return error;
3657
3658 Fail:
3659 ft_cmap_done_internal( cmap );
3660 cmap = NULL;
3661 goto Exit;
3662 }
WORD face[3]
Definition: mesh.c:4747
int Fail
Definition: ehthrow.cxx:24
struct FT_CharMapRec_ * FT_CharMap
Definition: freetype.h:588
return FT_Err_Ok
Definition: ftbbox.c:511
#define FT_THROW(e)
Definition: ftdebug.h:213
#define FT_ALLOC(ptr, size)
Definition: ftmemory.h:303
static void Exit(void)
Definition: sock.c:1330
FT_CMap_Class clazz
Definition: ftobjs.h:154
FT_ULong size
Definition: ftobjs.h:212
FT_CMap_InitFunc init
Definition: ftobjs.h:214

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 612 of file ftobjs.c.

613 {
614 if ( slot )
615 {
616 FT_Driver driver = slot->face->driver;
617 FT_Memory memory = driver->root.memory;
618 FT_GlyphSlot prev;
620
621
622 /* Remove slot from its parent face's list */
623 prev = NULL;
624 cur = slot->face->glyph;
625
626 while ( cur )
627 {
628 if ( cur == slot )
629 {
630 if ( !prev )
631 slot->face->glyph = cur->next;
632 else
633 prev->next = cur->next;
634
635 /* finalize client-specific data */
636 if ( slot->generic.finalizer )
637 slot->generic.finalizer( slot );
638
640 FT_FREE( slot );
641 break;
642 }
643 prev = cur;
644 cur = cur->next;
645 }
646 }
647 }
#define FT_FREE(ptr)
Definition: ftmemory.h:329
static void ft_glyphslot_done(FT_GlyphSlot slot)
Definition: ftobjs.c:528
FxCollectionEntry * cur
struct @1673::@1674 driver
FT_GlyphSlot next
Definition: freetype.h:1912
Definition: vfat.h:185

Referenced by destroy_face(), and T42_GlyphSlot_Done().

◆ FT_Done_Memory()

FT_Done_Memory ( FT_Memory  memory)

Definition at line 311 of file ftsystem.c.

312 {
313#ifdef FT_DEBUG_MEMORY
314 ft_mem_debug_done( memory );
315#endif
316 ft_sfree( memory );
317 }
#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 4865 of file ftobjs.c.

4867 {
4869
4870
4871 /* test for valid `library' delayed to FT_Get_Module() */
4872
4873 module = FT_Get_Module( library, mod_name );
4874
4875 return module ? module->clazz->module_interface : 0;
4876 }
FT_Library library
Definition: cffdrivr.c:654
FT_Get_Module(FT_Library library, const char *module_name)
Definition: ftobjs.c:4837

Referenced by cff_face_init(), cff_parser_run(), cid_face_init(), parse_afm(), 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 478 of file ftobjs.c.

480 {
483
484
485 if ( slot->internal->flags & FT_GLYPH_OWN_BITMAP )
486 FT_FREE( slot->bitmap.buffer );
487 else
488 slot->internal->flags |= FT_GLYPH_OWN_BITMAP;
489
490 (void)FT_ALLOC( slot->bitmap.buffer, size );
491 return error;
492 }
#define FT_GLYPH_OWN_BITMAP
Definition: ftobjs.h:463
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 314 of file ftobjs.c.

315 {
316 if ( slot->internal && ( slot->internal->flags & FT_GLYPH_OWN_BITMAP ) )
317 {
319
320
321 FT_FREE( slot->bitmap.buffer );
322 slot->internal->flags &= ~FT_GLYPH_OWN_BITMAP;
323 }
324 else
325 {
326 /* assume that the bitmap buffer was stolen or not */
327 /* allocated from the heap */
328 slot->bitmap.buffer = NULL;
329 }
330 }

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 334 of file ftobjs.c.

337 {
338 FT_Outline* outline = &slot->outline;
339 FT_Bitmap* bitmap = &slot->bitmap;
340
341 FT_Pixel_Mode pixel_mode;
342
343 FT_BBox cbox;
344 FT_Pos x_shift = 0;
345 FT_Pos y_shift = 0;
346 FT_Pos x_left, y_top;
347 FT_Pos width, height, pitch;
348
349
350 if ( slot->internal && ( slot->internal->flags & FT_GLYPH_OWN_BITMAP ) )
351 return;
352
353 if ( origin )
354 {
355 x_shift = origin->x;
356 y_shift = origin->y;
357 }
358
359 /* compute the control box, and grid-fit it, */
360 /* taking into account the origin shift */
362
363 cbox.xMin += x_shift;
364 cbox.yMin += y_shift;
365 cbox.xMax += x_shift;
366 cbox.yMax += y_shift;
367
368 switch ( mode )
369 {
371 pixel_mode = FT_PIXEL_MODE_MONO;
372#if 1
373 /* undocumented but confirmed: bbox values get rounded */
374 /* unless the rounded box can collapse for a narrow glyph */
375 if ( cbox.xMax - cbox.xMin < 64 )
376 {
377 cbox.xMin = FT_PIX_FLOOR( cbox.xMin );
378 cbox.xMax = FT_PIX_CEIL_LONG( cbox.xMax );
379 }
380 else
381 {
382 cbox.xMin = FT_PIX_ROUND_LONG( cbox.xMin );
383 cbox.xMax = FT_PIX_ROUND_LONG( cbox.xMax );
384 }
385
386 if ( cbox.yMax - cbox.yMin < 64 )
387 {
388 cbox.yMin = FT_PIX_FLOOR( cbox.yMin );
389 cbox.yMax = FT_PIX_CEIL_LONG( cbox.yMax );
390 }
391 else
392 {
393 cbox.yMin = FT_PIX_ROUND_LONG( cbox.yMin );
394 cbox.yMax = FT_PIX_ROUND_LONG( cbox.yMax );
395 }
396#else
397 cbox.xMin = FT_PIX_FLOOR( cbox.xMin );
398 cbox.yMin = FT_PIX_FLOOR( cbox.yMin );
399 cbox.xMax = FT_PIX_CEIL_LONG( cbox.xMax );
400 cbox.yMax = FT_PIX_CEIL_LONG( cbox.yMax );
401#endif
402 break;
403
405 pixel_mode = FT_PIXEL_MODE_LCD;
406 ft_lcd_padding( &cbox.xMin, &cbox.xMax, slot );
407 goto Round;
408
410 pixel_mode = FT_PIXEL_MODE_LCD_V;
411 ft_lcd_padding( &cbox.yMin, &cbox.yMax, slot );
412 goto Round;
413
416 default:
417 pixel_mode = FT_PIXEL_MODE_GRAY;
418 Round:
419 cbox.xMin = FT_PIX_FLOOR( cbox.xMin );
420 cbox.yMin = FT_PIX_FLOOR( cbox.yMin );
421 cbox.xMax = FT_PIX_CEIL_LONG( cbox.xMax );
422 cbox.yMax = FT_PIX_CEIL_LONG( cbox.yMax );
423 }
424
425 x_shift = SUB_LONG( x_shift, cbox.xMin );
426 y_shift = SUB_LONG( y_shift, cbox.yMin );
427
428 x_left = cbox.xMin >> 6;
429 y_top = cbox.yMax >> 6;
430
431 width = ( (FT_ULong)cbox.xMax - (FT_ULong)cbox.xMin ) >> 6;
432 height = ( (FT_ULong)cbox.yMax - (FT_ULong)cbox.yMin ) >> 6;
433
434 switch ( pixel_mode )
435 {
437 pitch = ( ( width + 15 ) >> 4 ) << 1;
438 break;
439
441 width *= 3;
442 pitch = FT_PAD_CEIL( width, 4 );
443 break;
444
446 height *= 3;
447 /* fall through */
448
450 default:
451 pitch = width;
452 }
453
454 slot->bitmap_left = (FT_Int)x_left;
455 slot->bitmap_top = (FT_Int)y_top;
456
457 bitmap->pixel_mode = (unsigned char)pixel_mode;
458 bitmap->num_grays = 256;
459 bitmap->width = (unsigned int)width;
460 bitmap->rows = (unsigned int)height;
461 bitmap->pitch = pitch;
462 }
unsigned int(__cdecl typeof(jpeg_read_scanlines))(struct jpeg_decompress_struct *
Definition: typeof.h:31
unsigned char
Definition: typeof.h:29
@ FT_RENDER_MODE_MONO
Definition: freetype.h:3236
@ FT_RENDER_MODE_NORMAL
Definition: freetype.h:3234
@ FT_RENDER_MODE_LIGHT
Definition: freetype.h:3235
@ FT_RENDER_MODE_LCD_V
Definition: freetype.h:3238
@ FT_RENDER_MODE_LCD
Definition: freetype.h:3237
#define SUB_LONG(a, b)
Definition: ftcalc.h:422
@ 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
#define FT_PIX_FLOOR(x)
Definition: ftobjs.h:92
#define FT_PIX_ROUND_LONG(x)
Definition: ftobjs.h:102
ft_lcd_padding(FT_Pos *Min, FT_Pos *Max, FT_GlyphSlot slot)
Definition: ftlcdfil.c:348
#define FT_PIX_CEIL_LONG(x)
Definition: ftobjs.h:103
#define FT_PAD_CEIL(x, n)
Definition: ftobjs.h:90
FT_Outline_Get_CBox(const FT_Outline *outline, FT_BBox *acbox)
Definition: ftoutln.c:478
unsigned long FT_ULong
Definition: fttypes.h:253
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
FT_Pos xMin
Definition: ftimage.h:117
FT_Pos yMax
Definition: ftimage.h:118
FT_Pos yMin
Definition: ftimage.h:117
FT_Pos xMax
Definition: ftimage.h:118
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_generic().

◆ ft_glyphslot_set_bitmap()

ft_glyphslot_set_bitmap ( FT_GlyphSlot  slot,
FT_Byte buffer 
)

Definition at line 466 of file ftobjs.c.

468 {
470
471 slot->bitmap.buffer = buffer;
472
473 FT_ASSERT( (slot->internal->flags & FT_GLYPH_OWN_BITMAP) == 0 );
474 }
#define FT_ASSERT(condition)
Definition: ftdebug.h:211
ft_glyphslot_free_bitmap(FT_GlyphSlot slot)
Definition: ftobjs.c:314
GLuint buffer
Definition: glext.h:5915

Referenced by BDF_Glyph_Load().

◆ ft_lcd_padding()

ft_lcd_padding ( FT_Pos Min,
FT_Pos Max,
FT_GlyphSlot  slot 
)

Definition at line 348 of file ftlcdfil.c.

351 {
352 FT_UNUSED( slot );
353
354 *Min -= 21;
355 *Max += 21;
356 }
#define Max(a, b)
Definition: cdprocs.h:78
#define Min(a, b)
Definition: cdprocs.h:74
#define FT_UNUSED(arg)
Definition: ftconfig.h:101

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 4264 of file ftobjs.c.

4267 {
4270
4271
4272 if ( !library )
4273 goto Exit;
4274
4276
4277 if ( node )
4278 {
4279 if ( *node )
4280 cur = (*node)->next;
4281 *node = NULL;
4282 }
4283
4284 while ( cur )
4285 {
4286 FT_Renderer renderer = FT_RENDERER( cur->data );
4287
4288
4289 if ( renderer->glyph_format == format )
4290 {
4291 if ( node )
4292 *node = cur;
4293
4294 result = renderer;
4295 break;
4296 }
4297 cur = cur->next;
4298 }
4299
4300 Exit:
4301 return result;
4302 }
#define FT_RENDERER(x)
Definition: ftobjs.h:765
GLint GLint GLsizei GLsizei GLsizei GLint GLenum format
Definition: gl.h:1546
GLuint64EXT * result
Definition: glext.h:11304
FT_ListRec renderers
Definition: ftobjs.h:927
FT_ListNode head
Definition: fttypes.h:569
FT_Glyph_Format glyph_format
Definition: ftobjs.h:775
Definition: dlist.c:348

Referenced by FT_Get_Glyph(), FT_Get_Renderer(), ft_lookup_glyph_renderer(), 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 2875 of file ftobjs.c.

2879 {
2880 FT_Int i;
2881 FT_Long w, h;
2882
2883
2884 if ( !FT_HAS_FIXED_SIZES( face ) )
2885 return FT_THROW( Invalid_Face_Handle );
2886
2887 /* FT_Bitmap_Size doesn't provide enough info... */
2888 if ( req->type != FT_SIZE_REQUEST_TYPE_NOMINAL )
2889 return FT_THROW( Unimplemented_Feature );
2890
2891 w = FT_REQUEST_WIDTH ( req );
2892 h = FT_REQUEST_HEIGHT( req );
2893
2894 if ( req->width && !req->height )
2895 h = w;
2896 else if ( !req->width && req->height )
2897 w = h;
2898
2899 w = FT_PIX_ROUND( w );
2900 h = FT_PIX_ROUND( h );
2901
2902 if ( !w || !h )
2903 return FT_THROW( Invalid_Pixel_Size );
2904
2905 for ( i = 0; i < face->num_fixed_sizes; i++ )
2906 {
2907 FT_Bitmap_Size* bsize = face->available_sizes + i;
2908
2909
2910 if ( h != FT_PIX_ROUND( bsize->y_ppem ) )
2911 continue;
2912
2913 if ( w == FT_PIX_ROUND( bsize->x_ppem ) || ignore_width )
2914 {
2915 FT_TRACE3(( "FT_Match_Size: bitmap strike %d matches\n", i ));
2916
2917 if ( size_index )
2918 *size_index = (FT_ULong)i;
2919
2920 return FT_Err_Ok;
2921 }
2922 }
2923
2924 FT_TRACE3(( "FT_Match_Size: no matching bitmap strike\n" ));
2925
2926 return FT_THROW( Invalid_Pixel_Size );
2927 }
@ FT_SIZE_REQUEST_TYPE_NOMINAL
Definition: freetype.h:2570
#define FT_HAS_FIXED_SIZES(face)
Definition: freetype.h:1361
#define FT_TRACE3(varformat)
Definition: ftdebug.h:160
#define FT_REQUEST_WIDTH(req)
Definition: ftobjs.h:689
#define FT_REQUEST_HEIGHT(req)
Definition: ftobjs.h:694
#define FT_PIX_ROUND(x)
Definition: ftobjs.h:93
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:379
FT_Pos x_ppem
Definition: freetype.h:378
FT_Size_Request_Type type
Definition: freetype.h:2619

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 4880 of file ftobjs.c.

4883 {
4885
4886
4887 if ( module )
4888 {
4889 FT_ASSERT( module->clazz && module->clazz->get_interface );
4890
4891 /* first, look for the service in the module */
4892 if ( module->clazz->get_interface )
4893 result = module->clazz->get_interface( module, service_id );
4894
4895 if ( global && !result )
4896 {
4897 /* we didn't find it, look in all other modules then */
4898 FT_Library library = module->library;
4901
4902
4903 for ( ; cur < limit; cur++ )
4904 {
4905 if ( cur[0] != module )
4906 {
4907 FT_ASSERT( cur[0]->clazz );
4908
4909 if ( cur[0]->clazz->get_interface )
4910 {
4911 result = cur[0]->clazz->get_interface( cur[0], service_id );
4912 if ( result )
4913 break;
4914 }
4915 }
4916 }
4917 }
4918 }
4919
4920 return result;
4921 }
int global
Definition: ehframes.cpp:22
GLint limit
Definition: glext.h:10326
FT_Module modules[FT_MAX_MODULES]
Definition: ftobjs.h:925
FT_UInt num_modules
Definition: ftobjs.h:924

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 559 of file ftobjs.c.

561 {
564 FT_Driver_Class clazz;
567
568
569 if ( !face )
570 return FT_THROW( Invalid_Face_Handle );
571
572 if ( !face->driver )
573 return FT_THROW( Invalid_Argument );
574
575 driver = face->driver;
576 clazz = driver->clazz;
577 memory = driver->root.memory;
578
579 FT_TRACE4(( "FT_New_GlyphSlot: Creating new slot object\n" ));
580 if ( !FT_ALLOC( slot, clazz->slot_object_size ) )
581 {
582 slot->face = face;
583
585 if ( error )
586 {
588 FT_FREE( slot );
589 goto Exit;
590 }
591
592 slot->next = face->glyph;
593 face->glyph = slot;
594
595 if ( aslot )
596 *aslot = slot;
597 }
598 else if ( aslot )
599 *aslot = NULL;
600
601
602 Exit:
603 FT_TRACE4(( "FT_New_GlyphSlot: Return 0x%x\n", error ));
604
605 return error;
606 }
#define FT_TRACE4(varformat)
Definition: ftdebug.h:161
static FT_Error ft_glyphslot_init(FT_GlyphSlot slot)
Definition: ftobjs.c:286
FT_Long slot_object_size
Definition: ftdrv.h:163
struct _slot slot
Definition: vfat.h:196

Referenced by ft_open_face_internal(), and T42_GlyphSlot_Init().

◆ FT_New_Memory()

FT_New_Memory ( void  )

Definition at line 287 of file ftsystem.c.

288 {
290
291
292 memory = (FT_Memory)ft_smalloc( sizeof ( *memory ) );
293 if ( memory )
294 {
295 memory->user = NULL;
296 memory->alloc = ft_alloc;
297 memory->realloc = ft_realloc;
298 memory->free = ft_free;
299#ifdef FT_DEBUG_MEMORY
300 ft_mem_debug_init( memory );
301#endif
302 }
303
304 return memory;
305 }
#define ft_smalloc
Definition: ftstdlib.h:134
ft_realloc(FT_Memory memory, long cur_size, long new_size, void *block)
Definition: ftsystem.c:99
ft_free(FT_Memory memory, void *block)
Definition: ftsystem.c:125
ft_alloc(FT_Memory memory, long size)
Definition: ftsystem.c:69

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 4485 of file ftobjs.c.

4488 {
4490 FT_Renderer renderer;
4491
4492
4493 /* if it is already a bitmap, no need to do anything */
4494 switch ( slot->format )
4495 {
4496 case FT_GLYPH_FORMAT_BITMAP: /* already a bitmap, don't do anything */
4497 break;
4498
4499 default:
4500 {
4502
4503
4504 /* small shortcut for the very common case */
4505 if ( slot->format == FT_GLYPH_FORMAT_OUTLINE )
4506 {
4507 renderer = library->cur_renderer;
4509 }
4510 else
4511 renderer = FT_Lookup_Renderer( library, slot->format, &node );
4512
4513 error = FT_ERR( Unimplemented_Feature );
4514 while ( renderer )
4515 {
4516 error = renderer->render( renderer, slot, render_mode, NULL );
4517 if ( !error ||
4518 FT_ERR_NEQ( error, Cannot_Render_Glyph ) )
4519 break;
4520
4521 /* FT_Err_Cannot_Render_Glyph is returned if the render mode */
4522 /* is unsupported by the current renderer for this glyph image */
4523 /* format. */
4524
4525 /* now, look for another renderer that supports the same */
4526 /* format. */
4527 renderer = FT_Lookup_Renderer( library, slot->format, &node );
4528 }
4529 }
4530 }
4531
4532#ifdef FT_DEBUG_LEVEL_TRACE
4533
4534#undef FT_COMPONENT
4535#define FT_COMPONENT trace_bitmap
4536
4537 /*
4538 * Computing the MD5 checksum is expensive, unnecessarily distorting a
4539 * possible profiling of FreeType if compiled with tracing support. For
4540 * this reason, we execute the following code only if explicitly
4541 * requested.
4542 */
4543
4544 /* we use FT_TRACE3 in this block */
4545 if ( !error &&
4546 ft_trace_levels[trace_bitmap] >= 3 &&
4547 slot->bitmap.buffer )
4548 {
4550 FT_Error err;
4551
4552
4554
4555 /* we convert to a single bitmap format for computing the checksum */
4556 /* this also converts the bitmap flow to `down' (i.e., pitch > 0) */
4557 err = FT_Bitmap_Convert( library, &slot->bitmap, &bitmap, 1 );
4558 if ( !err )
4559 {
4560 MD5_CTX ctx;
4561 unsigned char md5[16];
4562 unsigned long coverage = 0;
4563 int i, j;
4564 int rows = (int)bitmap.rows;
4565 int pitch = bitmap.pitch;
4566
4567
4568 FT_TRACE3(( "FT_Render_Glyph: bitmap %dx%d, mode %d\n",
4569 rows, pitch, slot->bitmap.pixel_mode ));
4570
4571 for ( i = 0; i < rows; i++ )
4572 for ( j = 0; j < pitch; j++ )
4573 coverage += bitmap.buffer[i * pitch + j];
4574
4575 FT_TRACE3(( " Total coverage: %lu\n", coverage ));
4576
4577 MD5_Init( &ctx );
4578 if ( bitmap.buffer )
4579 MD5_Update( &ctx, bitmap.buffer,
4580 (unsigned long)rows * (unsigned long)pitch );
4581 MD5_Final( md5, &ctx );
4582
4583 FT_TRACE3(( " MD5 checksum: " ));
4584 for ( i = 0; i < 16; i++ )
4585 FT_TRACE3(( "%02X", md5[i] ));
4586 FT_TRACE3(( "\n" ));
4587 }
4588
4590 }
4591
4592 /*
4593 * Dump bitmap in Netpbm format (PBM or PGM).
4594 */
4595
4596 /* we use FT_TRACE7 in this block */
4597 if ( !error &&
4598 ft_trace_levels[trace_bitmap] >= 7 &&
4599 slot->bitmap.rows < 128U &&
4600 slot->bitmap.width < 128U &&
4601 slot->bitmap.buffer )
4602 {
4603 int rows = (int)slot->bitmap.rows;
4604 int width = (int)slot->bitmap.width;
4605 int pitch = slot->bitmap.pitch;
4606 int i, j, m;
4607 unsigned char* topleft = slot->bitmap.buffer;
4608
4609 if ( pitch < 0 )
4610 topleft -= pitch * ( rows - 1 );
4611
4612 FT_TRACE7(( "Netpbm image: start\n" ));
4613 switch ( slot->bitmap.pixel_mode )
4614 {
4615 case FT_PIXEL_MODE_MONO:
4616 FT_TRACE7(( "P1 %d %d\n", width, rows ));
4617 for ( i = 0; i < rows; i++ )
4618 {
4619 for ( j = 0; j < width; )
4620 for ( m = 128; m > 0 && j < width; m >>= 1, j++ )
4621 FT_TRACE7(( " %d", ( topleft[i * pitch + j / 8] & m ) != 0 ));
4622 FT_TRACE7(( "\n" ));
4623 }
4624 break;
4625
4626 default:
4627 FT_TRACE7(( "P2 %d %d 255\n", width, rows ));
4628 for ( i = 0; i < rows; i++ )
4629 {
4630 for ( j = 0; j < width; j += 1 )
4631 FT_TRACE7(( " %3u", topleft[i * pitch + j] ));
4632 FT_TRACE7(( "\n" ));
4633 }
4634 }
4635 FT_TRACE7(( "Netpbm image: end\n" ));
4636 }
4637
4638#undef FT_COMPONENT
4639#define FT_COMPONENT trace_objs
4640
4641#endif /* FT_DEBUG_LEVEL_TRACE */
4642
4643 return error;
4644 }
#define md5
Definition: compat-1.3.h:2034
FT_Bitmap_Convert(FT_Library library, const FT_Bitmap *source, FT_Bitmap *target, FT_Int alignment)
Definition: ftbitmap.c:504
FT_BEGIN_HEADER FT_Bitmap_Init(FT_Bitmap *abitmap)
Definition: ftbitmap.c:34
FT_Bitmap_Done(FT_Library library, FT_Bitmap *bitmap)
Definition: ftbitmap.c:826
#define FT_TRACE7(varformat)
Definition: ftdebug.h:164
FT_Lookup_Renderer(FT_Library library, FT_Glyph_Format format, FT_ListNode *node)
Definition: ftobjs.c:4264
smooth FT_Module_Constructor FT_Module_Destructor FT_Module_Requester FT_GLYPH_FORMAT_OUTLINE
Definition: ftsmooth.c:426
#define FT_ERR_NEQ(x, e)
Definition: fttypes.h:593
#define FT_ERR(e)
Definition: fttypes.h:586
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
FT_Renderer cur_renderer
Definition: ftobjs.h:928
FT_Renderer_RenderFunc render
Definition: ftobjs.h:780
Definition: msi.c:4013

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 3028 of file ftobjs.c.

3030 {
3032
3033
3034 metrics = &face->size->metrics;
3035
3036 if ( FT_IS_SCALABLE( face ) )
3037 {
3038 FT_Long w = 0, h = 0, scaled_w = 0, scaled_h = 0;
3039
3040
3041 switch ( req->type )
3042 {
3044 w = h = face->units_per_EM;
3045 break;
3046
3048 w = h = face->ascender - face->descender;
3049 break;
3050
3052 w = face->bbox.xMax - face->bbox.xMin;
3053 h = face->bbox.yMax - face->bbox.yMin;
3054 break;
3055
3057 w = face->max_advance_width;
3058 h = face->ascender - face->descender;
3059 break;
3060
3062 metrics->x_scale = (FT_Fixed)req->width;
3063 metrics->y_scale = (FT_Fixed)req->height;
3064 if ( !metrics->x_scale )
3065 metrics->x_scale = metrics->y_scale;
3066 else if ( !metrics->y_scale )
3067 metrics->y_scale = metrics->x_scale;
3068 goto Calculate_Ppem;
3069
3071 break;
3072 }
3073
3074 /* to be on the safe side */
3075 if ( w < 0 )
3076 w = -w;
3077
3078 if ( h < 0 )
3079 h = -h;
3080
3081 scaled_w = FT_REQUEST_WIDTH ( req );
3082 scaled_h = FT_REQUEST_HEIGHT( req );
3083
3084 /* determine scales */
3085 if ( req->width )
3086 {
3087 metrics->x_scale = FT_DivFix( scaled_w, w );
3088
3089 if ( req->height )
3090 {
3091 metrics->y_scale = FT_DivFix( scaled_h, h );
3092
3093 if ( req->type == FT_SIZE_REQUEST_TYPE_CELL )
3094 {
3095 if ( metrics->y_scale > metrics->x_scale )
3096 metrics->y_scale = metrics->x_scale;
3097 else
3098 metrics->x_scale = metrics->y_scale;
3099 }
3100 }
3101 else
3102 {
3103 metrics->y_scale = metrics->x_scale;
3104 scaled_h = FT_MulDiv( scaled_w, h, w );
3105 }
3106 }
3107 else
3108 {
3109 metrics->x_scale = metrics->y_scale = FT_DivFix( scaled_h, h );
3110 scaled_w = FT_MulDiv( scaled_h, w, h );
3111 }
3112
3113 Calculate_Ppem:
3114 /* calculate the ppems */
3115 if ( req->type != FT_SIZE_REQUEST_TYPE_NOMINAL )
3116 {
3117 scaled_w = FT_MulFix( face->units_per_EM, metrics->x_scale );
3118 scaled_h = FT_MulFix( face->units_per_EM, metrics->y_scale );
3119 }
3120
3121 metrics->x_ppem = (FT_UShort)( ( scaled_w + 32 ) >> 6 );
3122 metrics->y_ppem = (FT_UShort)( ( scaled_h + 32 ) >> 6 );
3123
3125 }
3126 else
3127 {
3128 FT_ZERO( metrics );
3129 metrics->x_scale = 1L << 16;
3130 metrics->y_scale = 1L << 16;
3131 }
3132 }
@ FT_SIZE_REQUEST_TYPE_BBOX
Definition: freetype.h:2572
@ FT_SIZE_REQUEST_TYPE_REAL_DIM
Definition: freetype.h:2571
@ FT_SIZE_REQUEST_TYPE_SCALES
Definition: freetype.h:2574
@ FT_SIZE_REQUEST_TYPE_MAX
Definition: freetype.h:2576
@ FT_SIZE_REQUEST_TYPE_CELL
Definition: freetype.h:2573
FT_DivFix(FT_Long a, FT_Long b)
Definition: ftcalc.c:608
#define FT_IS_SCALABLE(face)
Definition: freetype.h:1312
FT_MulDiv(FT_Long a, FT_Long b, FT_Long c)
Definition: ftcalc.c:416
FT_MulFix(FT_Long a, FT_Long b)
Definition: ftcalc.c:509
#define FT_ZERO(p)
Definition: ftmemory.h:237
static void ft_recompute_scaled_metrics(FT_Face face, FT_Size_Metrics *metrics)
Definition: ftobjs.c:2959
signed long FT_Fixed
Definition: fttypes.h:288
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 2993 of file ftobjs.c.

2995 {
2997 FT_Bitmap_Size* bsize;
2998
2999
3000 metrics = &face->size->metrics;
3001 bsize = face->available_sizes + strike_index;
3002
3003 metrics->x_ppem = (FT_UShort)( ( bsize->x_ppem + 32 ) >> 6 );
3004 metrics->y_ppem = (FT_UShort)( ( bsize->y_ppem + 32 ) >> 6 );
3005
3006 if ( FT_IS_SCALABLE( face ) )
3007 {
3008 metrics->x_scale = FT_DivFix( bsize->x_ppem,
3009 face->units_per_EM );
3010 metrics->y_scale = FT_DivFix( bsize->y_ppem,
3011 face->units_per_EM );
3012
3014 }
3015 else
3016 {
3017 metrics->x_scale = 1L << 16;
3018 metrics->y_scale = 1L << 16;
3019 metrics->ascender = bsize->y_ppem;
3020 metrics->descender = 0;
3021 metrics->height = bsize->height << 6;
3022 metrics->max_advance = bsize->x_ppem;
3023 }
3024 }
FT_Short height
Definition: freetype.h:373

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 2933 of file ftobjs.c.

2935 {
2936 FT_Pos height = metrics->height;
2937
2938
2939 /* compensate for glyph with bbox above/below the baseline */
2940 if ( metrics->horiBearingY < 0 )
2941 {
2942 if ( height < metrics->horiBearingY )
2943 height = metrics->horiBearingY;
2944 }
2945 else if ( metrics->horiBearingY > 0 )
2946 height -= metrics->horiBearingY;
2947
2948 /* the factor 1.2 is a heuristical value */
2949 if ( !advance )
2950 advance = height * 12 / 10;
2951
2952 metrics->vertBearingX = metrics->horiBearingX - metrics->horiAdvance / 2;
2953 metrics->vertBearingY = ( advance - height ) / 2;
2954 metrics->vertAdvance = advance;
2955 }
_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().