ReactOS 0.4.16-dev-981-g80eb313
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_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_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, 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 739 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_MODULE

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

Definition at line 1173 of file ftobjs.h.

◆ FT_DECLARE_RENDERER

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

Definition at line 1104 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:70

Definition at line 1062 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 1202 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 1004 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 1033 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 1107 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 1177 of file ftobjs.h.

◆ FT_DRIVER

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

Definition at line 771 of file ftobjs.h.

◆ FT_DRIVER_CLASS

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

Definition at line 774 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:512
GLint GLint GLint GLint GLint x
Definition: gl.h:1548

Definition at line 535 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 538 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 529 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 532 of file ftobjs.h.

◆ FT_FACE

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

Definition at line 599 of file ftobjs.h.

◆ FT_FACE_DRIVER

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

Definition at line 603 of file ftobjs.h.

◆ FT_FACE_LIBRARY

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

Definition at line 604 of file ftobjs.h.

◆ FT_FACE_MEMORY

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

Definition at line 605 of file ftobjs.h.

◆ FT_FACE_SIZE

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

Definition at line 612 of file ftobjs.h.

◆ FT_FACE_SLOT

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

Definition at line 611 of file ftobjs.h.

◆ FT_FACE_STREAM

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

Definition at line 606 of file ftobjs.h.

◆ FT_GLYPH

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

Definition at line 738 of file ftobjs.h.

◆ FT_GLYPH_OWN_BITMAP

#define FT_GLYPH_OWN_BITMAP   0x1U

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

◆ FT_MODULE_CLASS

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

Definition at line 512 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 517 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 523 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 520 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 526 of file ftobjs.h.

◆ FT_MODULE_LIBRARY

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

Definition at line 513 of file ftobjs.h.

◆ FT_MODULE_MEMORY

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

Definition at line 514 of file ftobjs.h.

◆ FT_OUTLINE_GLYPH

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

Definition at line 740 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:482
#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:473

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 737 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 665 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 660 of file ftobjs.h.

◆ FT_SIZE

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

Definition at line 600 of file ftobjs.h.

◆ FT_SIZE_FACE

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

Definition at line 608 of file ftobjs.h.

◆ FT_SLOT

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

Definition at line 601 of file ftobjs.h.

◆ FT_SLOT_FACE

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

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

◆ FT_Face_GetGlyphNameIndexFunc

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

Definition at line 943 of file ftobjs.h.

◆ FT_Face_GetPostscriptNameFunc

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

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

3612 {
3613 if ( cmap )
3614 {
3615 FT_Face face = cmap->charmap.face;
3618 FT_Int i, j;
3619
3620
3621 for ( i = 0; i < face->num_charmaps; i++ )
3622 {
3623 if ( (FT_CMap)face->charmaps[i] == cmap )
3624 {
3625 FT_CharMap last_charmap = face->charmaps[face->num_charmaps - 1];
3626
3627
3628 if ( FT_RENEW_ARRAY( face->charmaps,
3629 face->num_charmaps,
3630 face->num_charmaps - 1 ) )
3631 return;
3632
3633 /* remove it from our list of charmaps */
3634 for ( j = i + 1; j < face->num_charmaps; j++ )
3635 {
3636 if ( j == face->num_charmaps - 1 )
3637 face->charmaps[j - 1] = last_charmap;
3638 else
3639 face->charmaps[j - 1] = face->charmaps[j];
3640 }
3641
3642 face->num_charmaps--;
3643
3644 if ( (FT_CMap)face->charmap == cmap )
3645 face->charmap = NULL;
3646
3647 ft_cmap_done_internal( cmap );
3648
3649 break;
3650 }
3651 }
3652 }
3653 }
#define NULL
Definition: types.h:112
#define FT_RENEW_ARRAY(ptr, curcnt, newcnt)
Definition: ftmemory.h:335
static void ft_cmap_done_internal(FT_CMap cmap)
Definition: ftobjs.c:3596
#define FT_FACE_MEMORY(x)
Definition: ftobjs.h:605
typedefFT_BEGIN_HEADER struct FT_MemoryRec_ * FT_Memory
Definition: ftsystem.h:65
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:116
FT_CharMapRec charmap
Definition: ftobjs.h:151
FT_Face face
Definition: freetype.h:835

◆ FT_CMap_New()

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

Definition at line 3657 of file ftobjs.c.

3661 {
3663 FT_Face face;
3665 FT_CMap cmap = NULL;
3666
3667
3668 if ( !clazz || !charmap || !charmap->face )
3669 return FT_THROW( Invalid_Argument );
3670
3671 face = charmap->face;
3673
3674 if ( !FT_ALLOC( cmap, clazz->size ) )
3675 {
3676 cmap->charmap = *charmap;
3677 cmap->clazz = clazz;
3678
3679 if ( clazz->init )
3680 {
3681 error = clazz->init( cmap, init_data );
3682 if ( error )
3683 goto Fail;
3684 }
3685
3686 /* add it to our list of charmaps */
3687 if ( FT_RENEW_ARRAY( face->charmaps,
3688 face->num_charmaps,
3689 face->num_charmaps + 1 ) )
3690 goto Fail;
3691
3692 face->charmaps[face->num_charmaps++] = (FT_CharMap)cmap;
3693 }
3694
3695 Exit:
3696 if ( acmap )
3697 *acmap = cmap;
3698
3699 return error;
3700
3701 Fail:
3702 ft_cmap_done_internal( cmap );
3703 cmap = NULL;
3704 goto Exit;
3705 }
WORD face[3]
Definition: mesh.c:4747
int Fail
Definition: ehthrow.cxx:24
struct FT_CharMapRec_ * FT_CharMap
Definition: freetype.h:582
return FT_Err_Ok
Definition: ftbbox.c:527
#define FT_THROW(e)
Definition: ftdebug.h:241
#define FT_ALLOC(ptr, size)
Definition: ftmemory.h:302
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 649 of file ftobjs.c.

650 {
651 if ( slot )
652 {
653 FT_Driver driver = slot->face->driver;
654 FT_Memory memory = driver->root.memory;
655 FT_GlyphSlot prev;
657
658
659 /* Remove slot from its parent face's list */
660 prev = NULL;
661 cur = slot->face->glyph;
662
663 while ( cur )
664 {
665 if ( cur == slot )
666 {
667 if ( !prev )
668 slot->face->glyph = cur->next;
669 else
670 prev->next = cur->next;
671
672 /* finalize client-specific data */
673 if ( slot->generic.finalizer )
674 slot->generic.finalizer( slot );
675
677 FT_FREE( slot );
678 break;
679 }
680 prev = cur;
681 cur = cur->next;
682 }
683 }
684 }
#define FT_FREE(ptr)
Definition: ftmemory.h:328
static void ft_glyphslot_done(FT_GlyphSlot slot)
Definition: ftobjs.c:565
FxCollectionEntry * cur
struct @1709::@1710 driver
FT_GlyphSlot next
Definition: freetype.h:1881
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 4992 of file ftobjs.c.

4994 {
4996
4997
4998 /* test for valid `library' delayed to FT_Get_Module() */
4999
5000 module = FT_Get_Module( library, mod_name );
5001
5002 return module ? module->clazz->module_interface : 0;
5003 }
FT_Library library
Definition: cffdrivr.c:661
FT_Get_Module(FT_Library library, const char *module_name)
Definition: ftobjs.c:4964

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

517 {
520
521
522 if ( slot->internal->flags & FT_GLYPH_OWN_BITMAP )
523 FT_FREE( slot->bitmap.buffer );
524 else
525 slot->internal->flags |= FT_GLYPH_OWN_BITMAP;
526
527 (void)FT_ALLOC( slot->bitmap.buffer, size );
528 return error;
529 }
#define FT_GLYPH_OWN_BITMAP
Definition: ftobjs.h:423
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 326 of file ftobjs.c.

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

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

351 {
352 FT_Outline* outline = &slot->outline;
353 FT_Bitmap* bitmap = &slot->bitmap;
354
355 FT_Pixel_Mode pixel_mode;
356
357 FT_BBox cbox, pbox;
358 FT_Pos x_shift = 0;
359 FT_Pos y_shift = 0;
360 FT_Pos x_left, y_top;
361 FT_Pos width, height, pitch;
362
363
364 if ( slot->format != FT_GLYPH_FORMAT_OUTLINE )
365 return 1;
366
367 if ( origin )
368 {
369 x_shift = origin->x;
370 y_shift = origin->y;
371 }
372
373 /* compute the control box, and grid-fit it, */
374 /* taking into account the origin shift */
376
377 /* rough estimate of pixel box */
378 pbox.xMin = ( cbox.xMin >> 6 ) + ( x_shift >> 6 );
379 pbox.yMin = ( cbox.yMin >> 6 ) + ( y_shift >> 6 );
380 pbox.xMax = ( cbox.xMax >> 6 ) + ( x_shift >> 6 );
381 pbox.yMax = ( cbox.yMax >> 6 ) + ( y_shift >> 6 );
382
383 /* tiny remainder box */
384 cbox.xMin = ( cbox.xMin & 63 ) + ( x_shift & 63 );
385 cbox.yMin = ( cbox.yMin & 63 ) + ( y_shift & 63 );
386 cbox.xMax = ( cbox.xMax & 63 ) + ( x_shift & 63 );
387 cbox.yMax = ( cbox.yMax & 63 ) + ( y_shift & 63 );
388
389 switch ( mode )
390 {
392 pixel_mode = FT_PIXEL_MODE_MONO;
393#if 1
394 /* x */
395
396 /* undocumented but confirmed: bbox values get rounded; */
397 /* we do asymmetric rounding so that the center of a pixel */
398 /* gets always included */
399
400 pbox.xMin += ( cbox.xMin + 31 ) >> 6;
401 pbox.xMax += ( cbox.xMax + 32 ) >> 6;
402
403 /* if the bbox collapsed, we add a pixel based on the total */
404 /* rounding remainder to cover most of the original cbox */
405
406 if ( pbox.xMin == pbox.xMax )
407 {
408 if ( ( ( cbox.xMin + 31 ) & 63 ) - 31 +
409 ( ( cbox.xMax + 32 ) & 63 ) - 32 < 0 )
410 pbox.xMin -= 1;
411 else
412 pbox.xMax += 1;
413 }
414
415 /* y */
416
417 pbox.yMin += ( cbox.yMin + 31 ) >> 6;
418 pbox.yMax += ( cbox.yMax + 32 ) >> 6;
419
420 if ( pbox.yMin == pbox.yMax )
421 {
422 if ( ( ( cbox.yMin + 31 ) & 63 ) - 31 +
423 ( ( cbox.yMax + 32 ) & 63 ) - 32 < 0 )
424 pbox.yMin -= 1;
425 else
426 pbox.yMax += 1;
427 }
428
429 break;
430#else
431 goto Adjust;
432#endif
433
435 pixel_mode = FT_PIXEL_MODE_LCD;
436 ft_lcd_padding( &cbox, slot, mode );
437 goto Adjust;
438
440 pixel_mode = FT_PIXEL_MODE_LCD_V;
441 ft_lcd_padding( &cbox, slot, mode );
442 goto Adjust;
443
446 default:
447 pixel_mode = FT_PIXEL_MODE_GRAY;
448 Adjust:
449 pbox.xMin += cbox.xMin >> 6;
450 pbox.yMin += cbox.yMin >> 6;
451 pbox.xMax += ( cbox.xMax + 63 ) >> 6;
452 pbox.yMax += ( cbox.yMax + 63 ) >> 6;
453 }
454
455 x_left = pbox.xMin;
456 y_top = pbox.yMax;
457
458 width = pbox.xMax - pbox.xMin;
459 height = pbox.yMax - pbox.yMin;
460
461 switch ( pixel_mode )
462 {
464 pitch = ( ( width + 15 ) >> 4 ) << 1;
465 break;
466
468 width *= 3;
469 pitch = FT_PAD_CEIL( width, 4 );
470 break;
471
473 height *= 3;
474 /* fall through */
475
477 default:
478 pitch = width;
479 }
480
481 slot->bitmap_left = (FT_Int)x_left;
482 slot->bitmap_top = (FT_Int)y_top;
483
484 bitmap->pixel_mode = (unsigned char)pixel_mode;
485 bitmap->num_grays = 256;
486 bitmap->width = (unsigned int)width;
487 bitmap->rows = (unsigned int)height;
488 bitmap->pitch = pitch;
489
490 if ( pbox.xMin < -0x8000 || pbox.xMax > 0x7FFF ||
491 pbox.yMin < -0x8000 || pbox.yMax > 0x7FFF )
492 {
493 FT_TRACE3(( "ft_glyphslot_preset_bitmap: [%ld %ld %ld %ld]\n",
494 pbox.xMin, pbox.yMin, pbox.xMax, pbox.yMax ));
495 return 1;
496 }
497
498 return 0;
499 }
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:3258
@ FT_RENDER_MODE_NORMAL
Definition: freetype.h:3256
@ FT_RENDER_MODE_LIGHT
Definition: freetype.h:3257
@ FT_RENDER_MODE_LCD_V
Definition: freetype.h:3260
@ FT_RENDER_MODE_LCD
Definition: freetype.h:3259
#define FT_TRACE3(varformat)
Definition: ftdebug.h:188
@ FT_PIXEL_MODE_LCD_V
Definition: ftimage.h:189
@ FT_PIXEL_MODE_MONO
Definition: ftimage.h:184
@ FT_PIXEL_MODE_GRAY
Definition: ftimage.h:185
@ FT_PIXEL_MODE_LCD
Definition: ftimage.h:188
enum FT_Pixel_Mode_ FT_Pixel_Mode
ft_lcd_padding(FT_BBox *cbox, FT_GlyphSlot slot, FT_Render_Mode mode)
Definition: ftlcdfil.c:373
#define FT_PAD_CEIL(x, n)
Definition: ftobjs.h:89
FT_Outline_Get_CBox(const FT_Outline *outline, FT_BBox *acbox)
Definition: ftoutln.c:459
smooth FT_Module_Constructor FT_Module_Destructor FT_Module_Requester FT_GLYPH_FORMAT_OUTLINE
Definition: ftsmooth.c:465
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:121
FT_Pos yMax
Definition: ftimage.h:122
FT_Pos yMin
Definition: ftimage.h:121
FT_Pos xMax
Definition: ftimage.h:122
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 503 of file ftobjs.c.

505 {
507
508 slot->bitmap.buffer = buffer;
509
510 FT_ASSERT( (slot->internal->flags & FT_GLYPH_OWN_BITMAP) == 0 );
511 }
#define FT_ASSERT(condition)
Definition: ftdebug.h:239
ft_glyphslot_free_bitmap(FT_GlyphSlot slot)
Definition: ftobjs.c:326
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 373 of file ftlcdfil.c.

376 {
377 FT_Vector* sub = slot->library->lcd_geometry;
378
379 if ( mode == FT_RENDER_MODE_LCD )
380 {
381 cbox->xMin -= FT_MAX( FT_MAX( sub[0].x, sub[1].x ), sub[2].x );
382 cbox->xMax -= FT_MIN( FT_MIN( sub[0].x, sub[1].x ), sub[2].x );
383 cbox->yMin -= FT_MAX( FT_MAX( sub[0].y, sub[1].y ), sub[2].y );
384 cbox->yMax -= FT_MIN( FT_MIN( sub[0].y, sub[1].y ), sub[2].y );
385 }
386 else if ( mode == FT_RENDER_MODE_LCD_V )
387 {
388 cbox->xMin -= FT_MAX( FT_MAX( sub[0].y, sub[1].y ), sub[2].y );
389 cbox->xMax -= FT_MIN( FT_MIN( sub[0].y, sub[1].y ), sub[2].y );
390 cbox->yMin += FT_MIN( FT_MIN( sub[0].x, sub[1].x ), sub[2].x );
391 cbox->yMax += FT_MAX( FT_MAX( sub[0].x, sub[1].x ), sub[2].x );
392 }
393 }
#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 4307 of file ftobjs.c.

4310 {
4313
4314
4315 if ( !library )
4316 goto Exit;
4317
4319
4320 if ( node )
4321 {
4322 if ( *node )
4323 cur = (*node)->next;
4324 *node = NULL;
4325 }
4326
4327 while ( cur )
4328 {
4329 FT_Renderer renderer = FT_RENDERER( cur->data );
4330
4331
4332 if ( renderer->glyph_format == format )
4333 {
4334 if ( node )
4335 *node = cur;
4336
4337 result = renderer;
4338 break;
4339 }
4340 cur = cur->next;
4341 }
4342
4343 Exit:
4344 return result;
4345 }
#define FT_RENDERER(x)
Definition: ftobjs.h:737
GLuint64EXT * result
Definition: glext.h:11304
FT_ListRec renderers
Definition: ftobjs.h:906
FT_ListNode head
Definition: fttypes.h:582
FT_Glyph_Format glyph_format
Definition: ftobjs.h:747
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 2919 of file ftobjs.c.

2923 {
2924 FT_Int i;
2925 FT_Long w, h;
2926
2927
2928 if ( !FT_HAS_FIXED_SIZES( face ) )
2929 return FT_THROW( Invalid_Face_Handle );
2930
2931 /* FT_Bitmap_Size doesn't provide enough info... */
2932 if ( req->type != FT_SIZE_REQUEST_TYPE_NOMINAL )
2933 return FT_THROW( Unimplemented_Feature );
2934
2935 w = FT_REQUEST_WIDTH ( req );
2936 h = FT_REQUEST_HEIGHT( req );
2937
2938 if ( req->width && !req->height )
2939 h = w;
2940 else if ( !req->width && req->height )
2941 w = h;
2942
2943 w = FT_PIX_ROUND( w );
2944 h = FT_PIX_ROUND( h );
2945
2946 if ( !w || !h )
2947 return FT_THROW( Invalid_Pixel_Size );
2948
2949 for ( i = 0; i < face->num_fixed_sizes; i++ )
2950 {
2951 FT_Bitmap_Size* bsize = face->available_sizes + i;
2952
2953
2954 if ( h != FT_PIX_ROUND( bsize->y_ppem ) )
2955 continue;
2956
2957 if ( w == FT_PIX_ROUND( bsize->x_ppem ) || ignore_width )
2958 {
2959 FT_TRACE3(( "FT_Match_Size: bitmap strike %d matches\n", i ));
2960
2961 if ( size_index )
2962 *size_index = (FT_ULong)i;
2963
2964 return FT_Err_Ok;
2965 }
2966 }
2967
2968 FT_TRACE3(( "FT_Match_Size: no matching bitmap strike\n" ));
2969
2970 return FT_THROW( Invalid_Pixel_Size );
2971 }
@ FT_SIZE_REQUEST_TYPE_NOMINAL
Definition: freetype.h:2557
#define FT_HAS_FIXED_SIZES(face)
Definition: freetype.h:1333
#define FT_REQUEST_WIDTH(req)
Definition: ftobjs.h:660
#define FT_REQUEST_HEIGHT(req)
Definition: ftobjs.h:665
#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:379
FT_Pos x_ppem
Definition: freetype.h:378
FT_Size_Request_Type type
Definition: freetype.h:2609

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

5010 {
5012
5013
5014 if ( module )
5015 {
5016 FT_ASSERT( module->clazz && module->clazz->get_interface );
5017
5018 /* first, look for the service in the module */
5019 if ( module->clazz->get_interface )
5020 result = module->clazz->get_interface( module, service_id );
5021
5022 if ( global && !result )
5023 {
5024 /* we didn't find it, look in all other modules then */
5025 FT_Library library = module->library;
5028
5029
5030 for ( ; cur < limit; cur++ )
5031 {
5032 if ( cur[0] != module )
5033 {
5034 FT_ASSERT( cur[0]->clazz );
5035
5036 if ( cur[0]->clazz->get_interface )
5037 {
5038 result = cur[0]->clazz->get_interface( cur[0], service_id );
5039 if ( result )
5040 break;
5041 }
5042 }
5043 }
5044 }
5045 }
5046
5047 return result;
5048 }
int global
Definition: ehframes.cpp:22
GLint limit
Definition: glext.h:10326
FT_Module modules[FT_MAX_MODULES]
Definition: ftobjs.h:904
FT_UInt num_modules
Definition: ftobjs.h:903

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

598 {
601 FT_Driver_Class clazz;
604
605
606 if ( !face )
607 return FT_THROW( Invalid_Face_Handle );
608
609 if ( !face->driver )
610 return FT_THROW( Invalid_Argument );
611
612 driver = face->driver;
613 clazz = driver->clazz;
614 memory = driver->root.memory;
615
616 FT_TRACE4(( "FT_New_GlyphSlot: Creating new slot object\n" ));
617 if ( !FT_ALLOC( slot, clazz->slot_object_size ) )
618 {
619 slot->face = face;
620
622 if ( error )
623 {
625 FT_FREE( slot );
626 goto Exit;
627 }
628
629 slot->next = face->glyph;
630 face->glyph = slot;
631
632 if ( aslot )
633 *aslot = slot;
634 }
635 else if ( aslot )
636 *aslot = NULL;
637
638
639 Exit:
640 FT_TRACE4(( "FT_New_GlyphSlot: Return 0x%x\n", error ));
641
642 return error;
643 }
#define FT_TRACE4(varformat)
Definition: ftdebug.h:189
static FT_Error ft_glyphslot_init(FT_GlyphSlot slot)
Definition: ftobjs.c:298
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 4528 of file ftobjs.c.

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

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

3074 {
3076
3077
3078 metrics = &face->size->metrics;
3079
3080 if ( FT_IS_SCALABLE( face ) )
3081 {
3082 FT_Long w = 0, h = 0, scaled_w = 0, scaled_h = 0;
3083
3084
3085 switch ( req->type )
3086 {
3088 w = h = face->units_per_EM;
3089 break;
3090
3092 w = h = face->ascender - face->descender;
3093 break;
3094
3096 w = face->bbox.xMax - face->bbox.xMin;
3097 h = face->bbox.yMax - face->bbox.yMin;
3098 break;
3099
3101 w = face->max_advance_width;
3102 h = face->ascender - face->descender;
3103 break;
3104
3106 metrics->x_scale = (FT_Fixed)req->width;
3107 metrics->y_scale = (FT_Fixed)req->height;
3108 if ( !metrics->x_scale )
3109 metrics->x_scale = metrics->y_scale;
3110 else if ( !metrics->y_scale )
3111 metrics->y_scale = metrics->x_scale;
3112 goto Calculate_Ppem;
3113
3115 break;
3116 }
3117
3118 /* to be on the safe side */
3119 if ( w < 0 )
3120 w = -w;
3121
3122 if ( h < 0 )
3123 h = -h;
3124
3125 scaled_w = FT_REQUEST_WIDTH ( req );
3126 scaled_h = FT_REQUEST_HEIGHT( req );
3127
3128 /* determine scales */
3129 if ( req->width )
3130 {
3131 metrics->x_scale = FT_DivFix( scaled_w, w );
3132
3133 if ( req->height )
3134 {
3135 metrics->y_scale = FT_DivFix( scaled_h, h );
3136
3137 if ( req->type == FT_SIZE_REQUEST_TYPE_CELL )
3138 {
3139 if ( metrics->y_scale > metrics->x_scale )
3140 metrics->y_scale = metrics->x_scale;
3141 else
3142 metrics->x_scale = metrics->y_scale;
3143 }
3144 }
3145 else
3146 {
3147 metrics->y_scale = metrics->x_scale;
3148 scaled_h = FT_MulDiv( scaled_w, h, w );
3149 }
3150 }
3151 else
3152 {
3153 metrics->x_scale = metrics->y_scale = FT_DivFix( scaled_h, h );
3154 scaled_w = FT_MulDiv( scaled_h, w, h );
3155 }
3156
3157 Calculate_Ppem:
3158 /* calculate the ppems */
3159 if ( req->type != FT_SIZE_REQUEST_TYPE_NOMINAL )
3160 {
3161 scaled_w = FT_MulFix( face->units_per_EM, metrics->x_scale );
3162 scaled_h = FT_MulFix( face->units_per_EM, metrics->y_scale );
3163 }
3164
3165 metrics->x_ppem = (FT_UShort)( ( scaled_w + 32 ) >> 6 );
3166 metrics->y_ppem = (FT_UShort)( ( scaled_h + 32 ) >> 6 );
3167
3169 }
3170 else
3171 {
3172 FT_ZERO( metrics );
3173 metrics->x_scale = 1L << 16;
3174 metrics->y_scale = 1L << 16;
3175 }
3176 }
@ FT_SIZE_REQUEST_TYPE_BBOX
Definition: freetype.h:2559
@ FT_SIZE_REQUEST_TYPE_REAL_DIM
Definition: freetype.h:2558
@ FT_SIZE_REQUEST_TYPE_SCALES
Definition: freetype.h:2561
@ FT_SIZE_REQUEST_TYPE_MAX
Definition: freetype.h:2563
@ FT_SIZE_REQUEST_TYPE_CELL
Definition: freetype.h:2560
FT_DivFix(FT_Long a, FT_Long b)
Definition: ftcalc.c:608
#define FT_IS_SCALABLE(face)
Definition: freetype.h:1284
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:3003
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 3037 of file ftobjs.c.

3039 {
3041 FT_Bitmap_Size* bsize;
3042
3043
3044 metrics = &face->size->metrics;
3045 bsize = face->available_sizes + strike_index;
3046
3047 metrics->x_ppem = (FT_UShort)( ( bsize->x_ppem + 32 ) >> 6 );
3048 metrics->y_ppem = (FT_UShort)( ( bsize->y_ppem + 32 ) >> 6 );
3049
3050 if ( FT_IS_SCALABLE( face ) )
3051 {
3052 metrics->x_scale = FT_DivFix( bsize->x_ppem,
3053 face->units_per_EM );
3054 metrics->y_scale = FT_DivFix( bsize->y_ppem,
3055 face->units_per_EM );
3056
3058 }
3059 else
3060 {
3061 metrics->x_scale = 1L << 16;
3062 metrics->y_scale = 1L << 16;
3063 metrics->ascender = bsize->y_ppem;
3064 metrics->descender = 0;
3065 metrics->height = bsize->height << 6;
3066 metrics->max_advance = bsize->x_ppem;
3067 }
3068 }
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 2977 of file ftobjs.c.

2979 {
2980 FT_Pos height = metrics->height;
2981
2982
2983 /* compensate for glyph with bbox above/below the baseline */
2984 if ( metrics->horiBearingY < 0 )
2985 {
2986 if ( height < metrics->horiBearingY )
2987 height = metrics->horiBearingY;
2988 }
2989 else if ( metrics->horiBearingY > 0 )
2990 height -= metrics->horiBearingY;
2991
2992 /* the factor 1.2 is a heuristical value */
2993 if ( !advance )
2994 advance = height * 12 / 10;
2995
2996 metrics->vertBearingX = metrics->horiBearingX - metrics->horiAdvance / 2;
2997 metrics->vertBearingY = ( advance - height ) / 2;
2998 metrics->vertAdvance = advance;
2999 }
_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().