ReactOS 0.4.16-dev-2332-g4cba65d
freetype.h File Reference
#include <ft2build.h>
#include <freetype/fttypes.h>
#include <freetype/fterrors.h>
Include dependency graph for freetype.h:

Go to the source code of this file.

Classes

struct  FT_Glyph_Metrics_
 
struct  FT_Bitmap_Size_
 
struct  FT_CharMapRec_
 
struct  FT_FaceRec_
 
struct  FT_Size_Metrics_
 
struct  FT_SizeRec_
 
struct  FT_GlyphSlotRec_
 
struct  FT_Parameter_
 
struct  FT_Open_Args_
 
struct  FT_Size_RequestRec_
 
struct  FT_LayerIterator_
 

Macros

#define FT_ENC_TAG(value, a, b, c, d)
 
#define ft_encoding_none   FT_ENCODING_NONE
 
#define ft_encoding_unicode   FT_ENCODING_UNICODE
 
#define ft_encoding_symbol   FT_ENCODING_MS_SYMBOL
 
#define ft_encoding_latin_1   FT_ENCODING_ADOBE_LATIN_1
 
#define ft_encoding_latin_2   FT_ENCODING_OLD_LATIN_2
 
#define ft_encoding_sjis   FT_ENCODING_SJIS
 
#define ft_encoding_gb2312   FT_ENCODING_PRC
 
#define ft_encoding_big5   FT_ENCODING_BIG5
 
#define ft_encoding_wansung   FT_ENCODING_WANSUNG
 
#define ft_encoding_johab   FT_ENCODING_JOHAB
 
#define ft_encoding_adobe_standard   FT_ENCODING_ADOBE_STANDARD
 
#define ft_encoding_adobe_expert   FT_ENCODING_ADOBE_EXPERT
 
#define ft_encoding_adobe_custom   FT_ENCODING_ADOBE_CUSTOM
 
#define ft_encoding_apple_roman   FT_ENCODING_APPLE_ROMAN
 
#define FT_FACE_FLAG_SCALABLE   ( 1L << 0 )
 
#define FT_FACE_FLAG_FIXED_SIZES   ( 1L << 1 )
 
#define FT_FACE_FLAG_FIXED_WIDTH   ( 1L << 2 )
 
#define FT_FACE_FLAG_SFNT   ( 1L << 3 )
 
#define FT_FACE_FLAG_HORIZONTAL   ( 1L << 4 )
 
#define FT_FACE_FLAG_VERTICAL   ( 1L << 5 )
 
#define FT_FACE_FLAG_KERNING   ( 1L << 6 )
 
#define FT_FACE_FLAG_FAST_GLYPHS   ( 1L << 7 )
 
#define FT_FACE_FLAG_MULTIPLE_MASTERS   ( 1L << 8 )
 
#define FT_FACE_FLAG_GLYPH_NAMES   ( 1L << 9 )
 
#define FT_FACE_FLAG_EXTERNAL_STREAM   ( 1L << 10 )
 
#define FT_FACE_FLAG_HINTER   ( 1L << 11 )
 
#define FT_FACE_FLAG_CID_KEYED   ( 1L << 12 )
 
#define FT_FACE_FLAG_TRICKY   ( 1L << 13 )
 
#define FT_FACE_FLAG_COLOR   ( 1L << 14 )
 
#define FT_FACE_FLAG_VARIATION   ( 1L << 15 )
 
#define FT_HAS_HORIZONTAL(face)    ( !!( (face)->face_flags & FT_FACE_FLAG_HORIZONTAL ) )
 
#define FT_HAS_VERTICAL(face)    ( !!( (face)->face_flags & FT_FACE_FLAG_VERTICAL ) )
 
#define FT_HAS_KERNING(face)    ( !!( (face)->face_flags & FT_FACE_FLAG_KERNING ) )
 
#define FT_IS_SCALABLE(face)    ( !!( (face)->face_flags & FT_FACE_FLAG_SCALABLE ) )
 
#define FT_IS_SFNT(face)    ( !!( (face)->face_flags & FT_FACE_FLAG_SFNT ) )
 
#define FT_IS_FIXED_WIDTH(face)    ( !!( (face)->face_flags & FT_FACE_FLAG_FIXED_WIDTH ) )
 
#define FT_HAS_FIXED_SIZES(face)    ( !!( (face)->face_flags & FT_FACE_FLAG_FIXED_SIZES ) )
 
#define FT_HAS_FAST_GLYPHS(face)   0
 
#define FT_HAS_GLYPH_NAMES(face)    ( !!( (face)->face_flags & FT_FACE_FLAG_GLYPH_NAMES ) )
 
#define FT_HAS_MULTIPLE_MASTERS(face)    ( !!( (face)->face_flags & FT_FACE_FLAG_MULTIPLE_MASTERS ) )
 
#define FT_IS_NAMED_INSTANCE(face)    ( !!( (face)->face_index & 0x7FFF0000L ) )
 
#define FT_IS_VARIATION(face)    ( !!( (face)->face_flags & FT_FACE_FLAG_VARIATION ) )
 
#define FT_IS_CID_KEYED(face)    ( !!( (face)->face_flags & FT_FACE_FLAG_CID_KEYED ) )
 
#define FT_IS_TRICKY(face)    ( !!( (face)->face_flags & FT_FACE_FLAG_TRICKY ) )
 
#define FT_HAS_COLOR(face)    ( !!( (face)->face_flags & FT_FACE_FLAG_COLOR ) )
 
#define FT_STYLE_FLAG_ITALIC   ( 1 << 0 )
 
#define FT_STYLE_FLAG_BOLD   ( 1 << 1 )
 
#define FT_OPEN_MEMORY   0x1
 
#define FT_OPEN_STREAM   0x2
 
#define FT_OPEN_PATHNAME   0x4
 
#define FT_OPEN_DRIVER   0x8
 
#define FT_OPEN_PARAMS   0x10
 
#define ft_open_memory   FT_OPEN_MEMORY
 
#define ft_open_stream   FT_OPEN_STREAM
 
#define ft_open_pathname   FT_OPEN_PATHNAME
 
#define ft_open_driver   FT_OPEN_DRIVER
 
#define ft_open_params   FT_OPEN_PARAMS
 
#define FT_LOAD_DEFAULT   0x0
 
#define FT_LOAD_NO_SCALE   ( 1L << 0 )
 
#define FT_LOAD_NO_HINTING   ( 1L << 1 )
 
#define FT_LOAD_RENDER   ( 1L << 2 )
 
#define FT_LOAD_NO_BITMAP   ( 1L << 3 )
 
#define FT_LOAD_VERTICAL_LAYOUT   ( 1L << 4 )
 
#define FT_LOAD_FORCE_AUTOHINT   ( 1L << 5 )
 
#define FT_LOAD_CROP_BITMAP   ( 1L << 6 )
 
#define FT_LOAD_PEDANTIC   ( 1L << 7 )
 
#define FT_LOAD_IGNORE_GLOBAL_ADVANCE_WIDTH   ( 1L << 9 )
 
#define FT_LOAD_NO_RECURSE   ( 1L << 10 )
 
#define FT_LOAD_IGNORE_TRANSFORM   ( 1L << 11 )
 
#define FT_LOAD_MONOCHROME   ( 1L << 12 )
 
#define FT_LOAD_LINEAR_DESIGN   ( 1L << 13 )
 
#define FT_LOAD_NO_AUTOHINT   ( 1L << 15 )
 
#define FT_LOAD_COLOR   ( 1L << 20 )
 
#define FT_LOAD_COMPUTE_METRICS   ( 1L << 21 )
 
#define FT_LOAD_BITMAP_METRICS_ONLY   ( 1L << 22 )
 
#define FT_LOAD_ADVANCE_ONLY   ( 1L << 8 )
 
#define FT_LOAD_SBITS_ONLY   ( 1L << 14 )
 
#define FT_LOAD_TARGET_(x)   ( (FT_Int32)( (x) & 15 ) << 16 )
 
#define FT_LOAD_TARGET_NORMAL   FT_LOAD_TARGET_( FT_RENDER_MODE_NORMAL )
 
#define FT_LOAD_TARGET_LIGHT   FT_LOAD_TARGET_( FT_RENDER_MODE_LIGHT )
 
#define FT_LOAD_TARGET_MONO   FT_LOAD_TARGET_( FT_RENDER_MODE_MONO )
 
#define FT_LOAD_TARGET_LCD   FT_LOAD_TARGET_( FT_RENDER_MODE_LCD )
 
#define FT_LOAD_TARGET_LCD_V   FT_LOAD_TARGET_( FT_RENDER_MODE_LCD_V )
 
#define FT_LOAD_TARGET_MODE(x)   ( (FT_Render_Mode)( ( (x) >> 16 ) & 15 ) )
 
#define ft_render_mode_normal   FT_RENDER_MODE_NORMAL
 
#define ft_render_mode_mono   FT_RENDER_MODE_MONO
 
#define ft_kerning_default   FT_KERNING_DEFAULT
 
#define ft_kerning_unfitted   FT_KERNING_UNFITTED
 
#define ft_kerning_unscaled   FT_KERNING_UNSCALED
 
#define FT_SUBGLYPH_FLAG_ARGS_ARE_WORDS   1
 
#define FT_SUBGLYPH_FLAG_ARGS_ARE_XY_VALUES   2
 
#define FT_SUBGLYPH_FLAG_ROUND_XY_TO_GRID   4
 
#define FT_SUBGLYPH_FLAG_SCALE   8
 
#define FT_SUBGLYPH_FLAG_XY_SCALE   0x40
 
#define FT_SUBGLYPH_FLAG_2X2   0x80
 
#define FT_SUBGLYPH_FLAG_USE_MY_METRICS   0x200
 
#define FT_FSTYPE_INSTALLABLE_EMBEDDING   0x0000
 
#define FT_FSTYPE_RESTRICTED_LICENSE_EMBEDDING   0x0002
 
#define FT_FSTYPE_PREVIEW_AND_PRINT_EMBEDDING   0x0004
 
#define FT_FSTYPE_EDITABLE_EMBEDDING   0x0008
 
#define FT_FSTYPE_NO_SUBSETTING   0x0100
 
#define FT_FSTYPE_BITMAP_EMBEDDING_ONLY   0x0200
 
#define FREETYPE_MAJOR   2
 
#define FREETYPE_MINOR   10
 
#define FREETYPE_PATCH   4
 

Typedefs

typedef FT_BEGIN_HEADER struct FT_Glyph_Metrics_ FT_Glyph_Metrics
 
typedef struct FT_Bitmap_Size_ FT_Bitmap_Size
 
typedef struct FT_LibraryRec_FT_Library
 
typedef struct FT_ModuleRec_FT_Module
 
typedef struct FT_DriverRec_FT_Driver
 
typedef struct FT_RendererRec_FT_Renderer
 
typedef struct FT_FaceRec_FT_Face
 
typedef struct FT_SizeRec_FT_Size
 
typedef struct FT_GlyphSlotRec_FT_GlyphSlot
 
typedef struct FT_CharMapRec_FT_CharMap
 
typedef enum FT_Encoding_ FT_Encoding
 
typedef struct FT_CharMapRec_ FT_CharMapRec
 
typedef struct FT_Face_InternalRec_FT_Face_Internal
 
typedef struct FT_FaceRec_ FT_FaceRec
 
typedef struct FT_Size_InternalRec_FT_Size_Internal
 
typedef struct FT_Size_Metrics_ FT_Size_Metrics
 
typedef struct FT_SizeRec_ FT_SizeRec
 
typedef struct FT_SubGlyphRec_FT_SubGlyph
 
typedef struct FT_Slot_InternalRec_FT_Slot_Internal
 
typedef struct FT_GlyphSlotRec_ FT_GlyphSlotRec
 
typedef struct FT_Parameter_ FT_Parameter
 
typedef struct FT_Open_Args_ FT_Open_Args
 
typedef enum FT_Size_Request_Type_ FT_Size_Request_Type
 
typedef struct FT_Size_RequestRec_ FT_Size_RequestRec
 
typedef struct FT_Size_RequestRec_FT_Size_Request
 
typedef enum FT_Render_Mode_ FT_Render_Mode
 
typedef enum FT_Kerning_Mode_ FT_Kerning_Mode
 
typedef struct FT_LayerIterator_ FT_LayerIterator
 

Enumerations

enum  FT_Encoding_ {
  FT_ENC_TAG =( FT_ENCODING_NONE, 0, 0, 0, 0 ) , FT_ENC_TAG =( FT_ENCODING_NONE, 0, 0, 0, 0 ) , FT_ENC_TAG =( FT_ENCODING_NONE, 0, 0, 0, 0 ) , FT_ENC_TAG =( FT_ENCODING_NONE, 0, 0, 0, 0 ) ,
  FT_ENC_TAG =( FT_ENCODING_NONE, 0, 0, 0, 0 ) , FT_ENC_TAG =( FT_ENCODING_NONE, 0, 0, 0, 0 ) , FT_ENC_TAG =( FT_ENCODING_NONE, 0, 0, 0, 0 ) , FT_ENC_TAG =( FT_ENCODING_NONE, 0, 0, 0, 0 ) ,
  FT_ENCODING_GB2312 = FT_ENCODING_PRC , FT_ENCODING_MS_SJIS = FT_ENCODING_SJIS , FT_ENCODING_MS_GB2312 = FT_ENCODING_PRC , FT_ENCODING_MS_BIG5 = FT_ENCODING_BIG5 ,
  FT_ENCODING_MS_WANSUNG = FT_ENCODING_WANSUNG , FT_ENCODING_MS_JOHAB = FT_ENCODING_JOHAB , FT_ENC_TAG =( FT_ENCODING_NONE, 0, 0, 0, 0 ) , FT_ENC_TAG =( FT_ENCODING_NONE, 0, 0, 0, 0 ) ,
  FT_ENC_TAG =( FT_ENCODING_NONE, 0, 0, 0, 0 ) , FT_ENC_TAG =( FT_ENCODING_NONE, 0, 0, 0, 0 ) , FT_ENC_TAG =( FT_ENCODING_NONE, 0, 0, 0, 0 )
}
 
enum  FT_Size_Request_Type_ {
  FT_SIZE_REQUEST_TYPE_NOMINAL , FT_SIZE_REQUEST_TYPE_REAL_DIM , FT_SIZE_REQUEST_TYPE_BBOX , FT_SIZE_REQUEST_TYPE_CELL ,
  FT_SIZE_REQUEST_TYPE_SCALES , FT_SIZE_REQUEST_TYPE_MAX
}
 
enum  FT_Render_Mode_ {
  FT_RENDER_MODE_NORMAL = 0 , FT_RENDER_MODE_LIGHT , FT_RENDER_MODE_MONO , FT_RENDER_MODE_LCD ,
  FT_RENDER_MODE_LCD_V , FT_RENDER_MODE_MAX
}
 
enum  FT_Kerning_Mode_ { FT_KERNING_DEFAULT = 0 , FT_KERNING_UNFITTED , FT_KERNING_UNSCALED }
 

Functions

 FT_Init_FreeType (FT_Library *alibrary)
 
 FT_Done_FreeType (FT_Library library)
 
 FT_New_Face (FT_Library library, const char *filepathname, FT_Long face_index, FT_Face *aface)
 
 FT_New_Memory_Face (FT_Library library, const FT_Byte *file_base, FT_Long file_size, FT_Long face_index, FT_Face *aface)
 
 FT_Open_Face (FT_Library library, const FT_Open_Args *args, FT_Long face_index, FT_Face *aface)
 
 FT_Attach_File (FT_Face face, const char *filepathname)
 
 FT_Attach_Stream (FT_Face face, FT_Open_Args *parameters)
 
 FT_Reference_Face (FT_Face face)
 
 FT_Done_Face (FT_Face face)
 
 FT_Select_Size (FT_Face face, FT_Int strike_index)
 
 FT_Request_Size (FT_Face face, FT_Size_Request req)
 
 FT_Set_Char_Size (FT_Face face, FT_F26Dot6 char_width, FT_F26Dot6 char_height, FT_UInt horz_resolution, FT_UInt vert_resolution)
 
 FT_Set_Pixel_Sizes (FT_Face face, FT_UInt pixel_width, FT_UInt pixel_height)
 
 FT_Load_Glyph (FT_Face face, FT_UInt glyph_index, FT_Int32 load_flags)
 
 FT_Load_Char (FT_Face face, FT_ULong char_code, FT_Int32 load_flags)
 
 FT_Set_Transform (FT_Face face, FT_Matrix *matrix, FT_Vector *delta)
 
 FT_Render_Glyph (FT_GlyphSlot slot, FT_Render_Mode render_mode)
 
 FT_Get_Kerning (FT_Face face, FT_UInt left_glyph, FT_UInt right_glyph, FT_UInt kern_mode, FT_Vector *akerning)
 
 FT_Get_Track_Kerning (FT_Face face, FT_Fixed point_size, FT_Int degree, FT_Fixed *akerning)
 
 FT_Get_Glyph_Name (FT_Face face, FT_UInt glyph_index, FT_Pointer buffer, FT_UInt buffer_max)
 
 FT_Get_Postscript_Name (FT_Face face)
 
 FT_Select_Charmap (FT_Face face, FT_Encoding encoding)
 
 FT_Set_Charmap (FT_Face face, FT_CharMap charmap)
 
 FT_Get_Charmap_Index (FT_CharMap charmap)
 
 FT_Get_Char_Index (FT_Face face, FT_ULong charcode)
 
 FT_Get_First_Char (FT_Face face, FT_UInt *agindex)
 
 FT_Get_Next_Char (FT_Face face, FT_ULong char_code, FT_UInt *agindex)
 
 FT_Face_Properties (FT_Face face, FT_UInt num_properties, FT_Parameter *properties)
 
 FT_Get_Name_Index (FT_Face face, const FT_String *glyph_name)
 
 FT_Get_SubGlyph_Info (FT_GlyphSlot glyph, FT_UInt sub_index, FT_Int *p_index, FT_UInt *p_flags, FT_Int *p_arg1, FT_Int *p_arg2, FT_Matrix *p_transform)
 
 FT_Get_Color_Glyph_Layer (FT_Face face, FT_UInt base_glyph, FT_UInt *aglyph_index, FT_UInt *acolor_index, FT_LayerIterator *iterator)
 
 FT_Get_FSType_Flags (FT_Face face)
 
 FT_Face_GetCharVariantIndex (FT_Face face, FT_ULong charcode, FT_ULong variantSelector)
 
 FT_Face_GetCharVariantIsDefault (FT_Face face, FT_ULong charcode, FT_ULong variantSelector)
 
 FT_Face_GetVariantSelectors (FT_Face face)
 
 FT_Face_GetVariantsOfChar (FT_Face face, FT_ULong charcode)
 
 FT_Face_GetCharsOfVariant (FT_Face face, FT_ULong variantSelector)
 
 FT_MulDiv (FT_Long a, FT_Long b, FT_Long c)
 
 FT_MulFix (FT_Long a, FT_Long b)
 
 FT_DivFix (FT_Long a, FT_Long b)
 
 FT_RoundFix (FT_Fixed a)
 
 FT_CeilFix (FT_Fixed a)
 
 FT_FloorFix (FT_Fixed a)
 
 FT_Vector_Transform (FT_Vector *vector, const FT_Matrix *matrix)
 
 FT_Library_Version (FT_Library library, FT_Int *amajor, FT_Int *aminor, FT_Int *apatch)
 
 FT_Face_CheckTrueTypePatents (FT_Face face)
 
 FT_Face_SetUnpatentedHinting (FT_Face face, FT_Bool value)
 

Macro Definition Documentation

◆ FREETYPE_MAJOR

#define FREETYPE_MAJOR   2

Definition at line 4768 of file freetype.h.

◆ FREETYPE_MINOR

#define FREETYPE_MINOR   10

Definition at line 4769 of file freetype.h.

◆ FREETYPE_PATCH

#define FREETYPE_PATCH   4

Definition at line 4770 of file freetype.h.

◆ FT_ENC_TAG

#define FT_ENC_TAG (   value,
  a,
  b,
  c,
  d 
)
Value:
value = ( ( (FT_UInt32)(a) << 24 ) | \
( (FT_UInt32)(b) << 16 ) | \
( (FT_UInt32)(c) << 8 ) | \
(FT_UInt32)(d) )
const GLubyte * c
Definition: glext.h:8905
GLboolean GLboolean GLboolean GLboolean a
Definition: glext.h:6204
#define d
Definition: ke_i.h:81
#define b
Definition: ke_i.h:79
Definition: pdh_main.c:96

Definition at line 590 of file freetype.h.

◆ ft_encoding_adobe_custom

#define ft_encoding_adobe_custom   FT_ENCODING_ADOBE_CUSTOM

Definition at line 788 of file freetype.h.

◆ ft_encoding_adobe_expert

#define ft_encoding_adobe_expert   FT_ENCODING_ADOBE_EXPERT

Definition at line 787 of file freetype.h.

◆ ft_encoding_adobe_standard

#define ft_encoding_adobe_standard   FT_ENCODING_ADOBE_STANDARD

Definition at line 786 of file freetype.h.

◆ ft_encoding_apple_roman

#define ft_encoding_apple_roman   FT_ENCODING_APPLE_ROMAN

Definition at line 789 of file freetype.h.

◆ ft_encoding_big5

#define ft_encoding_big5   FT_ENCODING_BIG5

Definition at line 782 of file freetype.h.

◆ ft_encoding_gb2312

#define ft_encoding_gb2312   FT_ENCODING_PRC

Definition at line 781 of file freetype.h.

◆ ft_encoding_johab

#define ft_encoding_johab   FT_ENCODING_JOHAB

Definition at line 784 of file freetype.h.

◆ ft_encoding_latin_1

#define ft_encoding_latin_1   FT_ENCODING_ADOBE_LATIN_1

Definition at line 778 of file freetype.h.

◆ ft_encoding_latin_2

#define ft_encoding_latin_2   FT_ENCODING_OLD_LATIN_2

Definition at line 779 of file freetype.h.

◆ ft_encoding_none

#define ft_encoding_none   FT_ENCODING_NONE

Definition at line 775 of file freetype.h.

◆ ft_encoding_sjis

#define ft_encoding_sjis   FT_ENCODING_SJIS

Definition at line 780 of file freetype.h.

◆ ft_encoding_symbol

#define ft_encoding_symbol   FT_ENCODING_MS_SYMBOL

Definition at line 777 of file freetype.h.

◆ ft_encoding_unicode

#define ft_encoding_unicode   FT_ENCODING_UNICODE

Definition at line 776 of file freetype.h.

◆ ft_encoding_wansung

#define ft_encoding_wansung   FT_ENCODING_WANSUNG

Definition at line 783 of file freetype.h.

◆ FT_FACE_FLAG_CID_KEYED

#define FT_FACE_FLAG_CID_KEYED   ( 1L << 12 )

Definition at line 1209 of file freetype.h.

◆ FT_FACE_FLAG_COLOR

#define FT_FACE_FLAG_COLOR   ( 1L << 14 )

Definition at line 1211 of file freetype.h.

◆ FT_FACE_FLAG_EXTERNAL_STREAM

#define FT_FACE_FLAG_EXTERNAL_STREAM   ( 1L << 10 )

Definition at line 1207 of file freetype.h.

◆ FT_FACE_FLAG_FAST_GLYPHS

#define FT_FACE_FLAG_FAST_GLYPHS   ( 1L << 7 )

Definition at line 1204 of file freetype.h.

◆ FT_FACE_FLAG_FIXED_SIZES

#define FT_FACE_FLAG_FIXED_SIZES   ( 1L << 1 )

Definition at line 1198 of file freetype.h.

◆ FT_FACE_FLAG_FIXED_WIDTH

#define FT_FACE_FLAG_FIXED_WIDTH   ( 1L << 2 )

Definition at line 1199 of file freetype.h.

◆ FT_FACE_FLAG_GLYPH_NAMES

#define FT_FACE_FLAG_GLYPH_NAMES   ( 1L << 9 )

Definition at line 1206 of file freetype.h.

◆ FT_FACE_FLAG_HINTER

#define FT_FACE_FLAG_HINTER   ( 1L << 11 )

Definition at line 1208 of file freetype.h.

◆ FT_FACE_FLAG_HORIZONTAL

#define FT_FACE_FLAG_HORIZONTAL   ( 1L << 4 )

Definition at line 1201 of file freetype.h.

◆ FT_FACE_FLAG_KERNING

#define FT_FACE_FLAG_KERNING   ( 1L << 6 )

Definition at line 1203 of file freetype.h.

◆ FT_FACE_FLAG_MULTIPLE_MASTERS

#define FT_FACE_FLAG_MULTIPLE_MASTERS   ( 1L << 8 )

Definition at line 1205 of file freetype.h.

◆ FT_FACE_FLAG_SCALABLE

#define FT_FACE_FLAG_SCALABLE   ( 1L << 0 )

Definition at line 1197 of file freetype.h.

◆ FT_FACE_FLAG_SFNT

#define FT_FACE_FLAG_SFNT   ( 1L << 3 )

Definition at line 1200 of file freetype.h.

◆ FT_FACE_FLAG_TRICKY

#define FT_FACE_FLAG_TRICKY   ( 1L << 13 )

Definition at line 1210 of file freetype.h.

◆ FT_FACE_FLAG_VARIATION

#define FT_FACE_FLAG_VARIATION   ( 1L << 15 )

Definition at line 1212 of file freetype.h.

◆ FT_FACE_FLAG_VERTICAL

#define FT_FACE_FLAG_VERTICAL   ( 1L << 5 )

Definition at line 1202 of file freetype.h.

◆ FT_FSTYPE_BITMAP_EMBEDDING_ONLY

#define FT_FSTYPE_BITMAP_EMBEDDING_ONLY   0x0200

Definition at line 4245 of file freetype.h.

◆ FT_FSTYPE_EDITABLE_EMBEDDING

#define FT_FSTYPE_EDITABLE_EMBEDDING   0x0008

Definition at line 4243 of file freetype.h.

◆ FT_FSTYPE_INSTALLABLE_EMBEDDING

#define FT_FSTYPE_INSTALLABLE_EMBEDDING   0x0000

Definition at line 4240 of file freetype.h.

◆ FT_FSTYPE_NO_SUBSETTING

#define FT_FSTYPE_NO_SUBSETTING   0x0100

Definition at line 4244 of file freetype.h.

◆ FT_FSTYPE_PREVIEW_AND_PRINT_EMBEDDING

#define FT_FSTYPE_PREVIEW_AND_PRINT_EMBEDDING   0x0004

Definition at line 4242 of file freetype.h.

◆ FT_FSTYPE_RESTRICTED_LICENSE_EMBEDDING

#define FT_FSTYPE_RESTRICTED_LICENSE_EMBEDDING   0x0002

Definition at line 4241 of file freetype.h.

◆ FT_HAS_COLOR

#define FT_HAS_COLOR (   face)     ( !!( (face)->face_flags & FT_FACE_FLAG_COLOR ) )

Definition at line 1449 of file freetype.h.

◆ FT_HAS_FAST_GLYPHS

#define FT_HAS_FAST_GLYPHS (   face)    0

Definition at line 1333 of file freetype.h.

◆ FT_HAS_FIXED_SIZES

#define FT_HAS_FIXED_SIZES (   face)     ( !!( (face)->face_flags & FT_FACE_FLAG_FIXED_SIZES ) )

Definition at line 1320 of file freetype.h.

◆ FT_HAS_GLYPH_NAMES

#define FT_HAS_GLYPH_NAMES (   face)     ( !!( (face)->face_flags & FT_FACE_FLAG_GLYPH_NAMES ) )

Definition at line 1346 of file freetype.h.

◆ FT_HAS_HORIZONTAL

#define FT_HAS_HORIZONTAL (   face)     ( !!( (face)->face_flags & FT_FACE_FLAG_HORIZONTAL ) )

Definition at line 1228 of file freetype.h.

◆ FT_HAS_KERNING

#define FT_HAS_KERNING (   face)     ( !!( (face)->face_flags & FT_FACE_FLAG_KERNING ) )

Definition at line 1256 of file freetype.h.

◆ FT_HAS_MULTIPLE_MASTERS

#define FT_HAS_MULTIPLE_MASTERS (   face)     ( !!( (face)->face_flags & FT_FACE_FLAG_MULTIPLE_MASTERS ) )

Definition at line 1361 of file freetype.h.

◆ FT_HAS_VERTICAL

#define FT_HAS_VERTICAL (   face)     ( !!( (face)->face_flags & FT_FACE_FLAG_VERTICAL ) )

Definition at line 1242 of file freetype.h.

◆ FT_IS_CID_KEYED

#define FT_IS_CID_KEYED (   face)     ( !!( (face)->face_flags & FT_FACE_FLAG_CID_KEYED ) )

Definition at line 1418 of file freetype.h.

◆ FT_IS_FIXED_WIDTH

#define FT_IS_FIXED_WIDTH (   face)     ( !!( (face)->face_flags & FT_FACE_FLAG_FIXED_WIDTH ) )

Definition at line 1305 of file freetype.h.

◆ FT_IS_NAMED_INSTANCE

#define FT_IS_NAMED_INSTANCE (   face)     ( !!( (face)->face_index & 0x7FFF0000L ) )

Definition at line 1383 of file freetype.h.

◆ FT_IS_SCALABLE

#define FT_IS_SCALABLE (   face)     ( !!( (face)->face_flags & FT_FACE_FLAG_SCALABLE ) )

Definition at line 1271 of file freetype.h.

◆ FT_IS_SFNT

#define FT_IS_SFNT (   face)     ( !!( (face)->face_flags & FT_FACE_FLAG_SFNT ) )

Definition at line 1290 of file freetype.h.

◆ FT_IS_TRICKY

#define FT_IS_TRICKY (   face)     ( !!( (face)->face_flags & FT_FACE_FLAG_TRICKY ) )

Definition at line 1432 of file freetype.h.

◆ FT_IS_VARIATION

#define FT_IS_VARIATION (   face)     ( !!( (face)->face_flags & FT_FACE_FLAG_VARIATION ) )

Definition at line 1401 of file freetype.h.

◆ ft_kerning_default

#define ft_kerning_default   FT_KERNING_DEFAULT

Definition at line 3415 of file freetype.h.

◆ ft_kerning_unfitted

#define ft_kerning_unfitted   FT_KERNING_UNFITTED

Definition at line 3416 of file freetype.h.

◆ ft_kerning_unscaled

#define ft_kerning_unscaled   FT_KERNING_UNSCALED

Definition at line 3417 of file freetype.h.

◆ FT_LOAD_ADVANCE_ONLY

#define FT_LOAD_ADVANCE_ONLY   ( 1L << 8 )

Definition at line 3044 of file freetype.h.

◆ FT_LOAD_BITMAP_METRICS_ONLY

#define FT_LOAD_BITMAP_METRICS_ONLY   ( 1L << 22 )

Definition at line 3039 of file freetype.h.

◆ FT_LOAD_COLOR

#define FT_LOAD_COLOR   ( 1L << 20 )

Definition at line 3037 of file freetype.h.

◆ FT_LOAD_COMPUTE_METRICS

#define FT_LOAD_COMPUTE_METRICS   ( 1L << 21 )

Definition at line 3038 of file freetype.h.

◆ FT_LOAD_CROP_BITMAP

#define FT_LOAD_CROP_BITMAP   ( 1L << 6 )

Definition at line 3028 of file freetype.h.

◆ FT_LOAD_DEFAULT

#define FT_LOAD_DEFAULT   0x0

Definition at line 3021 of file freetype.h.

◆ FT_LOAD_FORCE_AUTOHINT

#define FT_LOAD_FORCE_AUTOHINT   ( 1L << 5 )

Definition at line 3027 of file freetype.h.

◆ FT_LOAD_IGNORE_GLOBAL_ADVANCE_WIDTH

#define FT_LOAD_IGNORE_GLOBAL_ADVANCE_WIDTH   ( 1L << 9 )

Definition at line 3030 of file freetype.h.

◆ FT_LOAD_IGNORE_TRANSFORM

#define FT_LOAD_IGNORE_TRANSFORM   ( 1L << 11 )

Definition at line 3032 of file freetype.h.

◆ FT_LOAD_LINEAR_DESIGN

#define FT_LOAD_LINEAR_DESIGN   ( 1L << 13 )

Definition at line 3034 of file freetype.h.

◆ FT_LOAD_MONOCHROME

#define FT_LOAD_MONOCHROME   ( 1L << 12 )

Definition at line 3033 of file freetype.h.

◆ FT_LOAD_NO_AUTOHINT

#define FT_LOAD_NO_AUTOHINT   ( 1L << 15 )

Definition at line 3035 of file freetype.h.

◆ FT_LOAD_NO_BITMAP

#define FT_LOAD_NO_BITMAP   ( 1L << 3 )

Definition at line 3025 of file freetype.h.

◆ FT_LOAD_NO_HINTING

#define FT_LOAD_NO_HINTING   ( 1L << 1 )

Definition at line 3023 of file freetype.h.

◆ FT_LOAD_NO_RECURSE

#define FT_LOAD_NO_RECURSE   ( 1L << 10 )

Definition at line 3031 of file freetype.h.

◆ FT_LOAD_NO_SCALE

#define FT_LOAD_NO_SCALE   ( 1L << 0 )

Definition at line 3022 of file freetype.h.

◆ FT_LOAD_PEDANTIC

#define FT_LOAD_PEDANTIC   ( 1L << 7 )

Definition at line 3029 of file freetype.h.

◆ FT_LOAD_RENDER

#define FT_LOAD_RENDER   ( 1L << 2 )

Definition at line 3024 of file freetype.h.

◆ FT_LOAD_SBITS_ONLY

#define FT_LOAD_SBITS_ONLY   ( 1L << 14 )

Definition at line 3045 of file freetype.h.

◆ FT_LOAD_TARGET_

#define FT_LOAD_TARGET_ (   x)    ( (FT_Int32)( (x) & 15 ) << 16 )

Definition at line 3135 of file freetype.h.

◆ FT_LOAD_TARGET_LCD

#define FT_LOAD_TARGET_LCD   FT_LOAD_TARGET_( FT_RENDER_MODE_LCD )

Definition at line 3140 of file freetype.h.

◆ FT_LOAD_TARGET_LCD_V

#define FT_LOAD_TARGET_LCD_V   FT_LOAD_TARGET_( FT_RENDER_MODE_LCD_V )

Definition at line 3141 of file freetype.h.

◆ FT_LOAD_TARGET_LIGHT

#define FT_LOAD_TARGET_LIGHT   FT_LOAD_TARGET_( FT_RENDER_MODE_LIGHT )

Definition at line 3138 of file freetype.h.

◆ FT_LOAD_TARGET_MODE

#define FT_LOAD_TARGET_MODE (   x)    ( (FT_Render_Mode)( ( (x) >> 16 ) & 15 ) )

Definition at line 3154 of file freetype.h.

◆ FT_LOAD_TARGET_MONO

#define FT_LOAD_TARGET_MONO   FT_LOAD_TARGET_( FT_RENDER_MODE_MONO )

Definition at line 3139 of file freetype.h.

◆ FT_LOAD_TARGET_NORMAL

#define FT_LOAD_TARGET_NORMAL   FT_LOAD_TARGET_( FT_RENDER_MODE_NORMAL )

Definition at line 3137 of file freetype.h.

◆ FT_LOAD_VERTICAL_LAYOUT

#define FT_LOAD_VERTICAL_LAYOUT   ( 1L << 4 )

Definition at line 3026 of file freetype.h.

◆ FT_OPEN_DRIVER

#define FT_OPEN_DRIVER   0x8

Definition at line 2006 of file freetype.h.

◆ ft_open_driver

#define ft_open_driver   FT_OPEN_DRIVER

Definition at line 2015 of file freetype.h.

◆ FT_OPEN_MEMORY

#define FT_OPEN_MEMORY   0x1

Definition at line 2003 of file freetype.h.

◆ ft_open_memory

#define ft_open_memory   FT_OPEN_MEMORY

Definition at line 2012 of file freetype.h.

◆ FT_OPEN_PARAMS

#define FT_OPEN_PARAMS   0x10

Definition at line 2007 of file freetype.h.

◆ ft_open_params

#define ft_open_params   FT_OPEN_PARAMS

Definition at line 2016 of file freetype.h.

◆ FT_OPEN_PATHNAME

#define FT_OPEN_PATHNAME   0x4

Definition at line 2005 of file freetype.h.

◆ ft_open_pathname

#define ft_open_pathname   FT_OPEN_PATHNAME

Definition at line 2014 of file freetype.h.

◆ FT_OPEN_STREAM

#define FT_OPEN_STREAM   0x2

Definition at line 2004 of file freetype.h.

◆ ft_open_stream

#define ft_open_stream   FT_OPEN_STREAM

Definition at line 2013 of file freetype.h.

◆ ft_render_mode_mono

#define ft_render_mode_mono   FT_RENDER_MODE_MONO

Definition at line 3263 of file freetype.h.

◆ ft_render_mode_normal

#define ft_render_mode_normal   FT_RENDER_MODE_NORMAL

Definition at line 3262 of file freetype.h.

◆ FT_STYLE_FLAG_BOLD

#define FT_STYLE_FLAG_BOLD   ( 1 << 1 )

Definition at line 1476 of file freetype.h.

◆ FT_STYLE_FLAG_ITALIC

#define FT_STYLE_FLAG_ITALIC   ( 1 << 0 )

Definition at line 1475 of file freetype.h.

◆ FT_SUBGLYPH_FLAG_2X2

#define FT_SUBGLYPH_FLAG_2X2   0x80

Definition at line 3959 of file freetype.h.

◆ FT_SUBGLYPH_FLAG_ARGS_ARE_WORDS

#define FT_SUBGLYPH_FLAG_ARGS_ARE_WORDS   1

Definition at line 3954 of file freetype.h.

◆ FT_SUBGLYPH_FLAG_ARGS_ARE_XY_VALUES

#define FT_SUBGLYPH_FLAG_ARGS_ARE_XY_VALUES   2

Definition at line 3955 of file freetype.h.

◆ FT_SUBGLYPH_FLAG_ROUND_XY_TO_GRID

#define FT_SUBGLYPH_FLAG_ROUND_XY_TO_GRID   4

Definition at line 3956 of file freetype.h.

◆ FT_SUBGLYPH_FLAG_SCALE

#define FT_SUBGLYPH_FLAG_SCALE   8

Definition at line 3957 of file freetype.h.

◆ FT_SUBGLYPH_FLAG_USE_MY_METRICS

#define FT_SUBGLYPH_FLAG_USE_MY_METRICS   0x200

Definition at line 3960 of file freetype.h.

◆ FT_SUBGLYPH_FLAG_XY_SCALE

#define FT_SUBGLYPH_FLAG_XY_SCALE   0x40

Definition at line 3958 of file freetype.h.

Typedef Documentation

◆ FT_Bitmap_Size

◆ FT_CharMap

Definition at line 566 of file freetype.h.

◆ FT_CharMapRec

◆ FT_Driver

Definition at line 431 of file freetype.h.

◆ FT_Encoding

◆ FT_Face

Definition at line 483 of file freetype.h.

◆ FT_Face_Internal

Definition at line 848 of file freetype.h.

◆ FT_FaceRec

◆ FT_Glyph_Metrics

◆ FT_GlyphSlot

Definition at line 532 of file freetype.h.

◆ FT_GlyphSlotRec

◆ FT_Kerning_Mode

◆ FT_LayerIterator

◆ FT_Library

Definition at line 399 of file freetype.h.

◆ FT_Module

Definition at line 419 of file freetype.h.

◆ FT_Open_Args

◆ FT_Parameter

◆ FT_Render_Mode

◆ FT_Renderer

Definition at line 444 of file freetype.h.

◆ FT_Size

Definition at line 513 of file freetype.h.

◆ FT_Size_Internal

Definition at line 1488 of file freetype.h.

◆ FT_Size_Metrics

◆ FT_Size_Request

Definition at line 2621 of file freetype.h.

◆ FT_Size_Request_Type

◆ FT_Size_RequestRec

◆ FT_SizeRec

◆ FT_Slot_Internal

Definition at line 1670 of file freetype.h.

◆ FT_SubGlyph

Definition at line 1658 of file freetype.h.

Enumeration Type Documentation

◆ FT_Encoding_

Enumerator
FT_ENC_TAG 
FT_ENC_TAG 
FT_ENC_TAG 
FT_ENC_TAG 
FT_ENC_TAG 
FT_ENC_TAG 
FT_ENC_TAG 
FT_ENC_TAG 
FT_ENCODING_GB2312 
FT_ENCODING_MS_SJIS 
FT_ENCODING_MS_GB2312 
FT_ENCODING_MS_BIG5 
FT_ENCODING_MS_WANSUNG 
FT_ENCODING_MS_JOHAB 
FT_ENC_TAG 
FT_ENC_TAG 
FT_ENC_TAG 
FT_ENC_TAG 
FT_ENC_TAG 

Definition at line 740 of file freetype.h.

741 {
742 FT_ENC_TAG( FT_ENCODING_NONE, 0, 0, 0, 0 ),
743
744 FT_ENC_TAG( FT_ENCODING_MS_SYMBOL, 's', 'y', 'm', 'b' ),
745 FT_ENC_TAG( FT_ENCODING_UNICODE, 'u', 'n', 'i', 'c' ),
746
747 FT_ENC_TAG( FT_ENCODING_SJIS, 's', 'j', 'i', 's' ),
748 FT_ENC_TAG( FT_ENCODING_PRC, 'g', 'b', ' ', ' ' ),
749 FT_ENC_TAG( FT_ENCODING_BIG5, 'b', 'i', 'g', '5' ),
750 FT_ENC_TAG( FT_ENCODING_WANSUNG, 'w', 'a', 'n', 's' ),
751 FT_ENC_TAG( FT_ENCODING_JOHAB, 'j', 'o', 'h', 'a' ),
752
753 /* for backward compatibility */
754 FT_ENCODING_GB2312 = FT_ENCODING_PRC,
755 FT_ENCODING_MS_SJIS = FT_ENCODING_SJIS,
756 FT_ENCODING_MS_GB2312 = FT_ENCODING_PRC,
757 FT_ENCODING_MS_BIG5 = FT_ENCODING_BIG5,
758 FT_ENCODING_MS_WANSUNG = FT_ENCODING_WANSUNG,
759 FT_ENCODING_MS_JOHAB = FT_ENCODING_JOHAB,
760
761 FT_ENC_TAG( FT_ENCODING_ADOBE_STANDARD, 'A', 'D', 'O', 'B' ),
762 FT_ENC_TAG( FT_ENCODING_ADOBE_EXPERT, 'A', 'D', 'B', 'E' ),
763 FT_ENC_TAG( FT_ENCODING_ADOBE_CUSTOM, 'A', 'D', 'B', 'C' ),
764 FT_ENC_TAG( FT_ENCODING_ADOBE_LATIN_1, 'l', 'a', 't', '1' ),
765
766 FT_ENC_TAG( FT_ENCODING_OLD_LATIN_2, 'l', 'a', 't', '2' ),
767
768 FT_ENC_TAG( FT_ENCODING_APPLE_ROMAN, 'a', 'r', 'm', 'n' )
769
770 } FT_Encoding;
@ FT_ENCODING_MS_JOHAB
Definition: freetype.h:759
@ FT_ENCODING_GB2312
Definition: freetype.h:754
@ FT_ENCODING_MS_SJIS
Definition: freetype.h:755
@ FT_ENCODING_MS_WANSUNG
Definition: freetype.h:758
@ FT_ENCODING_MS_BIG5
Definition: freetype.h:757
@ FT_ENCODING_MS_GB2312
Definition: freetype.h:756
#define FT_ENC_TAG(value, a, b, c, d)
Definition: freetype.h:590
enum FT_Encoding_ FT_Encoding

◆ FT_Kerning_Mode_

Enumerator
FT_KERNING_DEFAULT 
FT_KERNING_UNFITTED 
FT_KERNING_UNSCALED 

Definition at line 3404 of file freetype.h.

3405 {
3409
enum FT_Kerning_Mode_ FT_Kerning_Mode
@ FT_KERNING_UNFITTED
Definition: freetype.h:3407
@ FT_KERNING_UNSCALED
Definition: freetype.h:3408
@ FT_KERNING_DEFAULT
Definition: freetype.h:3406

◆ FT_Render_Mode_

Enumerator
FT_RENDER_MODE_NORMAL 
FT_RENDER_MODE_LIGHT 
FT_RENDER_MODE_MONO 
FT_RENDER_MODE_LCD 
FT_RENDER_MODE_LCD_V 
FT_RENDER_MODE_MAX 

Definition at line 3247 of file freetype.h.

3248 {
3254
3256
enum FT_Render_Mode_ FT_Render_Mode
@ FT_RENDER_MODE_MONO
Definition: freetype.h:3251
@ FT_RENDER_MODE_NORMAL
Definition: freetype.h:3249
@ FT_RENDER_MODE_LIGHT
Definition: freetype.h:3250
@ FT_RENDER_MODE_MAX
Definition: freetype.h:3255
@ FT_RENDER_MODE_LCD_V
Definition: freetype.h:3253
@ FT_RENDER_MODE_LCD
Definition: freetype.h:3252

◆ FT_Size_Request_Type_

Enumerator
FT_SIZE_REQUEST_TYPE_NOMINAL 
FT_SIZE_REQUEST_TYPE_REAL_DIM 
FT_SIZE_REQUEST_TYPE_BBOX 
FT_SIZE_REQUEST_TYPE_CELL 
FT_SIZE_REQUEST_TYPE_SCALES 
FT_SIZE_REQUEST_TYPE_MAX 

Definition at line 2550 of file freetype.h.

2551 {
2557
2559
enum FT_Size_Request_Type_ FT_Size_Request_Type
@ FT_SIZE_REQUEST_TYPE_BBOX
Definition: freetype.h:2554
@ FT_SIZE_REQUEST_TYPE_NOMINAL
Definition: freetype.h:2552
@ FT_SIZE_REQUEST_TYPE_REAL_DIM
Definition: freetype.h:2553
@ FT_SIZE_REQUEST_TYPE_SCALES
Definition: freetype.h:2556
@ FT_SIZE_REQUEST_TYPE_MAX
Definition: freetype.h:2558
@ FT_SIZE_REQUEST_TYPE_CELL
Definition: freetype.h:2555

Function Documentation

◆ FT_Attach_File()

FT_Attach_File ( FT_Face  face,
const char filepathname 
)

Definition at line 2703 of file ftobjs.c.

2705 {
2707
2708
2709 /* test for valid `face' delayed to `FT_Attach_Stream' */
2710
2711 if ( !filepathname )
2712 return FT_THROW( Invalid_Argument );
2713
2714 open.stream = NULL;
2715 open.flags = FT_OPEN_PATHNAME;
2716 open.pathname = (char*)filepathname;
2717
2718 return FT_Attach_Stream( face, &open );
2719 }
#define NULL
Definition: types.h:112
#define open
Definition: io.h:44
#define FT_OPEN_PATHNAME
Definition: freetype.h:2005
#define FT_THROW(e)
Definition: ftdebug.h:243
FT_Attach_Stream(FT_Face face, FT_Open_Args *parameters)
Definition: ftobjs.c:2725
GLenum GLuint GLint GLenum face
Definition: glext.h:7025

◆ FT_Attach_Stream()

FT_Attach_Stream ( FT_Face  face,
FT_Open_Args parameters 
)

Definition at line 2725 of file ftobjs.c.

2727 {
2731
2732 FT_Driver_Class clazz;
2733
2734
2735 /* test for valid `parameters' delayed to `FT_Stream_New' */
2736
2737 if ( !face )
2738 return FT_THROW( Invalid_Face_Handle );
2739
2740 driver = face->driver;
2741 if ( !driver )
2742 return FT_THROW( Invalid_Driver_Handle );
2743
2744 error = FT_Stream_New( driver->root.library, parameters, &stream );
2745 if ( error )
2746 goto Exit;
2747
2748 /* we implement FT_Attach_Stream in each driver through the */
2749 /* `attach_file' interface */
2750
2751 error = FT_ERR( Unimplemented_Feature );
2752 clazz = driver->clazz;
2753 if ( clazz->attach_file )
2754 error = clazz->attach_file( face, stream );
2755
2756 /* close the attached stream */
2758 FT_BOOL( parameters->stream &&
2759 ( parameters->flags & FT_OPEN_STREAM ) ) );
2760
2761 Exit:
2762 return error;
2763 }
#define FT_OPEN_STREAM
Definition: freetype.h:2004
FT_Stream_New(FT_Library library, const FT_Open_Args *args, FT_Stream *astream)
Definition: ftobjs.c:189
FT_Stream_Free(FT_Stream stream, FT_Int external)
Definition: ftobjs.c:257
int FT_Error
Definition: fttypes.h:299
#define FT_ERR(e)
Definition: fttypes.h:599
#define FT_BOOL(x)
Definition: fttypes.h:591
#define error(str)
Definition: mkdosfs.c:1605
struct @1789::@1790 driver
static void Exit(void)
Definition: sock.c:1330
FT_Face_AttachFunc attach_file
Definition: ftdrv.h:184
FT_UInt flags
Definition: freetype.h:2113
FT_Stream stream
Definition: freetype.h:2117
Definition: parse.h:23

Referenced by FT_Attach_File().

◆ FT_CeilFix()

FT_CeilFix ( FT_Fixed  a)

Definition at line 96 of file ftcalc.c.

97 {
98 return ( ADD_LONG( a, 0xFFFFL ) ) & ~0xFFFFL;
99 }
#define ADD_LONG(a, b)
Definition: ftcalc.h:472

◆ FT_DivFix()

FT_DivFix ( FT_Long  a,
FT_Long  b 
)

Definition at line 607 of file ftcalc.c.

609 {
610 FT_Int s = 1;
611 FT_UInt32 a, b, q;
612 FT_Long q_;
613
614
615 /* XXX: this function does not allow 64-bit arguments */
616
617 a = (FT_UInt32)a_;
618 b = (FT_UInt32)b_;
619
620 FT_MOVE_SIGN( a_, a, s );
621 FT_MOVE_SIGN( b_, b, s );
622
623 if ( b == 0 )
624 {
625 /* check for division by 0 */
626 q = 0x7FFFFFFFUL;
627 }
628 else if ( a <= 65535UL - ( b >> 17 ) )
629 {
630 /* compute result directly */
631 q = ( ( a << 16 ) + ( b >> 1 ) ) / b;
632 }
633 else
634 {
635 /* we need more bits; we have to do it by hand */
636 FT_Int64 temp, temp2;
637
638
639 temp.hi = a >> 16;
640 temp.lo = a << 16;
641 temp2.hi = 0;
642 temp2.lo = b >> 1;
643
644 FT_Add64( &temp, &temp2, &temp );
645 q = ft_div64by32( temp.hi, temp.lo, b );
646 }
647
648 q_ = (FT_Long)q;
649
650 return s < 0 ? NEG_LONG( q_ ) : q_;
651 }
static void FT_Add64(FT_Int64 *x, FT_Int64 *y, FT_Int64 *z)
Definition: ftcalc.c:350
#define FT_MOVE_SIGN(x, x_unsigned, s)
Definition: ftcalc.c:72
static FT_UInt32 ft_div64by32(FT_UInt32 hi, FT_UInt32 lo, FT_UInt32 y)
Definition: ftcalc.c:311
#define NEG_LONG(a)
Definition: ftcalc.h:478
signed long FT_Long
Definition: fttypes.h:242
signed int FT_Int
Definition: fttypes.h:220
GLdouble s
Definition: gl.h:2039
GLdouble GLdouble GLdouble GLdouble q
Definition: gl.h:2063
GLboolean GLboolean GLboolean b
Definition: glext.h:6204
#define a
Definition: ke_i.h:78
static calc_node_t temp
Definition: rpn_ieee.c:38
FT_UInt32 lo
Definition: ftcalc.c:52
FT_UInt32 hi
Definition: ftcalc.c:53

Referenced by af_glyph_hints_align_strong_points(), af_iup_interp(), af_latin_hints_compute_edges(), af_loader_compute_darkening(), af_loader_embolden_glyph_in_slot(), af_loader_load_glyph(), cf2_blues_init(), cf2_checkTransform(), cf2_computeDarkening(), cf2_font_setup(), cf2_getBlueMetrics(), cf2_glyphpath_computeIntersection(), cf2_hintmap_adjustHints(), cf2_interpT2CharString(), cff_blend_build_vector(), cff_face_init(), cff_parse_fixed_dynamic(), cff_parse_real(), cid_parse_font_matrix(), compute_glyph_metrics(), FT_Matrix_Check(), FT_Matrix_Invert(), FT_Request_Metrics(), FT_Select_Metrics(), FT_Stroker_ConicTo(), FT_Stroker_CubicTo(), ft_stroker_inside(), ft_stroker_outside(), FT_Tan(), mm_axis_unmap(), pfr_get_metrics(), PS_Conv_ToFixed(), psh_globals_new(), psh_glyph_find_strong_points(), psh_glyph_interpolate_other_points(), t1_decoder_parse_metrics(), t1_parse_font_matrix(), t42_parse_font_matrix(), and tt_size_reset().

◆ FT_Done_Face()

FT_Done_Face ( FT_Face  face)

Definition at line 2783 of file ftobjs.c.

2784 {
2789
2790
2791 error = FT_ERR( Invalid_Face_Handle );
2792 if ( face && face->driver )
2793 {
2794 face->internal->refcount--;
2795 if ( face->internal->refcount > 0 )
2796 error = FT_Err_Ok;
2797 else
2798 {
2799 driver = face->driver;
2800 memory = driver->root.memory;
2801
2802 /* find face in driver's list */
2803 node = FT_List_Find( &driver->faces_list, face );
2804 if ( node )
2805 {
2806 /* remove face object from the driver's list */
2807 FT_List_Remove( &driver->faces_list, node );
2808 FT_FREE( node );
2809
2810 /* now destroy the object proper */
2812 error = FT_Err_Ok;
2813 }
2814 }
2815 }
2816
2817 return error;
2818 }
return FT_Err_Ok
Definition: ftbbox.c:526
FT_List_Remove(FT_List list, FT_ListNode node)
Definition: ftutil.c:320
FT_BEGIN_HEADER FT_List_Find(FT_List list, void *data)
Definition: ftutil.c:243
#define FT_FREE(ptr)
Definition: ftmemory.h:337
static void destroy_face(FT_Memory memory, FT_Face face, FT_Driver driver)
Definition: ftobjs.c:1167
typedefFT_BEGIN_HEADER struct FT_MemoryRec_ * FT_Memory
Definition: ftsystem.h:64
static char memory[1024 *256]
Definition: process.c:122
Definition: dlist.c:348

Referenced by FT_Done_Library(), ft_open_face_internal(), ftc_face_node_done(), FtfdQueryFont(), FtfdUnloadFontFile(), SharedFace_Release(), and T42_Face_Done().

◆ FT_Done_FreeType()

FT_Done_FreeType ( FT_Library  library)

Definition at line 235 of file ftinit.c.

236 {
238
239
240 if ( !library )
241 return FT_THROW( Invalid_Library_Handle );
242
244
245 /* Discard the library object */
247
248 /* discard memory manager */
250
251 return FT_Err_Ok;
252 }
FT_Library library
Definition: cffdrivr.c:660
FT_Done_Library(FT_Library library)
Definition: ftobjs.c:5353
FT_Done_Memory(FT_Memory memory)
Definition: ftsystem.c:324
FT_Memory memory
Definition: ftobjs.h:895

◆ FT_Face_CheckTrueTypePatents()

FT_Face_CheckTrueTypePatents ( FT_Face  face)

Definition at line 30 of file ftpatent.c.

31 {
32 FT_UNUSED( face );
33
34 return FALSE;
35 }
#define FALSE
Definition: types.h:117
#define FT_UNUSED(arg)

◆ FT_Face_GetCharsOfVariant()

FT_Face_GetCharsOfVariant ( FT_Face  face,
FT_ULong  variantSelector 
)

Definition at line 4047 of file ftobjs.c.

4049 {
4050 FT_UInt32 *result = NULL;
4051
4052
4053 if ( face )
4054 {
4056
4057
4058 if ( charmap )
4059 {
4060 FT_CMap vcmap = FT_CMAP( charmap );
4062
4063
4064 if ( variantSelector > 0xFFFFFFFFUL )
4065 {
4066 FT_TRACE1(( "FT_Get_Char_Index: too large variantSelector" ));
4067 FT_TRACE1(( " 0x%lx is truncated\n", variantSelector ));
4068 }
4069
4070 result = vcmap->clazz->variantchar_list( vcmap, memory,
4071 (FT_UInt32)variantSelector );
4072 }
4073 }
4074
4075 return result;
4076 }
#define FT_TRACE1(varformat)
Definition: ftdebug.h:188
static FT_CharMap find_variant_selector_charmap(FT_Face face)
Definition: ftobjs.c:1330
#define FT_FACE_MEMORY(x)
Definition: ftobjs.h:603
#define FT_CMAP(x)
Definition: ftobjs.h:157
GLuint64EXT * result
Definition: glext.h:11304
FT_CMap_Class clazz
Definition: ftobjs.h:152
FT_CMap_VariantCharListFunc variantchar_list
Definition: ftobjs.h:224

◆ FT_Face_GetCharVariantIndex()

FT_Face_GetCharVariantIndex ( FT_Face  face,
FT_ULong  charcode,
FT_ULong  variantSelector 
)

Definition at line 3897 of file ftobjs.c.

3900 {
3901 FT_UInt result = 0;
3902
3903
3904 if ( face &&
3905 face->charmap &&
3906 face->charmap->encoding == FT_ENCODING_UNICODE )
3907 {
3909 FT_CMap ucmap = FT_CMAP( face->charmap );
3910
3911
3912 if ( charmap )
3913 {
3914 FT_CMap vcmap = FT_CMAP( charmap );
3915
3916
3917 if ( charcode > 0xFFFFFFFFUL )
3918 {
3919 FT_TRACE1(( "FT_Face_GetCharVariantIndex:"
3920 " too large charcode" ));
3921 FT_TRACE1(( " 0x%lx is truncated\n", charcode ));
3922 }
3923 if ( variantSelector > 0xFFFFFFFFUL )
3924 {
3925 FT_TRACE1(( "FT_Face_GetCharVariantIndex:"
3926 " too large variantSelector" ));
3927 FT_TRACE1(( " 0x%lx is truncated\n", variantSelector ));
3928 }
3929
3930 result = vcmap->clazz->char_var_index( vcmap, ucmap,
3931 (FT_UInt32)charcode,
3932 (FT_UInt32)variantSelector );
3933 }
3934 }
3935
3936 return result;
3937 }
unsigned int FT_UInt
Definition: fttypes.h:231
FT_CMap_CharVarIndexFunc char_var_index
Definition: ftobjs.h:220

◆ FT_Face_GetCharVariantIsDefault()

FT_Face_GetCharVariantIsDefault ( FT_Face  face,
FT_ULong  charcode,
FT_ULong  variantSelector 
)

Definition at line 3943 of file ftobjs.c.

3946 {
3947 FT_Int result = -1;
3948
3949
3950 if ( face )
3951 {
3953
3954
3955 if ( charmap )
3956 {
3957 FT_CMap vcmap = FT_CMAP( charmap );
3958
3959
3960 if ( charcode > 0xFFFFFFFFUL )
3961 {
3962 FT_TRACE1(( "FT_Face_GetCharVariantIsDefault:"
3963 " too large charcode" ));
3964 FT_TRACE1(( " 0x%lx is truncated\n", charcode ));
3965 }
3966 if ( variantSelector > 0xFFFFFFFFUL )
3967 {
3968 FT_TRACE1(( "FT_Face_GetCharVariantIsDefault:"
3969 " too large variantSelector" ));
3970 FT_TRACE1(( " 0x%lx is truncated\n", variantSelector ));
3971 }
3972
3973 result = vcmap->clazz->char_var_default( vcmap,
3974 (FT_UInt32)charcode,
3975 (FT_UInt32)variantSelector );
3976 }
3977 }
3978
3979 return result;
3980 }
FT_CMap_CharVarIsDefaultFunc char_var_default
Definition: ftobjs.h:221

◆ FT_Face_GetVariantSelectors()

FT_Face_GetVariantSelectors ( FT_Face  face)

Definition at line 3986 of file ftobjs.c.

3987 {
3988 FT_UInt32 *result = NULL;
3989
3990
3991 if ( face )
3992 {
3994
3995
3996 if ( charmap )
3997 {
3998 FT_CMap vcmap = FT_CMAP( charmap );
4000
4001
4002 result = vcmap->clazz->variant_list( vcmap, memory );
4003 }
4004 }
4005
4006 return result;
4007 }
FT_CMap_VariantListFunc variant_list
Definition: ftobjs.h:222

◆ FT_Face_GetVariantsOfChar()

FT_Face_GetVariantsOfChar ( FT_Face  face,
FT_ULong  charcode 
)

Definition at line 4013 of file ftobjs.c.

4015 {
4016 FT_UInt32 *result = NULL;
4017
4018
4019 if ( face )
4020 {
4022
4023
4024 if ( charmap )
4025 {
4026 FT_CMap vcmap = FT_CMAP( charmap );
4028
4029
4030 if ( charcode > 0xFFFFFFFFUL )
4031 {
4032 FT_TRACE1(( "FT_Face_GetVariantsOfChar: too large charcode" ));
4033 FT_TRACE1(( " 0x%lx is truncated\n", charcode ));
4034 }
4035
4036 result = vcmap->clazz->charvariant_list( vcmap, memory,
4037 (FT_UInt32)charcode );
4038 }
4039 }
4040 return result;
4041 }
FT_CMap_CharVariantListFunc charvariant_list
Definition: ftobjs.h:223

◆ FT_Face_Properties()

FT_Face_Properties ( FT_Face  face,
FT_UInt  num_properties,
FT_Parameter properties 
)

Definition at line 3818 of file ftobjs.c.

3821 {
3823
3824
3825 if ( num_properties > 0 && !properties )
3826 {
3827 error = FT_THROW( Invalid_Argument );
3828 goto Exit;
3829 }
3830
3831 for ( ; num_properties > 0; num_properties-- )
3832 {
3833 if ( properties->tag == FT_PARAM_TAG_STEM_DARKENING )
3834 {
3835 if ( properties->data )
3836 {
3837 if ( *( (FT_Bool*)properties->data ) == TRUE )
3838 face->internal->no_stem_darkening = FALSE;
3839 else
3840 face->internal->no_stem_darkening = TRUE;
3841 }
3842 else
3843 {
3844 /* use module default */
3845 face->internal->no_stem_darkening = -1;
3846 }
3847 }
3848 else if ( properties->tag == FT_PARAM_TAG_LCD_FILTER_WEIGHTS )
3849 {
3850#ifdef FT_CONFIG_OPTION_SUBPIXEL_RENDERING
3851 if ( properties->data )
3852 {
3853 ft_memcpy( face->internal->lcd_weights,
3854 properties->data,
3856 face->internal->lcd_filter_func = ft_lcd_filter_fir;
3857 }
3858#else
3859 error = FT_THROW( Unimplemented_Feature );
3860 goto Exit;
3861#endif
3862 }
3863 else if ( properties->tag == FT_PARAM_TAG_RANDOM_SEED )
3864 {
3865 if ( properties->data )
3866 {
3867 face->internal->random_seed = *( (FT_Int32*)properties->data );
3868 if ( face->internal->random_seed < 0 )
3869 face->internal->random_seed = 0;
3870 }
3871 else
3872 {
3873 /* use module default */
3874 face->internal->random_seed = -1;
3875 }
3876 }
3877 else
3878 {
3879 error = FT_THROW( Invalid_Argument );
3880 goto Exit;
3881 }
3882
3883 if ( error )
3884 break;
3885
3886 properties++;
3887 }
3888
3889 Exit:
3890 return error;
3891 }
#define TRUE
Definition: types.h:120
#define FT_LCD_FILTER_FIVE_TAPS
Definition: ftlcdfil.h:264
#define FT_PARAM_TAG_RANDOM_SEED
Definition: ftparams.h:149
#define FT_PARAM_TAG_LCD_FILTER_WEIGHTS
Definition: ftparams.h:131
#define FT_PARAM_TAG_STEM_DARKENING
Definition: ftparams.h:173
#define ft_memcpy
Definition: ftstdlib.h:82
FT_BEGIN_HEADER typedef unsigned char FT_Bool
Definition: fttypes.h:108
FT_ULong tag
Definition: freetype.h:2041
FT_Pointer data
Definition: freetype.h:2042

◆ FT_Face_SetUnpatentedHinting()

FT_Face_SetUnpatentedHinting ( FT_Face  face,
FT_Bool  value 
)

Definition at line 41 of file ftpatent.c.

43 {
44 FT_UNUSED( face );
46
47 return FALSE;
48 }

◆ FT_FloorFix()

FT_FloorFix ( FT_Fixed  a)

Definition at line 105 of file ftcalc.c.

106 {
107 return a & ~0xFFFFL;
108 }

◆ FT_Get_Char_Index()

FT_Get_Char_Index ( FT_Face  face,
FT_ULong  charcode 
)

Definition at line 3731 of file ftobjs.c.

3733 {
3734 FT_UInt result = 0;
3735
3736
3737 if ( face && face->charmap )
3738 {
3739 FT_CMap cmap = FT_CMAP( face->charmap );
3740
3741
3742 if ( charcode > 0xFFFFFFFFUL )
3743 {
3744 FT_TRACE1(( "FT_Get_Char_Index: too large charcode" ));
3745 FT_TRACE1(( " 0x%lx is truncated\n", charcode ));
3746 }
3747
3748 result = cmap->clazz->char_index( cmap, (FT_UInt32)charcode );
3749 if ( result >= (FT_UInt)face->num_glyphs )
3750 result = 0;
3751 }
3752
3753 return result;
3754 }
FT_CMap_CharIndexFunc char_index
Definition: ftobjs.h:214

Referenced by af_face_globals_compute_style_coverage(), af_shaper_get_cluster(), FT_Get_First_Char(), FT_Load_Char(), FTC_CMapCache_Lookup(), get_glyph_index(), get_glyph_index_symbol(), and T1_Read_PFM().

◆ FT_Get_Charmap_Index()

FT_Get_Charmap_Index ( FT_CharMap  charmap)

Definition at line 3597 of file ftobjs.c.

3598 {
3599 FT_Int i;
3600
3601
3602 if ( !charmap || !charmap->face )
3603 return -1;
3604
3605 for ( i = 0; i < charmap->face->num_charmaps; i++ )
3606 if ( charmap->face->charmaps[i] == charmap )
3607 break;
3608
3609 FT_ASSERT( i < charmap->face->num_charmaps );
3610
3611 return i;
3612 }
#define FT_ASSERT(condition)
Definition: ftdebug.h:241
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
FT_Face face
Definition: freetype.h:819
FT_Int num_charmaps
Definition: freetype.h:1044
FT_CharMap * charmaps
Definition: freetype.h:1045

◆ FT_Get_Color_Glyph_Layer()

FT_Get_Color_Glyph_Layer ( FT_Face  face,
FT_UInt  base_glyph,
FT_UInt aglyph_index,
FT_UInt acolor_index,
FT_LayerIterator iterator 
)

Definition at line 5536 of file ftobjs.c.

5541 {
5542 TT_Face ttface;
5544
5545
5546 if ( !face ||
5547 !aglyph_index ||
5548 !acolor_index ||
5549 !iterator ||
5550 base_glyph >= (FT_UInt)face->num_glyphs )
5551 return 0;
5552
5553 if ( !FT_IS_SFNT( face ) )
5554 return 0;
5555
5556 ttface = (TT_Face)face;
5557 sfnt = (SFNT_Service)ttface->sfnt;
5558
5560 return sfnt->get_colr_layer( ttface,
5561 base_glyph,
5562 aglyph_index,
5563 acolor_index,
5564 iterator );
5565 else
5566 return 0;
5567 }
#define FT_IS_SFNT(face)
Definition: freetype.h:1290
if(dx< 0)
Definition: linetemp.h:194
SFNT_Interface * SFNT_Service
Definition: sfnt.h:784
TT_Get_Colr_Layer_Func get_colr_layer
Definition: sfnt.h:772
void * sfnt
Definition: tttypes.h:1499
SFNT_Service sfnt
Definition: ttdriver.c:208
struct TT_FaceRec_ * TT_Face
Definition: tttypes.h:988

Referenced by FT_Render_Glyph_Internal().

◆ FT_Get_First_Char()

FT_Get_First_Char ( FT_Face  face,
FT_UInt agindex 
)

Definition at line 3760 of file ftobjs.c.

3762 {
3763 FT_ULong result = 0;
3764 FT_UInt gindex = 0;
3765
3766
3767 /* only do something if we have a charmap, and we have glyphs at all */
3768 if ( face && face->charmap && face->num_glyphs )
3769 {
3770 gindex = FT_Get_Char_Index( face, 0 );
3771 if ( gindex == 0 )
3772 result = FT_Get_Next_Char( face, 0, &gindex );
3773 }
3774
3775 if ( agindex )
3776 *agindex = gindex;
3777
3778 return result;
3779 }
FT_Get_Next_Char(FT_Face face, FT_ULong charcode, FT_UInt *agindex)
Definition: ftobjs.c:3785
FT_Get_Char_Index(FT_Face face, FT_ULong charcode)
Definition: ftobjs.c:3731
unsigned long FT_ULong
Definition: fttypes.h:253

Referenced by FontFamilyFillInfo(), FtfdQueryFontTree(), ftGdiGetKerningPairs(), ftGdiGetTextCharsetInfo(), and ftGetFontUnicodeRanges().

◆ FT_Get_FSType_Flags()

FT_Get_FSType_Flags ( FT_Face  face)

Definition at line 27 of file ftfstype.c.

28 {
29 TT_OS2* os2;
30
31
32 /* first, try to get the fs_type directly from the font */
33 if ( face )
34 {
35 FT_Service_PsInfo service = NULL;
36
37
38 FT_FACE_FIND_SERVICE( face, service, POSTSCRIPT_INFO );
39
40 if ( service && service->ps_get_font_extra )
41 {
43
44
45 if ( !service->ps_get_font_extra( face, &extra ) &&
46 extra.fs_type != 0 )
47 return extra.fs_type;
48 }
49 }
50
51 /* look at FSType before fsType for Type42 */
52
53 if ( ( os2 = (TT_OS2*)FT_Get_Sfnt_Table( face, FT_SFNT_OS2 ) ) != NULL &&
54 os2->version != 0xFFFFU )
55 return os2->fsType;
56
57 return 0;
58 }
#define FT_FACE_FIND_SERVICE(face, ptr, id)
Definition: ftserv.h:77
@ extra
Definition: id3.c:95
FT_UShort version
Definition: tttables.h:377
FT_UShort fsType
Definition: tttables.h:381
FT_Get_Sfnt_Table(FT_Face face, FT_Sfnt_Tag tag)
Definition: ftobjs.c:4176
@ FT_SFNT_OS2
Definition: tttables.h:624

◆ FT_Get_Glyph_Name()

FT_Get_Glyph_Name ( FT_Face  face,
FT_UInt  glyph_index,
FT_Pointer  buffer,
FT_UInt  buffer_max 
)

Definition at line 4110 of file ftobjs.c.

4114 {
4116 FT_Service_GlyphDict service;
4117
4118
4119 if ( !face )
4120 return FT_THROW( Invalid_Face_Handle );
4121
4122 if ( !buffer || buffer_max == 0 )
4123 return FT_THROW( Invalid_Argument );
4124
4125 /* clean up buffer */
4126 ((FT_Byte*)buffer)[0] = '\0';
4127
4128 if ( (FT_Long)glyph_index >= face->num_glyphs )
4129 return FT_THROW( Invalid_Glyph_Index );
4130
4131 if ( !FT_HAS_GLYPH_NAMES( face ) )
4132 return FT_THROW( Invalid_Argument );
4133
4134 FT_FACE_LOOKUP_SERVICE( face, service, GLYPH_DICT );
4135 if ( service && service->get_name )
4136 error = service->get_name( face, glyph_index, buffer, buffer_max );
4137 else
4138 error = FT_THROW( Invalid_Argument );
4139
4140 return error;
4141 }
#define FT_HAS_GLYPH_NAMES(face)
Definition: freetype.h:1346
#define FT_FACE_LOOKUP_SERVICE(face, ptr, id)
Definition: ftserv.h:456
unsigned char FT_Byte
Definition: fttypes.h:154
GLuint buffer
Definition: glext.h:5915

Referenced by tt_check_single_notdef().

◆ FT_Get_Kerning()

FT_Get_Kerning ( FT_Face  face,
FT_UInt  left_glyph,
FT_UInt  right_glyph,
FT_UInt  kern_mode,
FT_Vector akerning 
)

Definition at line 3411 of file ftobjs.c.

3416 {
3419
3420
3421 if ( !face )
3422 return FT_THROW( Invalid_Face_Handle );
3423
3424 if ( !akerning )
3425 return FT_THROW( Invalid_Argument );
3426
3427 driver = face->driver;
3428
3429 akerning->x = 0;
3430 akerning->y = 0;
3431
3432 if ( driver->clazz->get_kerning )
3433 {
3434 error = driver->clazz->get_kerning( face,
3435 left_glyph,
3437 akerning );
3438 if ( !error )
3439 {
3440 if ( kern_mode != FT_KERNING_UNSCALED )
3441 {
3442 akerning->x = FT_MulFix( akerning->x, face->size->metrics.x_scale );
3443 akerning->y = FT_MulFix( akerning->y, face->size->metrics.y_scale );
3444
3445 if ( kern_mode != FT_KERNING_UNFITTED )
3446 {
3447 FT_Pos orig_x = akerning->x;
3448 FT_Pos orig_y = akerning->y;
3449
3450
3451 /* we scale down kerning values for small ppem values */
3452 /* to avoid that rounding makes them too big. */
3453 /* `25' has been determined heuristically. */
3454 if ( face->size->metrics.x_ppem < 25 )
3455 akerning->x = FT_MulDiv( orig_x,
3456 face->size->metrics.x_ppem, 25 );
3457 if ( face->size->metrics.y_ppem < 25 )
3458 akerning->y = FT_MulDiv( orig_y,
3459 face->size->metrics.y_ppem, 25 );
3460
3461 akerning->x = FT_PIX_ROUND( akerning->x );
3462 akerning->y = FT_PIX_ROUND( akerning->y );
3463
3464#ifdef FT_DEBUG_LEVEL_TRACE
3465 {
3466 FT_Pos orig_x_rounded = FT_PIX_ROUND( orig_x );
3467 FT_Pos orig_y_rounded = FT_PIX_ROUND( orig_y );
3468
3469
3470 if ( akerning->x != orig_x_rounded ||
3471 akerning->y != orig_y_rounded )
3472 FT_TRACE5(( "FT_Get_Kerning: horizontal kerning"
3473 " (%ld, %ld) scaled down to (%ld, %ld) pixels\n",
3474 orig_x_rounded / 64, orig_y_rounded / 64,
3475 akerning->x / 64, akerning->y / 64 ));
3476 }
3477#endif
3478 }
3479 }
3480 }
3481 }
3482
3483 return error;
3484 }
FT_MulDiv(FT_Long a, FT_Long b, FT_Long c)
Definition: ftcalc.c:415
FT_MulFix(FT_Long a, FT_Long b)
Definition: ftcalc.c:508
#define FT_TRACE5(varformat)
Definition: ftdebug.h:192
FT_BEGIN_HEADER typedef signed long FT_Pos
Definition: ftimage.h:57
#define FT_PIX_ROUND(x)
Definition: ftobjs.h:92
FT_Pos x
Definition: ftimage.h:77
FT_Pos y
Definition: ftimage.h:78
FT_UInt left_glyph
Definition: ttdriver.c:203
FT_UInt FT_UInt right_glyph
Definition: ttdriver.c:204

Referenced by FT_Get_PFR_Kerning(), ftGdiGetKerningPairs(), IntExtTextOutW(), IntGetTextDisposition(), and TextIntGetTextExtentPoint().

◆ FT_Get_Name_Index()

FT_Get_Name_Index ( FT_Face  face,
const FT_String glyph_name 
)

Definition at line 4082 of file ftobjs.c.

4084 {
4085 FT_UInt result = 0;
4086
4087
4088 if ( face &&
4090 glyph_name )
4091 {
4092 FT_Service_GlyphDict service;
4093
4094
4096 service,
4097 GLYPH_DICT );
4098
4099 if ( service && service->name_index )
4100 result = service->name_index( face, glyph_name );
4101 }
4102
4103 return result;
4104 }

◆ FT_Get_Next_Char()

FT_Get_Next_Char ( FT_Face  face,
FT_ULong  char_code,
FT_UInt agindex 
)

Definition at line 3785 of file ftobjs.c.

3788 {
3789 FT_ULong result = 0;
3790 FT_UInt gindex = 0;
3791
3792
3793 if ( face && face->charmap && face->num_glyphs )
3794 {
3795 FT_UInt32 code = (FT_UInt32)charcode;
3796 FT_CMap cmap = FT_CMAP( face->charmap );
3797
3798
3799 do
3800 {
3801 gindex = cmap->clazz->char_next( cmap, &code );
3802
3803 } while ( gindex >= (FT_UInt)face->num_glyphs );
3804
3805 result = ( gindex == 0 ) ? 0 : code;
3806 }
3807
3808 if ( agindex )
3809 *agindex = gindex;
3810
3811 return result;
3812 }
FT_CMap_CharNextFunc char_next
Definition: ftobjs.h:215
Definition: inflate.c:139

Referenced by af_face_globals_compute_style_coverage(), FT_Get_First_Char(), FtfdQueryFontTree(), ftGdiGetKerningPairs(), and ftGetFontUnicodeRanges().

◆ FT_Get_Postscript_Name()

FT_Get_Postscript_Name ( FT_Face  face)

Definition at line 4147 of file ftobjs.c.

4148 {
4149 const char* result = NULL;
4150
4151
4152 if ( !face )
4153 goto Exit;
4154
4155 if ( !result )
4156 {
4157 FT_Service_PsFontName service;
4158
4159
4161 service,
4162 POSTSCRIPT_FONT_NAME );
4163
4164 if ( service && service->get_ps_font_name )
4165 result = service->get_ps_font_name( face );
4166 }
4167
4168 Exit:
4169 return result;
4170 }

◆ FT_Get_SubGlyph_Info()

FT_Get_SubGlyph_Info ( FT_GlyphSlot  glyph,
FT_UInt  sub_index,
FT_Int p_index,
FT_UInt p_flags,
FT_Int p_arg1,
FT_Int p_arg2,
FT_Matrix p_transform 
)

Definition at line 5501 of file ftobjs.c.

5508 {
5509 FT_Error error = FT_ERR( Invalid_Argument );
5510
5511
5512 if ( glyph &&
5513 glyph->subglyphs &&
5514 glyph->format == FT_GLYPH_FORMAT_COMPOSITE &&
5515 sub_index < glyph->num_subglyphs )
5516 {
5517 FT_SubGlyph subg = glyph->subglyphs + sub_index;
5518
5519
5520 *p_index = subg->index;
5521 *p_flags = subg->flags;
5522 *p_arg1 = subg->arg1;
5523 *p_arg2 = subg->arg2;
5524 *p_transform = subg->transform;
5525
5526 error = FT_Err_Ok;
5527 }
5528
5529 return error;
5530 }
FT_SubGlyph subglyphs
Definition: freetype.h:1893
FT_Glyph_Format format
Definition: freetype.h:1884
FT_Int arg2
Definition: ftgloadr.h:43
FT_UShort flags
Definition: ftgloadr.h:41
FT_Matrix transform
Definition: ftgloadr.h:44
FT_Int index
Definition: ftgloadr.h:40
FT_Int arg1
Definition: ftgloadr.h:42

◆ FT_Get_Track_Kerning()

FT_Get_Track_Kerning ( FT_Face  face,
FT_Fixed  point_size,
FT_Int  degree,
FT_Fixed akerning 
)

Definition at line 3490 of file ftobjs.c.

3494 {
3495 FT_Service_Kerning service;
3497
3498
3499 if ( !face )
3500 return FT_THROW( Invalid_Face_Handle );
3501
3502 if ( !akerning )
3503 return FT_THROW( Invalid_Argument );
3504
3505 FT_FACE_FIND_SERVICE( face, service, KERNING );
3506 if ( !service )
3507 return FT_THROW( Unimplemented_Feature );
3508
3509 error = service->get_track( face,
3510 point_size,
3511 degree,
3512 akerning );
3513
3514 return error;
3515 }

◆ FT_Init_FreeType()

FT_Init_FreeType ( FT_Library alibrary)

Definition at line 199 of file ftinit.c.

200 {
203
204
205 /* check of `alibrary' delayed to `FT_New_Library' */
206
207 /* First of all, allocate a new system object -- this function is part */
208 /* of the system-specific component, i.e. `ftsystem.c'. */
209
211 if ( !memory )
212 {
213 FT_ERROR(( "FT_Init_FreeType: cannot find memory manager\n" ));
214 return FT_THROW( Unimplemented_Feature );
215 }
216
217 /* build a library out of it, then fill it with the set of */
218 /* default drivers. */
219
220 error = FT_New_Library( memory, alibrary );
221 if ( error )
223 else
224 FT_Add_Default_Modules( *alibrary );
225
226 FT_Set_Default_Properties( *alibrary );
227
228 return error;
229 }
#define FT_ERROR(varformat)
Definition: ftdebug.h:211
FT_Set_Default_Properties(FT_Library library)
Definition: ftinit.c:188
FT_Add_Default_Modules(FT_Library library)
Definition: ftinit.c:80
FT_New_Library(FT_Memory memory, FT_Library *alibrary)
Definition: ftobjs.c:5285
FT_New_Memory(void)
Definition: ftsystem.c:300

Referenced by FtfdEnableDriver(), and InitFontSupport().

◆ FT_Library_Version()

FT_Library_Version ( FT_Library  library,
FT_Int amajor,
FT_Int aminor,
FT_Int apatch 
)

Definition at line 5322 of file ftobjs.c.

5326 {
5327 FT_Int major = 0;
5328 FT_Int minor = 0;
5329 FT_Int patch = 0;
5330
5331
5332 if ( library )
5333 {
5336 patch = library->version_patch;
5337 }
5338
5339 if ( amajor )
5340 *amajor = major;
5341
5342 if ( aminor )
5343 *aminor = minor;
5344
5345 if ( apatch )
5346 *apatch = patch;
5347 }
#define minor(rdev)
Definition: propsheet.cpp:929
#define major(rdev)
Definition: propsheet.cpp:928
FT_Int version_minor
Definition: ftobjs.h:898
FT_Int version_major
Definition: ftobjs.h:897
FT_Int version_patch
Definition: ftobjs.h:899

◆ FT_Load_Char()

FT_Load_Char ( FT_Face  face,
FT_ULong  char_code,
FT_Int32  load_flags 
)

Definition at line 1099 of file ftobjs.c.

1102 {
1103 FT_UInt glyph_index;
1104
1105
1106 if ( !face )
1107 return FT_THROW( Invalid_Face_Handle );
1108
1109 glyph_index = (FT_UInt)char_code;
1110 if ( face->charmap )
1111 glyph_index = FT_Get_Char_Index( face, char_code );
1112
1113 return FT_Load_Glyph( face, glyph_index, load_flags );
1114 }
FT_Load_Glyph(FT_Face face, FT_UInt glyph_index, FT_Int32 load_flags)
Definition: ftobjs.c:796

◆ FT_Load_Glyph()

FT_Load_Glyph ( FT_Face  face,
FT_UInt  glyph_index,
FT_Int32  load_flags 
)

Definition at line 796 of file ftobjs.c.

799 {
804 FT_Bool autohint = FALSE;
805 FT_Module hinter;
806 TT_Face ttface = (TT_Face)face;
807
808
809 if ( !face || !face->size || !face->glyph )
810 return FT_THROW( Invalid_Face_Handle );
811
812 /* The validity test for `glyph_index' is performed by the */
813 /* font drivers. */
814
815 slot = face->glyph;
817
818 driver = face->driver;
819 library = driver->root.library;
820 hinter = library->auto_hinter;
821
822 /* resolve load flags dependencies */
823
824 if ( load_flags & FT_LOAD_NO_RECURSE )
825 load_flags |= FT_LOAD_NO_SCALE |
827
828 if ( load_flags & FT_LOAD_NO_SCALE )
829 {
830 load_flags |= FT_LOAD_NO_HINTING |
832
833 load_flags &= ~FT_LOAD_RENDER;
834 }
835
836 if ( load_flags & FT_LOAD_BITMAP_METRICS_ONLY )
837 load_flags &= ~FT_LOAD_RENDER;
838
839 /*
840 * Determine whether we need to auto-hint or not.
841 * The general rules are:
842 *
843 * - Do only auto-hinting if we have
844 *
845 * - a hinter module,
846 * - a scalable font,
847 * - not a tricky font, and
848 * - no transforms except simple slants and/or rotations by
849 * integer multiples of 90 degrees.
850 *
851 * - Then, auto-hint if FT_LOAD_FORCE_AUTOHINT is set or if we don't
852 * have a native font hinter.
853 *
854 * - Otherwise, auto-hint for LIGHT hinting mode or if there isn't
855 * any hinting bytecode in the TrueType/OpenType font.
856 *
857 * - Exception: The font is `tricky' and requires the native hinter to
858 * load properly.
859 */
860
861 if ( hinter &&
862 !( load_flags & FT_LOAD_NO_HINTING ) &&
863 !( load_flags & FT_LOAD_NO_AUTOHINT ) &&
864 FT_IS_SCALABLE( face ) &&
865 !FT_IS_TRICKY( face ) &&
866 ( ( load_flags & FT_LOAD_IGNORE_TRANSFORM ) ||
867 ( face->internal->transform_matrix.yx == 0 &&
868 face->internal->transform_matrix.xx != 0 ) ||
869 ( face->internal->transform_matrix.xx == 0 &&
870 face->internal->transform_matrix.yx != 0 ) ) )
871 {
872 if ( ( load_flags & FT_LOAD_FORCE_AUTOHINT ) ||
874 autohint = TRUE;
875 else
876 {
878 FT_Bool is_light_type1;
879
880
881 /* only the new Adobe engine (for both CFF and Type 1) is `light'; */
882 /* we use `strstr' to catch both `Type 1' and `CID Type 1' */
883 is_light_type1 =
884 ft_strstr( FT_Get_Font_Format( face ), "Type 1" ) != NULL &&
885 ((PS_Driver)driver)->hinting_engine == FT_HINTING_ADOBE;
886
887 /* the check for `num_locations' assures that we actually */
888 /* test for instructions in a TTF and not in a CFF-based OTF */
889 /* */
890 /* since `maxSizeOfInstructions' might be unreliable, we */
891 /* check the size of the `fpgm' and `prep' tables, too -- */
892 /* the assumption is that there don't exist real TTFs where */
893 /* both `fpgm' and `prep' tables are missing */
894 if ( ( mode == FT_RENDER_MODE_LIGHT &&
896 !is_light_type1 ) ) ||
897 ( FT_IS_SFNT( face ) &&
898 ttface->num_locations &&
899 ttface->max_profile.maxSizeOfInstructions == 0 &&
900 ttface->font_program_size == 0 &&
901 ttface->cvt_program_size == 0 ) )
902 autohint = TRUE;
903 }
904 }
905
906 if ( autohint )
907 {
909
910
911 /* try to load embedded bitmaps first if available */
912 /* */
913 /* XXX: This is really a temporary hack that should disappear */
914 /* promptly with FreeType 2.1! */
915 /* */
916 if ( FT_HAS_FIXED_SIZES( face ) &&
917 ( load_flags & FT_LOAD_NO_BITMAP ) == 0 )
918 {
919 error = driver->clazz->load_glyph( slot, face->size,
920 glyph_index,
921 load_flags | FT_LOAD_SBITS_ONLY );
922
923 if ( !error && slot->format == FT_GLYPH_FORMAT_BITMAP )
924 goto Load_Ok;
925 }
926
927 {
928 FT_Face_Internal internal = face->internal;
929 FT_Int transform_flags = internal->transform_flags;
930
931
932 /* since the auto-hinter calls FT_Load_Glyph by itself, */
933 /* make sure that glyphs aren't transformed */
934 internal->transform_flags = 0;
935
936 /* load auto-hinted outline */
938
939 error = hinting->load_glyph( (FT_AutoHinter)hinter,
940 slot, face->size,
941 glyph_index, load_flags );
942
943 internal->transform_flags = transform_flags;
944 }
945 }
946 else
947 {
948 error = driver->clazz->load_glyph( slot,
949 face->size,
950 glyph_index,
951 load_flags );
952 if ( error )
953 goto Exit;
954
955 if ( slot->format == FT_GLYPH_FORMAT_OUTLINE )
956 {
957 /* check that the loaded outline is correct */
958 error = FT_Outline_Check( &slot->outline );
959 if ( error )
960 goto Exit;
961
962#ifdef GRID_FIT_METRICS
963 if ( !( load_flags & FT_LOAD_NO_HINTING ) )
965 slot,
966 FT_BOOL( load_flags & FT_LOAD_VERTICAL_LAYOUT ) );
967#endif
968 }
969 }
970
971 Load_Ok:
972 /* compute the advance */
973 if ( load_flags & FT_LOAD_VERTICAL_LAYOUT )
974 {
975 slot->advance.x = 0;
976 slot->advance.y = slot->metrics.vertAdvance;
977 }
978 else
979 {
980 slot->advance.x = slot->metrics.horiAdvance;
981 slot->advance.y = 0;
982 }
983
984 /* compute the linear advance in 16.16 pixels */
985 if ( ( load_flags & FT_LOAD_LINEAR_DESIGN ) == 0 &&
987 {
988 FT_Size_Metrics* metrics = &face->size->metrics;
989
990
991 /* it's tricky! */
992 slot->linearHoriAdvance = FT_MulDiv( slot->linearHoriAdvance,
993 metrics->x_scale, 64 );
994
995 slot->linearVertAdvance = FT_MulDiv( slot->linearVertAdvance,
996 metrics->y_scale, 64 );
997 }
998
999 if ( ( load_flags & FT_LOAD_IGNORE_TRANSFORM ) == 0 )
1000 {
1001 FT_Face_Internal internal = face->internal;
1002
1003
1004 /* now, transform the glyph image if needed */
1005 if ( internal->transform_flags )
1006 {
1007 /* get renderer */
1009
1010
1011 if ( renderer )
1012 error = renderer->clazz->transform_glyph(
1013 renderer, slot,
1014 &internal->transform_matrix,
1015 &internal->transform_delta );
1016 else if ( slot->format == FT_GLYPH_FORMAT_OUTLINE )
1017 {
1018 /* apply `standard' transformation if no renderer is available */
1019 if ( internal->transform_flags & 1 )
1020 FT_Outline_Transform( &slot->outline,
1021 &internal->transform_matrix );
1022
1023 if ( internal->transform_flags & 2 )
1024 FT_Outline_Translate( &slot->outline,
1025 internal->transform_delta.x,
1026 internal->transform_delta.y );
1027 }
1028
1029 /* transform advance */
1030 FT_Vector_Transform( &slot->advance, &internal->transform_matrix );
1031 }
1032 }
1033
1034 slot->glyph_index = glyph_index;
1035 slot->internal->load_flags = load_flags;
1036
1037 /* do we need to render the image or preset the bitmap now? */
1038 if ( !error &&
1039 ( load_flags & FT_LOAD_NO_SCALE ) == 0 &&
1040 slot->format != FT_GLYPH_FORMAT_BITMAP &&
1041 slot->format != FT_GLYPH_FORMAT_COMPOSITE )
1042 {
1043 FT_Render_Mode mode = FT_LOAD_TARGET_MODE( load_flags );
1044
1045
1046 if ( mode == FT_RENDER_MODE_NORMAL &&
1047 load_flags & FT_LOAD_MONOCHROME )
1049
1050 if ( load_flags & FT_LOAD_RENDER )
1052 else
1054 }
1055
1056#ifdef FT_DEBUG_LEVEL_TRACE
1057 FT_TRACE5(( "FT_Load_Glyph: index %d, flags 0x%x\n",
1058 glyph_index, load_flags ));
1059 FT_TRACE5(( " x advance: %f\n", slot->advance.x / 64.0 ));
1060 FT_TRACE5(( " y advance: %f\n", slot->advance.y / 64.0 ));
1061 FT_TRACE5(( " linear x advance: %f\n",
1062 slot->linearHoriAdvance / 65536.0 ));
1063 FT_TRACE5(( " linear y advance: %f\n",
1064 slot->linearVertAdvance / 65536.0 ));
1065 FT_TRACE5(( "\n" ));
1066 FT_TRACE5(( " bitmap %dx%d, %s (mode %d)\n",
1067 slot->bitmap.width,
1068 slot->bitmap.rows,
1069 pixel_modes[slot->bitmap.pixel_mode],
1070 slot->bitmap.pixel_mode ));
1071 FT_TRACE5(( "\n" ));
1072
1073 {
1074 FT_Glyph_Metrics* metrics = &slot->metrics;
1075
1076
1077 FT_TRACE5(( " metrics:\n" ));
1078 FT_TRACE5(( " width: %f\n", metrics->width / 64.0 ));
1079 FT_TRACE5(( " height: %f\n", metrics->height / 64.0 ));
1080 FT_TRACE5(( "\n" ));
1081 FT_TRACE5(( " horiBearingX: %f\n", metrics->horiBearingX / 64.0 ));
1082 FT_TRACE5(( " horiBearingY: %f\n", metrics->horiBearingY / 64.0 ));
1083 FT_TRACE5(( " horiAdvance: %f\n", metrics->horiAdvance / 64.0 ));
1084 FT_TRACE5(( "\n" ));
1085 FT_TRACE5(( " vertBearingX: %f\n", metrics->vertBearingX / 64.0 ));
1086 FT_TRACE5(( " vertBearingY: %f\n", metrics->vertBearingY / 64.0 ));
1087 FT_TRACE5(( " vertAdvance: %f\n", metrics->vertAdvance / 64.0 ));
1088 }
1089#endif
1090
1091 Exit:
1092 return error;
1093 }
ios_base &_STLP_CALL internal(ios_base &__s)
Definition: _ios_base.h:311
struct FT_AutoHinter_InterfaceRec_ * FT_AutoHinter_Interface
typedefFT_BEGIN_HEADER struct FT_AutoHinterRec_ * FT_AutoHinter
Definition: autohint.h:79
#define FT_LOAD_RENDER
Definition: freetype.h:3024
#define FT_LOAD_VERTICAL_LAYOUT
Definition: freetype.h:3026
#define FT_LOAD_TARGET_MODE(x)
Definition: freetype.h:3154
FT_BEGIN_HEADER struct FT_Glyph_Metrics_ FT_Glyph_Metrics
#define FT_LOAD_SBITS_ONLY
Definition: freetype.h:3045
#define FT_LOAD_NO_BITMAP
Definition: freetype.h:3025
#define FT_LOAD_IGNORE_TRANSFORM
Definition: freetype.h:3032
#define FT_LOAD_NO_SCALE
Definition: freetype.h:3022
#define FT_LOAD_NO_RECURSE
Definition: freetype.h:3031
#define FT_LOAD_BITMAP_METRICS_ONLY
Definition: freetype.h:3039
#define FT_LOAD_NO_HINTING
Definition: freetype.h:3023
#define FT_HAS_FIXED_SIZES(face)
Definition: freetype.h:1320
#define FT_LOAD_FORCE_AUTOHINT
Definition: freetype.h:3027
#define FT_IS_SCALABLE(face)
Definition: freetype.h:1271
#define FT_LOAD_MONOCHROME
Definition: freetype.h:3033
FT_Vector_Transform(FT_Vector *vector, const FT_Matrix *matrix)
Definition: ftoutln.c:683
#define FT_LOAD_NO_AUTOHINT
Definition: freetype.h:3035
#define FT_IS_TRICKY(face)
Definition: freetype.h:1432
#define FT_LOAD_LINEAR_DESIGN
Definition: freetype.h:3034
#define FT_HINTING_ADOBE
Definition: ftdriver.h:344
FT_BEGIN_HEADER FT_Get_Font_Format(FT_Face face)
Definition: ftfntfmt.c:27
static void ft_glyphslot_clear(FT_GlyphSlot slot)
Definition: ftobjs.c:532
static FT_Renderer ft_lookup_glyph_renderer(FT_GlyphSlot slot)
Definition: ftobjs.c:4369
ft_glyphslot_preset_bitmap(FT_GlyphSlot slot, FT_Render_Mode mode, const FT_Vector *origin)
Definition: ftobjs.c:347
static void ft_glyphslot_grid_fit_metrics(FT_GlyphSlot slot, FT_Bool vertical)
Definition: ftobjs.c:743
FT_Render_Glyph(FT_GlyphSlot slot, FT_Render_Mode render_mode)
Definition: ftobjs.c:4796
#define FT_DRIVER_HAS_HINTER(x)
Definition: ftobjs.h:533
#define FT_DRIVER_HINTS_LIGHTLY(x)
Definition: ftobjs.h:536
FT_Outline_Check(FT_Outline *outline)
Definition: ftoutln.c:341
FT_Outline_Translate(const FT_Outline *outline, FT_Pos xOffset, FT_Pos yOffset)
Definition: ftoutln.c:507
FT_Outline_Transform(const FT_Outline *outline, const FT_Matrix *matrix)
Definition: ftoutln.c:706
#define ft_strstr
Definition: ftstdlib.h:92
GLsizei GLenum const GLvoid GLuint GLsizei GLfloat * metrics
Definition: glext.h:11745
GLenum mode
Definition: glext.h:6217
FT_BEGIN_HEADER struct PS_DriverRec_ * PS_Driver
FT_AutoHinter_GlyphLoadFunc load_glyph
Definition: autohint.h:205
FT_Module auto_hinter
Definition: ftobjs.h:906
FT_Module_Class * clazz
Definition: ftobjs.h:500
const void * module_interface
Definition: ftmodapi.h:240
FT_Renderer_Class * clazz
Definition: ftobjs.h:744
FT_Renderer_TransformFunc transform_glyph
Definition: ftrender.h:157
TT_MaxProfile max_profile
Definition: tttypes.h:1475
FT_ULong num_locations
Definition: tttypes.h:1601
FT_ULong font_program_size
Definition: tttypes.h:1553
FT_ULong cvt_program_size
Definition: tttypes.h:1557
FT_UShort maxSizeOfInstructions
Definition: tttables.h:581
Definition: vfat.h:185
struct _slot slot
Definition: vfat.h:196

Referenced by af_latin_metrics_init_blues(), af_latin_metrics_init_widths(), af_loader_load_glyph(), FT_Get_Advances(), FT_Load_Char(), FT_Render_Glyph_Internal(), ftc_basic_family_load_bitmap(), ftc_basic_family_load_glyph(), ftGdiGetGlyphOutline(), GreGetCharWidthW(), IntGetRealGlyph(), and NtGdiGetCharABCWidthsW().

◆ FT_MulDiv()

FT_MulDiv ( FT_Long  a,
FT_Long  b,
FT_Long  c 
)

Definition at line 415 of file ftcalc.c.

418 {
419 FT_Int s = 1;
420 FT_UInt32 a, b, c;
421
422
423 /* XXX: this function does not allow 64-bit arguments */
424
425 a = (FT_UInt32)a_;
426 b = (FT_UInt32)b_;
427 c = (FT_UInt32)c_;
428
429 FT_MOVE_SIGN( a_, a, s );
430 FT_MOVE_SIGN( b_, b, s );
431 FT_MOVE_SIGN( c_, c, s );
432
433 if ( c == 0 )
434 a = 0x7FFFFFFFUL;
435
436 else if ( a + b <= 129894UL - ( c >> 17 ) )
437 a = ( a * b + ( c >> 1 ) ) / c;
438
439 else
440 {
441 FT_Int64 temp, temp2;
442
443
444 ft_multo64( a, b, &temp );
445
446 temp2.hi = 0;
447 temp2.lo = c >> 1;
448
449 FT_Add64( &temp, &temp2, &temp );
450
451 /* last attempt to ditch long division */
452 a = ( temp.hi == 0 ) ? temp.lo / c
453 : ft_div64by32( temp.hi, temp.lo, c );
454 }
455
456 a_ = (FT_Long)a;
457
458 return s < 0 ? NEG_LONG( a_ ) : a_;
459 }
static void ft_multo64(FT_UInt32 x, FT_UInt32 y, FT_Int64 *z)
Definition: ftcalc.c:279
#define c
Definition: ke_i.h:80

Referenced by _bdf_parse_glyphs(), _ft_face_scale_advances(), af_latin_hint_edges(), af_latin_metrics_scale_dim(), af_loader_compute_darkening(), BBox_Conic_Check(), BDF_Face_Init(), cf2_blues_init(), cf2_computeDarkening(), cff_face_init(), cff_size_request(), cff_slot_load(), FNT_Face_Init(), FT_Get_Kerning(), FT_Load_Glyph(), FT_Matrix_Multiply_Scaled(), FT_Outline_EmboldenXY(), FT_Request_Metrics(), FT_Stroker_ConicTo(), FT_Stroker_CubicTo(), ft_stroker_inside(), ft_stroker_outside(), FT_Vector_Transform_Scaled(), IntRequestFontSize(), pcf_load_font(), pfr_get_kerning(), pfr_slot_load(), ps_hints_apply(), psh_glyph_interpolate_normal_points(), psh_glyph_interpolate_strong_points(), T1_Get_Track_Kerning(), T1_Set_MM_Design(), TT_Process_Simple_Glyph(), and tt_size_request().

◆ FT_MulFix()

FT_MulFix ( FT_Long  a,
FT_Long  b 
)

Definition at line 508 of file ftcalc.c.

510 {
511#ifdef FT_MULFIX_ASSEMBLER
512
513 return FT_MULFIX_ASSEMBLER( a_, b_ );
514
515#elif 0
516
517 /*
518 * This code is nonportable. See comment below.
519 *
520 * However, on a platform where right-shift of a signed quantity fills
521 * the leftmost bits by copying the sign bit, it might be faster.
522 */
523
524 FT_Long sa, sb;
525 FT_UInt32 a, b;
526
527
528 /*
529 * This is a clever way of converting a signed number `a' into its
530 * absolute value (stored back into `a') and its sign. The sign is
531 * stored in `sa'; 0 means `a' was positive or zero, and -1 means `a'
532 * was negative. (Similarly for `b' and `sb').
533 *
534 * Unfortunately, it doesn't work (at least not portably).
535 *
536 * It makes the assumption that right-shift on a negative signed value
537 * fills the leftmost bits by copying the sign bit. This is wrong.
538 * According to K&R 2nd ed, section `A7.8 Shift Operators' on page 206,
539 * the result of right-shift of a negative signed value is
540 * implementation-defined. At least one implementation fills the
541 * leftmost bits with 0s (i.e., it is exactly the same as an unsigned
542 * right shift). This means that when `a' is negative, `sa' ends up
543 * with the value 1 rather than -1. After that, everything else goes
544 * wrong.
545 */
546 sa = ( a_ >> ( sizeof ( a_ ) * 8 - 1 ) );
547 a = ( a_ ^ sa ) - sa;
548 sb = ( b_ >> ( sizeof ( b_ ) * 8 - 1 ) );
549 b = ( b_ ^ sb ) - sb;
550
551 a = (FT_UInt32)a_;
552 b = (FT_UInt32)b_;
553
554 if ( a + ( b >> 8 ) <= 8190UL )
555 a = ( a * b + 0x8000U ) >> 16;
556 else
557 {
558 FT_UInt32 al = a & 0xFFFFUL;
559
560
561 a = ( a >> 16 ) * b + al * ( b >> 16 ) +
562 ( ( al * ( b & 0xFFFFUL ) + 0x8000UL ) >> 16 );
563 }
564
565 sa ^= sb;
566 a = ( a ^ sa ) - sa;
567
568 return (FT_Long)a;
569
570#else /* 0 */
571
572 FT_Int s = 1;
573 FT_UInt32 a, b;
574
575
576 /* XXX: this function does not allow 64-bit arguments */
577
578 a = (FT_UInt32)a_;
579 b = (FT_UInt32)b_;
580
581 FT_MOVE_SIGN( a_, a, s );
582 FT_MOVE_SIGN( b_, b, s );
583
584 if ( a + ( b >> 8 ) <= 8190UL )
585 a = ( a * b + 0x8000UL ) >> 16;
586 else
587 {
588 FT_UInt32 al = a & 0xFFFFUL;
589
590
591 a = ( a >> 16 ) * b + al * ( b >> 16 ) +
592 ( ( al * ( b & 0xFFFFUL ) + 0x8000UL ) >> 16 );
593 }
594
595 a_ = (FT_Long)a;
596
597 return s < 0 ? NEG_LONG( a_ ) : a_;
598
599#endif /* 0 */
600
601 }
static struct sockaddr_in sa
Definition: adnsresfilter.c:69
superblock * sb
Definition: btrfs.c:4261

Referenced by af_glyph_hints_align_strong_points(), af_glyph_hints_reload(), af_iup_interp(), af_latin_hints_compute_blue_edges(), af_latin_hints_compute_edges(), af_latin_metrics_scale_dim(), af_loader_compute_darkening(), af_loader_embolden_glyph_in_slot(), af_loader_load_glyph(), cf2_blues_init(), cf2_computeDarkening(), cf2_doBlend(), cf2_glyphpath_computeIntersection(), cf2_glyphpath_computeOffset(), cf2_glyphpath_hintPoint(), cf2_hint_init(), cf2_hintmap_insertHint(), cf2_hintmap_map(), cf2_interpT2CharString(), cff_blend_build_vector(), cff_slot_load(), cid_slot_load_glyph(), compute_glyph_metrics(), FillTM(), FT_Get_Kerning(), FT_GlyphSlot_Embolden(), FT_Matrix_Invert(), FT_Matrix_Multiply(), FT_Outline_EmboldenXY(), ft_recompute_scaled_metrics(), FT_Request_Metrics(), ft_stroke_border_arcto(), ft_stroker_outside(), FT_Vector_Transform(), load_truetype_glyph(), pfr_glyph_load_rec(), pfr_slot_load(), ps_hints_apply(), psh_blues_scale_zones(), psh_globals_scale_widths(), psh_glyph_interpolate_normal_points(), psh_glyph_interpolate_other_points(), psh_glyph_interpolate_strong_points(), psh_hint_align(), T1_Load_Glyph(), t1_set_mm_blend(), TT_Load_Glyph(), TT_Process_Composite_Component(), TT_Process_Simple_Glyph(), and tt_size_reset().

◆ FT_New_Face()

FT_New_Face ( FT_Library  library,
const char filepathname,
FT_Long  face_index,
FT_Face aface 
)

Definition at line 1468 of file ftobjs.c.

1472 {
1474
1475
1476 /* test for valid `library' and `aface' delayed to `FT_Open_Face' */
1477 if ( !pathname )
1478 return FT_THROW( Invalid_Argument );
1479
1480 args.flags = FT_OPEN_PATHNAME;
1481 args.pathname = (char*)pathname;
1482 args.stream = NULL;
1483
1484 return ft_open_face_internal( library, &args, face_index, aface, 1 );
1485 }
static FT_Error ft_open_face_internal(FT_Library library, const FT_Open_Args *args, FT_Long face_index, FT_Face *aface, FT_Bool test_mac_fonts)
Definition: ftobjs.c:2389
char pathname[512]
Definition: util.h:13
#define args
Definition: format.c:66
Definition: match.c:390

◆ FT_New_Memory_Face()

FT_New_Memory_Face ( FT_Library  library,
const FT_Byte file_base,
FT_Long  file_size,
FT_Long  face_index,
FT_Face aface 
)

Definition at line 1493 of file ftobjs.c.

1498 {
1500
1501
1502 /* test for valid `library' and `face' delayed to `FT_Open_Face' */
1503 if ( !file_base )
1504 return FT_THROW( Invalid_Argument );
1505
1506 args.flags = FT_OPEN_MEMORY;
1507 args.memory_base = file_base;
1508 args.memory_size = file_size;
1509 args.stream = NULL;
1510
1511 return ft_open_face_internal( library, &args, face_index, aface, 1 );
1512 }
#define FT_OPEN_MEMORY
Definition: freetype.h:2003
static unsigned int file_size
Definition: regtests2xml.c:47

Referenced by FtfdLoadFontFile(), FtfdQueryFont(), FtfdQueryFontTree(), and IntGdiLoadFontByIndexFromMemory().

◆ FT_Open_Face()

FT_Open_Face ( FT_Library  library,
const FT_Open_Args args,
FT_Long  face_index,
FT_Face aface 
)

Definition at line 2379 of file ftobjs.c.

2383 {
2384 return ft_open_face_internal( library, args, face_index, aface, 1 );
2385 }

Referenced by T42_Face_Init().

◆ FT_Reference_Face()

FT_Reference_Face ( FT_Face  face)

Definition at line 2769 of file ftobjs.c.

2770 {
2771 if ( !face )
2772 return FT_THROW( Invalid_Face_Handle );
2773
2774 face->internal->refcount++;
2775
2776 return FT_Err_Ok;
2777 }

◆ FT_Render_Glyph()

FT_Render_Glyph ( FT_GlyphSlot  slot,
FT_Render_Mode  render_mode 
)

Definition at line 4796 of file ftobjs.c.

4798 {
4800
4801
4802 if ( !slot || !slot->face )
4803 return FT_THROW( Invalid_Argument );
4804
4805 library = FT_FACE_LIBRARY( slot->face );
4806
4807 return FT_Render_Glyph_Internal( library, slot, render_mode );
4808 }
FT_Render_Glyph_Internal(FT_Library library, FT_GlyphSlot slot, FT_Render_Mode render_mode)
Definition: ftobjs.c:4548
#define FT_FACE_LIBRARY(x)
Definition: ftobjs.h:602

Referenced by FT_Load_Glyph().

◆ FT_Request_Size()

FT_Request_Size ( FT_Face  face,
FT_Size_Request  req 
)

Definition at line 3256 of file ftobjs.c.

3258 {
3260 FT_Driver_Class clazz;
3261 FT_ULong strike_index;
3262
3263
3264 if ( !face )
3265 return FT_THROW( Invalid_Face_Handle );
3266
3267 if ( !req || req->width < 0 || req->height < 0 ||
3269 return FT_THROW( Invalid_Argument );
3270
3271 /* signal the auto-hinter to recompute its size metrics */
3272 /* (if requested) */
3273 face->size->internal->autohint_metrics.x_scale = 0;
3274
3275 clazz = face->driver->clazz;
3276
3277 if ( clazz->request_size )
3278 {
3279 error = clazz->request_size( face->size, req );
3280
3281 FT_TRACE5(( "FT_Request_Size (%s driver):\n",
3282 face->driver->root.clazz->module_name ));
3283 }
3284 else if ( !FT_IS_SCALABLE( face ) && FT_HAS_FIXED_SIZES( face ) )
3285 {
3286 /*
3287 * The reason that a driver doesn't have `request_size' defined is
3288 * either that the scaling here suffices or that the supported formats
3289 * are bitmap-only and size matching is not implemented.
3290 *
3291 * In the latter case, a simple size matching is done.
3292 */
3293 error = FT_Match_Size( face, req, 0, &strike_index );
3294 if ( error )
3295 return error;
3296
3297 return FT_Select_Size( face, (FT_Int)strike_index );
3298 }
3299 else
3300 {
3301 FT_Request_Metrics( face, req );
3302
3303 FT_TRACE5(( "FT_Request_Size:\n" ));
3304 }
3305
3306#ifdef FT_DEBUG_LEVEL_TRACE
3307 {
3308 FT_Size_Metrics* metrics = &face->size->metrics;
3309
3310
3311 FT_TRACE5(( " x scale: %ld (%f)\n",
3312 metrics->x_scale, metrics->x_scale / 65536.0 ));
3313 FT_TRACE5(( " y scale: %ld (%f)\n",
3314 metrics->y_scale, metrics->y_scale / 65536.0 ));
3315 FT_TRACE5(( " ascender: %f\n", metrics->ascender / 64.0 ));
3316 FT_TRACE5(( " descender: %f\n", metrics->descender / 64.0 ));
3317 FT_TRACE5(( " height: %f\n", metrics->height / 64.0 ));
3318 FT_TRACE5(( " max advance: %f\n", metrics->max_advance / 64.0 ));
3319 FT_TRACE5(( " x ppem: %d\n", metrics->x_ppem ));
3320 FT_TRACE5(( " y ppem: %d\n", metrics->y_ppem ));
3321 }
3322#endif
3323
3324 return error;
3325 }
FT_Match_Size(FT_Face face, FT_Size_Request req, FT_Bool ignore_width, FT_ULong *size_index)
Definition: ftobjs.c:2939
FT_Select_Size(FT_Face face, FT_Int strike_index)
Definition: ftobjs.c:3202
FT_Request_Metrics(FT_Face face, FT_Size_Request req)
Definition: ftobjs.c:3092
FT_Size_RequestFunc request_size
Definition: ftdrv.h:188
FT_Size_Request_Type type
Definition: freetype.h:2604

Referenced by FT_Set_Char_Size(), FT_Set_Pixel_Sizes(), IntRequestFontSize(), and T42_Size_Request().

◆ FT_RoundFix()

FT_RoundFix ( FT_Fixed  a)

Definition at line 87 of file ftcalc.c.

88 {
89 return ( ADD_LONG( a, 0x8000L - ( a < 0 ) ) ) & ~0xFFFFL;
90 }

Referenced by cff_parse_font_bbox(), and ps_parser_load_field().

◆ FT_Select_Charmap()

FT_Select_Charmap ( FT_Face  face,
FT_Encoding  encoding 
)

Definition at line 3521 of file ftobjs.c.

3523 {
3524 FT_CharMap* cur;
3526
3527
3528 if ( !face )
3529 return FT_THROW( Invalid_Face_Handle );
3530
3531 /* FT_ENCODING_NONE is a valid encoding for BDF, PCF, and Windows FNT */
3532 if ( encoding == FT_ENCODING_NONE && !face->num_charmaps )
3533 return FT_THROW( Invalid_Argument );
3534
3535 /* FT_ENCODING_UNICODE is special. We try to find the `best' Unicode */
3536 /* charmap available, i.e., one with UCS-4 characters, if possible. */
3537 /* */
3538 /* This is done by find_unicode_charmap() above, to share code. */
3539 if ( encoding == FT_ENCODING_UNICODE )
3540 return find_unicode_charmap( face );
3541
3542 cur = face->charmaps;
3543 if ( !cur )
3544 return FT_THROW( Invalid_CharMap_Handle );
3545
3546 limit = cur + face->num_charmaps;
3547
3548 for ( ; cur < limit; cur++ )
3549 {
3550 if ( cur[0]->encoding == encoding )
3551 {
3552 face->charmap = cur[0];
3553 return FT_Err_Ok;
3554 }
3555 }
3556
3557 return FT_THROW( Invalid_Argument );
3558 }
static FT_Error find_unicode_charmap(FT_Face face)
Definition: ftobjs.c:1242
FxCollectionEntry * cur
GLint limit
Definition: glext.h:10326

Referenced by af_face_globals_compute_style_coverage(), af_latin_metrics_init(), and FtfdLoadFontFile().

◆ FT_Select_Size()

FT_Select_Size ( FT_Face  face,
FT_Int  strike_index 
)

Definition at line 3202 of file ftobjs.c.

3204 {
3206 FT_Driver_Class clazz;
3207
3208
3209 if ( !face || !FT_HAS_FIXED_SIZES( face ) )
3210 return FT_THROW( Invalid_Face_Handle );
3211
3212 if ( strike_index < 0 || strike_index >= face->num_fixed_sizes )
3213 return FT_THROW( Invalid_Argument );
3214
3215 clazz = face->driver->clazz;
3216
3217 if ( clazz->select_size )
3218 {
3219 error = clazz->select_size( face->size, (FT_ULong)strike_index );
3220
3221 FT_TRACE5(( "FT_Select_Size (%s driver):\n",
3222 face->driver->root.clazz->module_name ));
3223 }
3224 else
3225 {
3226 FT_Select_Metrics( face, (FT_ULong)strike_index );
3227
3228 FT_TRACE5(( "FT_Select_Size:\n" ));
3229 }
3230
3231#ifdef FT_DEBUG_LEVEL_TRACE
3232 {
3233 FT_Size_Metrics* metrics = &face->size->metrics;
3234
3235
3236 FT_TRACE5(( " x scale: %ld (%f)\n",
3237 metrics->x_scale, metrics->x_scale / 65536.0 ));
3238 FT_TRACE5(( " y scale: %ld (%f)\n",
3239 metrics->y_scale, metrics->y_scale / 65536.0 ));
3240 FT_TRACE5(( " ascender: %f\n", metrics->ascender / 64.0 ));
3241 FT_TRACE5(( " descender: %f\n", metrics->descender / 64.0 ));
3242 FT_TRACE5(( " height: %f\n", metrics->height / 64.0 ));
3243 FT_TRACE5(( " max advance: %f\n", metrics->max_advance / 64.0 ));
3244 FT_TRACE5(( " x ppem: %d\n", metrics->x_ppem ));
3245 FT_TRACE5(( " y ppem: %d\n", metrics->y_ppem ));
3246 }
3247#endif
3248
3249 return error;
3250 }
FT_Select_Metrics(FT_Face face, FT_ULong strike_index)
Definition: ftobjs.c:3057
FT_Size_SelectFunc select_size
Definition: ftdrv.h:189

Referenced by FT_Request_Size(), and T42_Size_Select().

◆ FT_Set_Char_Size()

FT_Set_Char_Size ( FT_Face  face,
FT_F26Dot6  char_width,
FT_F26Dot6  char_height,
FT_UInt  horz_resolution,
FT_UInt  vert_resolution 
)

Definition at line 3331 of file ftobjs.c.

3336 {
3338
3339
3340 /* check of `face' delayed to `FT_Request_Size' */
3341
3342 if ( !char_width )
3343 char_width = char_height;
3344 else if ( !char_height )
3345 char_height = char_width;
3346
3347 if ( !horz_resolution )
3348 horz_resolution = vert_resolution;
3349 else if ( !vert_resolution )
3350 vert_resolution = horz_resolution;
3351
3352 if ( char_width < 1 * 64 )
3353 char_width = 1 * 64;
3354 if ( char_height < 1 * 64 )
3355 char_height = 1 * 64;
3356
3357 if ( !horz_resolution )
3358 horz_resolution = vert_resolution = 72;
3359
3361 req.width = char_width;
3362 req.height = char_height;
3363 req.horiResolution = horz_resolution;
3364 req.vertResolution = vert_resolution;
3365
3366 return FT_Request_Size( face, &req );
3367 }
FT_Request_Size(FT_Face face, FT_Size_Request req)
Definition: ftobjs.c:3256
FT_UInt horiResolution
Definition: freetype.h:2607
FT_UInt vertResolution
Definition: freetype.h:2608

Referenced by ftc_scaler_lookup_size().

◆ FT_Set_Charmap()

FT_Set_Charmap ( FT_Face  face,
FT_CharMap  charmap 
)

Definition at line 3564 of file ftobjs.c.

3566 {
3567 FT_CharMap* cur;
3569
3570
3571 if ( !face )
3572 return FT_THROW( Invalid_Face_Handle );
3573
3574 cur = face->charmaps;
3575 if ( !cur || !charmap )
3576 return FT_THROW( Invalid_CharMap_Handle );
3577
3578 limit = cur + face->num_charmaps;
3579
3580 for ( ; cur < limit; cur++ )
3581 {
3582 if ( cur[0] == charmap &&
3583 FT_Get_CMap_Format ( charmap ) != 14 )
3584 {
3585 face->charmap = cur[0];
3586 return FT_Err_Ok;
3587 }
3588 }
3589
3590 return FT_THROW( Invalid_Argument );
3591 }
FT_Get_CMap_Format(FT_CharMap charmap)
Definition: ftobjs.c:4269

Referenced by af_face_globals_compute_style_coverage(), af_latin_metrics_init(), FTC_CMapCache_Lookup(), GreGetCharWidthW(), NtGdiGetCharABCWidthsW(), T1_Read_PFM(), and TextIntUpdateSize().

◆ FT_Set_Pixel_Sizes()

FT_Set_Pixel_Sizes ( FT_Face  face,
FT_UInt  pixel_width,
FT_UInt  pixel_height 
)

Definition at line 3373 of file ftobjs.c.

3376 {
3378
3379
3380 /* check of `face' delayed to `FT_Request_Size' */
3381
3382 if ( pixel_width == 0 )
3383 pixel_width = pixel_height;
3384 else if ( pixel_height == 0 )
3385 pixel_height = pixel_width;
3386
3387 if ( pixel_width < 1 )
3388 pixel_width = 1;
3389 if ( pixel_height < 1 )
3390 pixel_height = 1;
3391
3392 /* use `>=' to avoid potential compiler warning on 16bit platforms */
3393 if ( pixel_width >= 0xFFFFU )
3394 pixel_width = 0xFFFFU;
3395 if ( pixel_height >= 0xFFFFU )
3396 pixel_height = 0xFFFFU;
3397
3399 req.width = (FT_Long)( pixel_width << 6 );
3400 req.height = (FT_Long)( pixel_height << 6 );
3401 req.horiResolution = 0;
3402 req.vertResolution = 0;
3403
3404 return FT_Request_Size( face, &req );
3405 }

Referenced by ftc_scaler_lookup_size().

◆ FT_Set_Transform()

FT_Set_Transform ( FT_Face  face,
FT_Matrix matrix,
FT_Vector delta 
)

Definition at line 689 of file ftobjs.c.

692 {
694
695
696 if ( !face )
697 return;
698
699 internal = face->internal;
700
701 internal->transform_flags = 0;
702
703 if ( !matrix )
704 {
705 internal->transform_matrix.xx = 0x10000L;
706 internal->transform_matrix.xy = 0;
707 internal->transform_matrix.yx = 0;
708 internal->transform_matrix.yy = 0x10000L;
709
710 matrix = &internal->transform_matrix;
711 }
712 else
713 internal->transform_matrix = *matrix;
714
715 /* set transform_flags bit flag 0 if `matrix' isn't the identity */
716 if ( ( matrix->xy | matrix->yx ) ||
717 matrix->xx != 0x10000L ||
718 matrix->yy != 0x10000L )
719 internal->transform_flags |= 1;
720
721 if ( !delta )
722 {
723 internal->transform_delta.x = 0;
724 internal->transform_delta.y = 0;
725
726 delta = &internal->transform_delta;
727 }
728 else
729 internal->transform_delta = *delta;
730
731 /* set transform_flags bit flag 1 if `delta' isn't the null vector */
732 if ( delta->x | delta->y )
733 internal->transform_flags |= 2;
734 }
GLuint GLenum matrix
Definition: glext.h:9407

Referenced by FontLink_Chain_FindGlyph(), ftGdiGetGlyphOutline(), ftGdiGetTextMetricsW(), GreGetCharWidthW(), IntExtTextOutW(), NtGdiGetCharABCWidthsW(), and TextIntGetTextExtentPoint().

◆ FT_Vector_Transform()

FT_Vector_Transform ( FT_Vector vector,
const FT_Matrix matrix 
)

Definition at line 683 of file ftoutln.c.

685 {
686 FT_Pos xz, yz;
687
688
689 if ( !vector || !matrix )
690 return;
691
692 xz = FT_MulFix( vector->x, matrix->xx ) +
693 FT_MulFix( vector->y, matrix->xy );
694
695 yz = FT_MulFix( vector->x, matrix->yx ) +
696 FT_MulFix( vector->y, matrix->yy );
697
698 vector->x = xz;
699 vector->y = yz;
700 }

Referenced by af_loader_load_glyph(), FT_Glyph_Transform(), FT_Load_Glyph(), FT_Outline_Transform(), ftGdiGetGlyphOutline(), IntExtTextOutW(), and IntGetTextDisposition().