ReactOS 0.4.15-dev-5672-gf73ac17
freetype.h File Reference
#include <ft2build.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_
 

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   9
 
#define FREETYPE_PATCH   0
 

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
 

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, 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_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 *vec, 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 4553 of file freetype.h.

◆ FREETYPE_MINOR

#define FREETYPE_MINOR   9

Definition at line 4554 of file freetype.h.

◆ FREETYPE_PATCH

#define FREETYPE_PATCH   0

Definition at line 4555 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:94

Definition at line 613 of file freetype.h.

◆ ft_encoding_adobe_custom

#define ft_encoding_adobe_custom   FT_ENCODING_ADOBE_CUSTOM

Definition at line 813 of file freetype.h.

◆ ft_encoding_adobe_expert

#define ft_encoding_adobe_expert   FT_ENCODING_ADOBE_EXPERT

Definition at line 812 of file freetype.h.

◆ ft_encoding_adobe_standard

#define ft_encoding_adobe_standard   FT_ENCODING_ADOBE_STANDARD

Definition at line 811 of file freetype.h.

◆ ft_encoding_apple_roman

#define ft_encoding_apple_roman   FT_ENCODING_APPLE_ROMAN

Definition at line 814 of file freetype.h.

◆ ft_encoding_big5

#define ft_encoding_big5   FT_ENCODING_BIG5

Definition at line 807 of file freetype.h.

◆ ft_encoding_gb2312

#define ft_encoding_gb2312   FT_ENCODING_PRC

Definition at line 806 of file freetype.h.

◆ ft_encoding_johab

#define ft_encoding_johab   FT_ENCODING_JOHAB

Definition at line 809 of file freetype.h.

◆ ft_encoding_latin_1

#define ft_encoding_latin_1   FT_ENCODING_ADOBE_LATIN_1

Definition at line 803 of file freetype.h.

◆ ft_encoding_latin_2

#define ft_encoding_latin_2   FT_ENCODING_OLD_LATIN_2

Definition at line 804 of file freetype.h.

◆ ft_encoding_none

#define ft_encoding_none   FT_ENCODING_NONE

Definition at line 800 of file freetype.h.

◆ ft_encoding_sjis

#define ft_encoding_sjis   FT_ENCODING_SJIS

Definition at line 805 of file freetype.h.

◆ ft_encoding_symbol

#define ft_encoding_symbol   FT_ENCODING_MS_SYMBOL

Definition at line 802 of file freetype.h.

◆ ft_encoding_unicode

#define ft_encoding_unicode   FT_ENCODING_UNICODE

Definition at line 801 of file freetype.h.

◆ ft_encoding_wansung

#define ft_encoding_wansung   FT_ENCODING_WANSUNG

Definition at line 808 of file freetype.h.

◆ FT_FACE_FLAG_CID_KEYED

#define FT_FACE_FLAG_CID_KEYED   ( 1L << 12 )

Definition at line 1250 of file freetype.h.

◆ FT_FACE_FLAG_COLOR

#define FT_FACE_FLAG_COLOR   ( 1L << 14 )

Definition at line 1252 of file freetype.h.

◆ FT_FACE_FLAG_EXTERNAL_STREAM

#define FT_FACE_FLAG_EXTERNAL_STREAM   ( 1L << 10 )

Definition at line 1248 of file freetype.h.

◆ FT_FACE_FLAG_FAST_GLYPHS

#define FT_FACE_FLAG_FAST_GLYPHS   ( 1L << 7 )

Definition at line 1245 of file freetype.h.

◆ FT_FACE_FLAG_FIXED_SIZES

#define FT_FACE_FLAG_FIXED_SIZES   ( 1L << 1 )

Definition at line 1239 of file freetype.h.

◆ FT_FACE_FLAG_FIXED_WIDTH

#define FT_FACE_FLAG_FIXED_WIDTH   ( 1L << 2 )

Definition at line 1240 of file freetype.h.

◆ FT_FACE_FLAG_GLYPH_NAMES

#define FT_FACE_FLAG_GLYPH_NAMES   ( 1L << 9 )

Definition at line 1247 of file freetype.h.

◆ FT_FACE_FLAG_HINTER

#define FT_FACE_FLAG_HINTER   ( 1L << 11 )

Definition at line 1249 of file freetype.h.

◆ FT_FACE_FLAG_HORIZONTAL

#define FT_FACE_FLAG_HORIZONTAL   ( 1L << 4 )

Definition at line 1242 of file freetype.h.

◆ FT_FACE_FLAG_KERNING

#define FT_FACE_FLAG_KERNING   ( 1L << 6 )

Definition at line 1244 of file freetype.h.

◆ FT_FACE_FLAG_MULTIPLE_MASTERS

#define FT_FACE_FLAG_MULTIPLE_MASTERS   ( 1L << 8 )

Definition at line 1246 of file freetype.h.

◆ FT_FACE_FLAG_SCALABLE

#define FT_FACE_FLAG_SCALABLE   ( 1L << 0 )

Definition at line 1238 of file freetype.h.

◆ FT_FACE_FLAG_SFNT

#define FT_FACE_FLAG_SFNT   ( 1L << 3 )

Definition at line 1241 of file freetype.h.

◆ FT_FACE_FLAG_TRICKY

#define FT_FACE_FLAG_TRICKY   ( 1L << 13 )

Definition at line 1251 of file freetype.h.

◆ FT_FACE_FLAG_VARIATION

#define FT_FACE_FLAG_VARIATION   ( 1L << 15 )

Definition at line 1253 of file freetype.h.

◆ FT_FACE_FLAG_VERTICAL

#define FT_FACE_FLAG_VERTICAL   ( 1L << 5 )

Definition at line 1243 of file freetype.h.

◆ FT_FSTYPE_BITMAP_EMBEDDING_ONLY

#define FT_FSTYPE_BITMAP_EMBEDDING_ONLY   0x0200

Definition at line 4042 of file freetype.h.

◆ FT_FSTYPE_EDITABLE_EMBEDDING

#define FT_FSTYPE_EDITABLE_EMBEDDING   0x0008

Definition at line 4040 of file freetype.h.

◆ FT_FSTYPE_INSTALLABLE_EMBEDDING

#define FT_FSTYPE_INSTALLABLE_EMBEDDING   0x0000

Definition at line 4037 of file freetype.h.

◆ FT_FSTYPE_NO_SUBSETTING

#define FT_FSTYPE_NO_SUBSETTING   0x0100

Definition at line 4041 of file freetype.h.

◆ FT_FSTYPE_PREVIEW_AND_PRINT_EMBEDDING

#define FT_FSTYPE_PREVIEW_AND_PRINT_EMBEDDING   0x0004

Definition at line 4039 of file freetype.h.

◆ FT_FSTYPE_RESTRICTED_LICENSE_EMBEDDING

#define FT_FSTYPE_RESTRICTED_LICENSE_EMBEDDING   0x0002

Definition at line 4038 of file freetype.h.

◆ FT_HAS_COLOR

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

Definition at line 1491 of file freetype.h.

◆ FT_HAS_FAST_GLYPHS

#define FT_HAS_FAST_GLYPHS (   face)    0

Definition at line 1374 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 1361 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 1387 of file freetype.h.

◆ FT_HAS_HORIZONTAL

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

Definition at line 1269 of file freetype.h.

◆ FT_HAS_KERNING

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

Definition at line 1297 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 1402 of file freetype.h.

◆ FT_HAS_VERTICAL

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

Definition at line 1283 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 1460 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 1346 of file freetype.h.

◆ FT_IS_NAMED_INSTANCE

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

Definition at line 1424 of file freetype.h.

◆ FT_IS_SCALABLE

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

Definition at line 1312 of file freetype.h.

◆ FT_IS_SFNT

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

Definition at line 1331 of file freetype.h.

◆ FT_IS_TRICKY

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

Definition at line 1474 of file freetype.h.

◆ FT_IS_VARIATION

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

Definition at line 1442 of file freetype.h.

◆ ft_kerning_default

#define ft_kerning_default   FT_KERNING_DEFAULT

Definition at line 3398 of file freetype.h.

◆ ft_kerning_unfitted

#define ft_kerning_unfitted   FT_KERNING_UNFITTED

Definition at line 3399 of file freetype.h.

◆ ft_kerning_unscaled

#define ft_kerning_unscaled   FT_KERNING_UNSCALED

Definition at line 3400 of file freetype.h.

◆ FT_LOAD_ADVANCE_ONLY

#define FT_LOAD_ADVANCE_ONLY   ( 1L << 8 )

Definition at line 3031 of file freetype.h.

◆ FT_LOAD_BITMAP_METRICS_ONLY

#define FT_LOAD_BITMAP_METRICS_ONLY   ( 1L << 22 )

Definition at line 3026 of file freetype.h.

◆ FT_LOAD_COLOR

#define FT_LOAD_COLOR   ( 1L << 20 )

Definition at line 3024 of file freetype.h.

◆ FT_LOAD_COMPUTE_METRICS

#define FT_LOAD_COMPUTE_METRICS   ( 1L << 21 )

Definition at line 3025 of file freetype.h.

◆ FT_LOAD_CROP_BITMAP

#define FT_LOAD_CROP_BITMAP   ( 1L << 6 )

Definition at line 3015 of file freetype.h.

◆ FT_LOAD_DEFAULT

#define FT_LOAD_DEFAULT   0x0

Definition at line 3008 of file freetype.h.

◆ FT_LOAD_FORCE_AUTOHINT

#define FT_LOAD_FORCE_AUTOHINT   ( 1L << 5 )

Definition at line 3014 of file freetype.h.

◆ FT_LOAD_IGNORE_GLOBAL_ADVANCE_WIDTH

#define FT_LOAD_IGNORE_GLOBAL_ADVANCE_WIDTH   ( 1L << 9 )

Definition at line 3017 of file freetype.h.

◆ FT_LOAD_IGNORE_TRANSFORM

#define FT_LOAD_IGNORE_TRANSFORM   ( 1L << 11 )

Definition at line 3019 of file freetype.h.

◆ FT_LOAD_LINEAR_DESIGN

#define FT_LOAD_LINEAR_DESIGN   ( 1L << 13 )

Definition at line 3021 of file freetype.h.

◆ FT_LOAD_MONOCHROME

#define FT_LOAD_MONOCHROME   ( 1L << 12 )

Definition at line 3020 of file freetype.h.

◆ FT_LOAD_NO_AUTOHINT

#define FT_LOAD_NO_AUTOHINT   ( 1L << 15 )

Definition at line 3022 of file freetype.h.

◆ FT_LOAD_NO_BITMAP

#define FT_LOAD_NO_BITMAP   ( 1L << 3 )

Definition at line 3012 of file freetype.h.

◆ FT_LOAD_NO_HINTING

#define FT_LOAD_NO_HINTING   ( 1L << 1 )

Definition at line 3010 of file freetype.h.

◆ FT_LOAD_NO_RECURSE

#define FT_LOAD_NO_RECURSE   ( 1L << 10 )

Definition at line 3018 of file freetype.h.

◆ FT_LOAD_NO_SCALE

#define FT_LOAD_NO_SCALE   ( 1L << 0 )

Definition at line 3009 of file freetype.h.

◆ FT_LOAD_PEDANTIC

#define FT_LOAD_PEDANTIC   ( 1L << 7 )

Definition at line 3016 of file freetype.h.

◆ FT_LOAD_RENDER

#define FT_LOAD_RENDER   ( 1L << 2 )

Definition at line 3011 of file freetype.h.

◆ FT_LOAD_SBITS_ONLY

#define FT_LOAD_SBITS_ONLY   ( 1L << 14 )

Definition at line 3032 of file freetype.h.

◆ FT_LOAD_TARGET_

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

Definition at line 3118 of file freetype.h.

◆ FT_LOAD_TARGET_LCD

#define FT_LOAD_TARGET_LCD   FT_LOAD_TARGET_( FT_RENDER_MODE_LCD )

Definition at line 3123 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 3124 of file freetype.h.

◆ FT_LOAD_TARGET_LIGHT

#define FT_LOAD_TARGET_LIGHT   FT_LOAD_TARGET_( FT_RENDER_MODE_LIGHT )

Definition at line 3121 of file freetype.h.

◆ FT_LOAD_TARGET_MODE

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

Definition at line 3137 of file freetype.h.

◆ FT_LOAD_TARGET_MONO

#define FT_LOAD_TARGET_MONO   FT_LOAD_TARGET_( FT_RENDER_MODE_MONO )

Definition at line 3122 of file freetype.h.

◆ FT_LOAD_TARGET_NORMAL

#define FT_LOAD_TARGET_NORMAL   FT_LOAD_TARGET_( FT_RENDER_MODE_NORMAL )

Definition at line 3120 of file freetype.h.

◆ FT_LOAD_VERTICAL_LAYOUT

#define FT_LOAD_VERTICAL_LAYOUT   ( 1L << 4 )

Definition at line 3013 of file freetype.h.

◆ FT_OPEN_DRIVER

#define FT_OPEN_DRIVER   0x8

Definition at line 2037 of file freetype.h.

◆ ft_open_driver

#define ft_open_driver   FT_OPEN_DRIVER

Definition at line 2046 of file freetype.h.

◆ FT_OPEN_MEMORY

#define FT_OPEN_MEMORY   0x1

Definition at line 2034 of file freetype.h.

◆ ft_open_memory

#define ft_open_memory   FT_OPEN_MEMORY

Definition at line 2043 of file freetype.h.

◆ FT_OPEN_PARAMS

#define FT_OPEN_PARAMS   0x10

Definition at line 2038 of file freetype.h.

◆ ft_open_params

#define ft_open_params   FT_OPEN_PARAMS

Definition at line 2047 of file freetype.h.

◆ FT_OPEN_PATHNAME

#define FT_OPEN_PATHNAME   0x4

Definition at line 2036 of file freetype.h.

◆ ft_open_pathname

#define ft_open_pathname   FT_OPEN_PATHNAME

Definition at line 2045 of file freetype.h.

◆ FT_OPEN_STREAM

#define FT_OPEN_STREAM   0x2

Definition at line 2035 of file freetype.h.

◆ ft_open_stream

#define ft_open_stream   FT_OPEN_STREAM

Definition at line 2044 of file freetype.h.

◆ ft_render_mode_mono

#define ft_render_mode_mono   FT_RENDER_MODE_MONO

Definition at line 3248 of file freetype.h.

◆ ft_render_mode_normal

#define ft_render_mode_normal   FT_RENDER_MODE_NORMAL

Definition at line 3247 of file freetype.h.

◆ FT_STYLE_FLAG_BOLD

#define FT_STYLE_FLAG_BOLD   ( 1 << 1 )

Definition at line 1518 of file freetype.h.

◆ FT_STYLE_FLAG_ITALIC

#define FT_STYLE_FLAG_ITALIC   ( 1 << 0 )

Definition at line 1517 of file freetype.h.

◆ FT_SUBGLYPH_FLAG_2X2

#define FT_SUBGLYPH_FLAG_2X2   0x80

Definition at line 3927 of file freetype.h.

◆ FT_SUBGLYPH_FLAG_ARGS_ARE_WORDS

#define FT_SUBGLYPH_FLAG_ARGS_ARE_WORDS   1

Definition at line 3922 of file freetype.h.

◆ FT_SUBGLYPH_FLAG_ARGS_ARE_XY_VALUES

#define FT_SUBGLYPH_FLAG_ARGS_ARE_XY_VALUES   2

Definition at line 3923 of file freetype.h.

◆ FT_SUBGLYPH_FLAG_ROUND_XY_TO_GRID

#define FT_SUBGLYPH_FLAG_ROUND_XY_TO_GRID   4

Definition at line 3924 of file freetype.h.

◆ FT_SUBGLYPH_FLAG_SCALE

#define FT_SUBGLYPH_FLAG_SCALE   8

Definition at line 3925 of file freetype.h.

◆ FT_SUBGLYPH_FLAG_USE_MY_METRICS

#define FT_SUBGLYPH_FLAG_USE_MY_METRICS   0x200

Definition at line 3928 of file freetype.h.

◆ FT_SUBGLYPH_FLAG_XY_SCALE

#define FT_SUBGLYPH_FLAG_XY_SCALE   0x40

Definition at line 3926 of file freetype.h.

Typedef Documentation

◆ FT_Bitmap_Size

◆ FT_CharMap

Definition at line 588 of file freetype.h.

◆ FT_CharMapRec

◆ FT_Driver

Definition at line 449 of file freetype.h.

◆ FT_Encoding

◆ FT_Face

Definition at line 503 of file freetype.h.

◆ FT_Face_Internal

Definition at line 871 of file freetype.h.

◆ FT_FaceRec

◆ FT_Glyph_Metrics

◆ FT_GlyphSlot

Definition at line 554 of file freetype.h.

◆ FT_GlyphSlotRec

◆ FT_Kerning_Mode

◆ FT_Library

Definition at line 417 of file freetype.h.

◆ FT_Module

Definition at line 437 of file freetype.h.

◆ FT_Open_Args

◆ FT_Parameter

◆ FT_Render_Mode

◆ FT_Renderer

Definition at line 463 of file freetype.h.

◆ FT_Size

Definition at line 534 of file freetype.h.

◆ FT_Size_Internal

Definition at line 1530 of file freetype.h.

◆ FT_Size_Metrics

◆ FT_Size_Request

Definition at line 2636 of file freetype.h.

◆ FT_Size_Request_Type

◆ FT_Size_RequestRec

◆ FT_SizeRec

◆ FT_Slot_Internal

Definition at line 1711 of file freetype.h.

◆ FT_SubGlyph

Definition at line 1699 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 765 of file freetype.h.

766 {
767 FT_ENC_TAG( FT_ENCODING_NONE, 0, 0, 0, 0 ),
768
769 FT_ENC_TAG( FT_ENCODING_MS_SYMBOL, 's', 'y', 'm', 'b' ),
770 FT_ENC_TAG( FT_ENCODING_UNICODE, 'u', 'n', 'i', 'c' ),
771
772 FT_ENC_TAG( FT_ENCODING_SJIS, 's', 'j', 'i', 's' ),
773 FT_ENC_TAG( FT_ENCODING_PRC, 'g', 'b', ' ', ' ' ),
774 FT_ENC_TAG( FT_ENCODING_BIG5, 'b', 'i', 'g', '5' ),
775 FT_ENC_TAG( FT_ENCODING_WANSUNG, 'w', 'a', 'n', 's' ),
776 FT_ENC_TAG( FT_ENCODING_JOHAB, 'j', 'o', 'h', 'a' ),
777
778 /* for backward compatibility */
779 FT_ENCODING_GB2312 = FT_ENCODING_PRC,
780 FT_ENCODING_MS_SJIS = FT_ENCODING_SJIS,
781 FT_ENCODING_MS_GB2312 = FT_ENCODING_PRC,
782 FT_ENCODING_MS_BIG5 = FT_ENCODING_BIG5,
783 FT_ENCODING_MS_WANSUNG = FT_ENCODING_WANSUNG,
784 FT_ENCODING_MS_JOHAB = FT_ENCODING_JOHAB,
785
786 FT_ENC_TAG( FT_ENCODING_ADOBE_STANDARD, 'A', 'D', 'O', 'B' ),
787 FT_ENC_TAG( FT_ENCODING_ADOBE_EXPERT, 'A', 'D', 'B', 'E' ),
788 FT_ENC_TAG( FT_ENCODING_ADOBE_CUSTOM, 'A', 'D', 'B', 'C' ),
789 FT_ENC_TAG( FT_ENCODING_ADOBE_LATIN_1, 'l', 'a', 't', '1' ),
790
791 FT_ENC_TAG( FT_ENCODING_OLD_LATIN_2, 'l', 'a', 't', '2' ),
792
793 FT_ENC_TAG( FT_ENCODING_APPLE_ROMAN, 'a', 'r', 'm', 'n' )
794
795 } FT_Encoding;
@ FT_ENCODING_MS_JOHAB
Definition: freetype.h:784
@ FT_ENCODING_GB2312
Definition: freetype.h:779
@ FT_ENCODING_MS_SJIS
Definition: freetype.h:780
@ FT_ENCODING_MS_WANSUNG
Definition: freetype.h:783
@ FT_ENCODING_MS_BIG5
Definition: freetype.h:782
@ FT_ENCODING_MS_GB2312
Definition: freetype.h:781
#define FT_ENC_TAG(value, a, b, c, d)
Definition: freetype.h:613
enum FT_Encoding_ FT_Encoding

◆ FT_Kerning_Mode_

Enumerator
FT_KERNING_DEFAULT 
FT_KERNING_UNFITTED 
FT_KERNING_UNSCALED 

Definition at line 3387 of file freetype.h.

3388 {
3392
enum FT_Kerning_Mode_ FT_Kerning_Mode
@ FT_KERNING_UNFITTED
Definition: freetype.h:3390
@ FT_KERNING_UNSCALED
Definition: freetype.h:3391
@ FT_KERNING_DEFAULT
Definition: freetype.h:3389

◆ 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 3232 of file freetype.h.

3233 {
3239
3241
enum FT_Render_Mode_ FT_Render_Mode
@ FT_RENDER_MODE_MONO
Definition: freetype.h:3236
@ FT_RENDER_MODE_NORMAL
Definition: freetype.h:3234
@ FT_RENDER_MODE_LIGHT
Definition: freetype.h:3235
@ FT_RENDER_MODE_MAX
Definition: freetype.h:3240
@ FT_RENDER_MODE_LCD_V
Definition: freetype.h:3238
@ FT_RENDER_MODE_LCD
Definition: freetype.h:3237

◆ 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 2568 of file freetype.h.

2569 {
2575
2577
enum FT_Size_Request_Type_ FT_Size_Request_Type
@ FT_SIZE_REQUEST_TYPE_BBOX
Definition: freetype.h:2572
@ FT_SIZE_REQUEST_TYPE_NOMINAL
Definition: freetype.h:2570
@ FT_SIZE_REQUEST_TYPE_REAL_DIM
Definition: freetype.h:2571
@ FT_SIZE_REQUEST_TYPE_SCALES
Definition: freetype.h:2574
@ FT_SIZE_REQUEST_TYPE_MAX
Definition: freetype.h:2576
@ FT_SIZE_REQUEST_TYPE_CELL
Definition: freetype.h:2573

Function Documentation

◆ FT_Attach_File()

FT_Attach_File ( FT_Face  face,
const char filepathname 
)

Definition at line 2641 of file ftobjs.c.

2643 {
2645
2646
2647 /* test for valid `face' delayed to `FT_Attach_Stream' */
2648
2649 if ( !filepathname )
2650 return FT_THROW( Invalid_Argument );
2651
2652 open.stream = NULL;
2653 open.flags = FT_OPEN_PATHNAME;
2654 open.pathname = (char*)filepathname;
2655
2656 return FT_Attach_Stream( face, &open );
2657 }
#define open
Definition: acwin.h:95
#define NULL
Definition: types.h:112
#define FT_OPEN_PATHNAME
Definition: freetype.h:2036
#define FT_THROW(e)
Definition: ftdebug.h:213
FT_Attach_Stream(FT_Face face, FT_Open_Args *parameters)
Definition: ftobjs.c:2663
GLenum GLuint GLint GLenum face
Definition: glext.h:7025
TCHAR filepathname[1000]
Definition: main.cpp:52

◆ FT_Attach_Stream()

FT_Attach_Stream ( FT_Face  face,
FT_Open_Args parameters 
)

Definition at line 2663 of file ftobjs.c.

2665 {
2669
2670 FT_Driver_Class clazz;
2671
2672
2673 /* test for valid `parameters' delayed to `FT_Stream_New' */
2674
2675 if ( !face )
2676 return FT_THROW( Invalid_Face_Handle );
2677
2678 driver = face->driver;
2679 if ( !driver )
2680 return FT_THROW( Invalid_Driver_Handle );
2681
2682 error = FT_Stream_New( driver->root.library, parameters, &stream );
2683 if ( error )
2684 goto Exit;
2685
2686 /* we implement FT_Attach_Stream in each driver through the */
2687 /* `attach_file' interface */
2688
2689 error = FT_ERR( Unimplemented_Feature );
2690 clazz = driver->clazz;
2691 if ( clazz->attach_file )
2692 error = clazz->attach_file( face, stream );
2693
2694 /* close the attached stream */
2696 (FT_Bool)( parameters->stream &&
2697 ( parameters->flags & FT_OPEN_STREAM ) ) );
2698
2699 Exit:
2700 return error;
2701 }
#define FT_OPEN_STREAM
Definition: freetype.h:2035
FT_Stream_New(FT_Library library, const FT_Open_Args *args, FT_Stream *astream)
Definition: ftobjs.c:178
FT_Stream_Free(FT_Stream stream, FT_Int external)
Definition: ftobjs.c:246
FT_BEGIN_HEADER typedef unsigned char FT_Bool
Definition: fttypes.h:108
int FT_Error
Definition: fttypes.h:300
#define FT_ERR(e)
Definition: fttypes.h:586
#define error(str)
Definition: mkdosfs.c:1605
struct @1646::@1647 driver
static void Exit(void)
Definition: sock.c:1330
FT_Face_AttachFunc attach_file
Definition: ftdrv.h:177
FT_UInt flags
Definition: freetype.h:2137
FT_Stream stream
Definition: freetype.h:2141
Definition: parse.h:23

Referenced by FT_Attach_File().

◆ FT_CeilFix()

FT_CeilFix ( FT_Fixed  a)

Definition at line 97 of file ftcalc.c.

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

◆ FT_DivFix()

FT_DivFix ( FT_Long  a,
FT_Long  b 
)

Definition at line 608 of file ftcalc.c.

610 {
611 FT_Int s = 1;
612 FT_UInt32 a, b, q;
613 FT_Long q_;
614
615
616 /* XXX: this function does not allow 64-bit arguments */
617
618 a = (FT_UInt32)a_;
619 b = (FT_UInt32)b_;
620
621 FT_MOVE_SIGN( a_, a, s );
622 FT_MOVE_SIGN( b_, b, s );
623
624 if ( b == 0 )
625 {
626 /* check for division by 0 */
627 q = 0x7FFFFFFFUL;
628 }
629 else if ( a <= 65535UL - ( b >> 17 ) )
630 {
631 /* compute result directly */
632 q = ( ( a << 16 ) + ( b >> 1 ) ) / b;
633 }
634 else
635 {
636 /* we need more bits; we have to do it by hand */
637 FT_Int64 temp, temp2;
638
639
640 temp.hi = a >> 16;
641 temp.lo = a << 16;
642 temp2.hi = 0;
643 temp2.lo = b >> 1;
644
645 FT_Add64( &temp, &temp2, &temp );
646 q = ft_div64by32( temp.hi, temp.lo, b );
647 }
648
649 q_ = (FT_Long)q;
650
651 return s < 0 ? NEG_LONG( q_ ) : q_;
652 }
static void FT_Add64(FT_Int64 *x, FT_Int64 *y, FT_Int64 *z)
Definition: ftcalc.c:351
#define FT_MOVE_SIGN(x, x_unsigned, s)
Definition: ftcalc.c:73
static FT_UInt32 ft_div64by32(FT_UInt32 hi, FT_UInt32 lo, FT_UInt32 y)
Definition: ftcalc.c:312
#define NEG_LONG(a)
Definition: ftcalc.h:426
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:53
FT_UInt32 hi
Definition: ftcalc.c:54

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_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_parse_font_matrix(), t42_parse_font_matrix(), and tt_size_reset().

◆ FT_Done_Face()

FT_Done_Face ( FT_Face  face)

Definition at line 2721 of file ftobjs.c.

2722 {
2727
2728
2729 error = FT_ERR( Invalid_Face_Handle );
2730 if ( face && face->driver )
2731 {
2732 face->internal->refcount--;
2733 if ( face->internal->refcount > 0 )
2734 error = FT_Err_Ok;
2735 else
2736 {
2737 driver = face->driver;
2738 memory = driver->root.memory;
2739
2740 /* find face in driver's list */
2741 node = FT_List_Find( &driver->faces_list, face );
2742 if ( node )
2743 {
2744 /* remove face object from the driver's list */
2745 FT_List_Remove( &driver->faces_list, node );
2746 FT_FREE( node );
2747
2748 /* now destroy the object proper */
2750 error = FT_Err_Ok;
2751 }
2752 }
2753 }
2754
2755 return error;
2756 }
return FT_Err_Ok
Definition: ftbbox.c:511
FT_List_Remove(FT_List list, FT_ListNode node)
Definition: ftutil.c:321
FT_BEGIN_HEADER FT_List_Find(FT_List list, void *data)
Definition: ftutil.c:244
#define FT_FREE(ptr)
Definition: ftmemory.h:329
static void destroy_face(FT_Memory memory, FT_Face face, FT_Driver driver)
Definition: ftobjs.c:1105
typedefFT_BEGIN_HEADER struct FT_MemoryRec_ * FT_Memory
Definition: ftsystem.h:66
static char memory[1024 *256]
Definition: process.c:116
Definition: dlist.c:348

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

◆ FT_Done_FreeType()

FT_Done_FreeType ( FT_Library  library)

Definition at line 356 of file ftinit.c.

357 {
359
360
361 if ( !library )
362 return FT_THROW( Invalid_Library_Handle );
363
365
366 /* Discard the library object */
368
369 /* discard memory manager */
371
372 return FT_Err_Ok;
373 }
FT_Library library
Definition: cffdrivr.c:654
FT_Done_Library(FT_Library library)
Definition: ftobjs.c:5220
FT_Done_Memory(FT_Memory memory)
Definition: ftsystem.c:311
FT_Memory memory
Definition: ftobjs.h:918

Referenced by ExecuteTest(), and main().

◆ FT_Face_CheckTrueTypePatents()

FT_Face_CheckTrueTypePatents ( FT_Face  face)

Definition at line 31 of file ftpatent.c.

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

◆ FT_Face_GetCharsOfVariant()

FT_Face_GetCharsOfVariant ( FT_Face  face,
FT_ULong  variantSelector 
)

Definition at line 3984 of file ftobjs.c.

3986 {
3987 FT_UInt32 *result = NULL;
3988
3989
3990 if ( face )
3991 {
3993
3994
3995 if ( charmap )
3996 {
3997 FT_CMap vcmap = FT_CMAP( charmap );
3999
4000
4001 if ( variantSelector > 0xFFFFFFFFUL )
4002 {
4003 FT_TRACE1(( "FT_Get_Char_Index: too large variantSelector" ));
4004 FT_TRACE1(( " 0x%x is truncated\n", variantSelector ));
4005 }
4006
4007 result = vcmap->clazz->variantchar_list( vcmap, memory,
4008 (FT_UInt32)variantSelector );
4009 }
4010 }
4011
4012 return result;
4013 }
#define FT_TRACE1(varformat)
Definition: ftdebug.h:158
static FT_CharMap find_variant_selector_charmap(FT_Face face)
Definition: ftobjs.c:1268
#define FT_FACE_MEMORY(x)
Definition: ftobjs.h:636
#define FT_CMAP(x)
Definition: ftobjs.h:159
GLuint64EXT * result
Definition: glext.h:11304
FT_CMap_Class clazz
Definition: ftobjs.h:154
FT_CMap_VariantCharListFunc variantchar_list
Definition: ftobjs.h:226

◆ FT_Face_GetCharVariantIndex()

FT_Face_GetCharVariantIndex ( FT_Face  face,
FT_ULong  charcode,
FT_ULong  variantSelector 
)

Definition at line 3834 of file ftobjs.c.

3837 {
3838 FT_UInt result = 0;
3839
3840
3841 if ( face &&
3842 face->charmap &&
3843 face->charmap->encoding == FT_ENCODING_UNICODE )
3844 {
3846 FT_CMap ucmap = FT_CMAP( face->charmap );
3847
3848
3849 if ( charmap )
3850 {
3851 FT_CMap vcmap = FT_CMAP( charmap );
3852
3853
3854 if ( charcode > 0xFFFFFFFFUL )
3855 {
3856 FT_TRACE1(( "FT_Face_GetCharVariantIndex:"
3857 " too large charcode" ));
3858 FT_TRACE1(( " 0x%x is truncated\n", charcode ));
3859 }
3860 if ( variantSelector > 0xFFFFFFFFUL )
3861 {
3862 FT_TRACE1(( "FT_Face_GetCharVariantIndex:"
3863 " too large variantSelector" ));
3864 FT_TRACE1(( " 0x%x is truncated\n", variantSelector ));
3865 }
3866
3867 result = vcmap->clazz->char_var_index( vcmap, ucmap,
3868 (FT_UInt32)charcode,
3869 (FT_UInt32)variantSelector );
3870 }
3871 }
3872
3873 return result;
3874 }
unsigned int FT_UInt
Definition: fttypes.h:231
FT_CMap_CharVarIndexFunc char_var_index
Definition: ftobjs.h:222

◆ FT_Face_GetCharVariantIsDefault()

FT_Face_GetCharVariantIsDefault ( FT_Face  face,
FT_ULong  charcode,
FT_ULong  variantSelector 
)

Definition at line 3880 of file ftobjs.c.

3883 {
3884 FT_Int result = -1;
3885
3886
3887 if ( face )
3888 {
3890
3891
3892 if ( charmap )
3893 {
3894 FT_CMap vcmap = FT_CMAP( charmap );
3895
3896
3897 if ( charcode > 0xFFFFFFFFUL )
3898 {
3899 FT_TRACE1(( "FT_Face_GetCharVariantIsDefault:"
3900 " too large charcode" ));
3901 FT_TRACE1(( " 0x%x is truncated\n", charcode ));
3902 }
3903 if ( variantSelector > 0xFFFFFFFFUL )
3904 {
3905 FT_TRACE1(( "FT_Face_GetCharVariantIsDefault:"
3906 " too large variantSelector" ));
3907 FT_TRACE1(( " 0x%x is truncated\n", variantSelector ));
3908 }
3909
3910 result = vcmap->clazz->char_var_default( vcmap,
3911 (FT_UInt32)charcode,
3912 (FT_UInt32)variantSelector );
3913 }
3914 }
3915
3916 return result;
3917 }
FT_CMap_CharVarIsDefaultFunc char_var_default
Definition: ftobjs.h:223

◆ FT_Face_GetVariantSelectors()

FT_Face_GetVariantSelectors ( FT_Face  face)

Definition at line 3923 of file ftobjs.c.

3924 {
3925 FT_UInt32 *result = NULL;
3926
3927
3928 if ( face )
3929 {
3931
3932
3933 if ( charmap )
3934 {
3935 FT_CMap vcmap = FT_CMAP( charmap );
3937
3938
3939 result = vcmap->clazz->variant_list( vcmap, memory );
3940 }
3941 }
3942
3943 return result;
3944 }
FT_CMap_VariantListFunc variant_list
Definition: ftobjs.h:224

◆ FT_Face_GetVariantsOfChar()

FT_Face_GetVariantsOfChar ( FT_Face  face,
FT_ULong  charcode 
)

Definition at line 3950 of file ftobjs.c.

3952 {
3953 FT_UInt32 *result = NULL;
3954
3955
3956 if ( face )
3957 {
3959
3960
3961 if ( charmap )
3962 {
3963 FT_CMap vcmap = FT_CMAP( charmap );
3965
3966
3967 if ( charcode > 0xFFFFFFFFUL )
3968 {
3969 FT_TRACE1(( "FT_Face_GetVariantsOfChar: too large charcode" ));
3970 FT_TRACE1(( " 0x%x is truncated\n", charcode ));
3971 }
3972
3973 result = vcmap->clazz->charvariant_list( vcmap, memory,
3974 (FT_UInt32)charcode );
3975 }
3976 }
3977 return result;
3978 }
FT_CMap_CharVariantListFunc charvariant_list
Definition: ftobjs.h:225

◆ FT_Face_Properties()

FT_Face_Properties ( FT_Face  face,
FT_UInt  num_properties,
FT_Parameter properties 
)

Definition at line 3755 of file ftobjs.c.

3758 {
3760
3761
3762 if ( num_properties > 0 && !properties )
3763 {
3764 error = FT_THROW( Invalid_Argument );
3765 goto Exit;
3766 }
3767
3768 for ( ; num_properties > 0; num_properties-- )
3769 {
3770 if ( properties->tag == FT_PARAM_TAG_STEM_DARKENING )
3771 {
3772 if ( properties->data )
3773 {
3774 if ( *( (FT_Bool*)properties->data ) == TRUE )
3775 face->internal->no_stem_darkening = FALSE;
3776 else
3777 face->internal->no_stem_darkening = TRUE;
3778 }
3779 else
3780 {
3781 /* use module default */
3782 face->internal->no_stem_darkening = -1;
3783 }
3784 }
3785 else if ( properties->tag == FT_PARAM_TAG_LCD_FILTER_WEIGHTS )
3786 {
3787#ifdef FT_CONFIG_OPTION_SUBPIXEL_RENDERING
3788 if ( properties->data )
3789 {
3790 ft_memcpy( face->internal->lcd_weights,
3791 properties->data,
3793 face->internal->lcd_filter_func = ft_lcd_filter_fir;
3794 }
3795#else
3796 error = FT_THROW( Unimplemented_Feature );
3797 goto Exit;
3798#endif
3799 }
3800 else if ( properties->tag == FT_PARAM_TAG_RANDOM_SEED )
3801 {
3802 if ( properties->data )
3803 {
3804 face->internal->random_seed = *( (FT_Int32*)properties->data );
3805 if ( face->internal->random_seed < 0 )
3806 face->internal->random_seed = 0;
3807 }
3808 else
3809 {
3810 /* use module default */
3811 face->internal->random_seed = -1;
3812 }
3813 }
3814 else
3815 {
3816 error = FT_THROW( Invalid_Argument );
3817 goto Exit;
3818 }
3819
3820 if ( error )
3821 break;
3822
3823 properties++;
3824 }
3825
3826 Exit:
3827 return error;
3828 }
#define TRUE
Definition: types.h:120
#define FT_LCD_FILTER_FIVE_TAPS
Definition: ftlcdfil.h:296
#define FT_PARAM_TAG_RANDOM_SEED
Definition: ftparams.h:151
#define FT_PARAM_TAG_LCD_FILTER_WEIGHTS
Definition: ftparams.h:132
#define FT_PARAM_TAG_STEM_DARKENING
Definition: ftparams.h:175
#define ft_memcpy
Definition: ftstdlib.h:82
FT_ULong tag
Definition: freetype.h:2070
FT_Pointer data
Definition: freetype.h:2071

◆ FT_Face_SetUnpatentedHinting()

FT_Face_SetUnpatentedHinting ( FT_Face  face,
FT_Bool  value 
)

Definition at line 42 of file ftpatent.c.

44 {
45 FT_UNUSED( face );
47
48 return FALSE;
49 }

◆ FT_FloorFix()

FT_FloorFix ( FT_Fixed  a)

Definition at line 106 of file ftcalc.c.

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

◆ FT_Get_Char_Index()

FT_Get_Char_Index ( FT_Face  face,
FT_ULong  charcode 
)

Definition at line 3668 of file ftobjs.c.

3670 {
3671 FT_UInt result = 0;
3672
3673
3674 if ( face && face->charmap )
3675 {
3676 FT_CMap cmap = FT_CMAP( face->charmap );
3677
3678
3679 if ( charcode > 0xFFFFFFFFUL )
3680 {
3681 FT_TRACE1(( "FT_Get_Char_Index: too large charcode" ));
3682 FT_TRACE1(( " 0x%x is truncated\n", charcode ));
3683 }
3684
3685 result = cmap->clazz->char_index( cmap, (FT_UInt32)charcode );
3686 if ( result >= (FT_UInt)face->num_glyphs )
3687 result = 0;
3688 }
3689
3690 return result;
3691 }
FT_CMap_CharIndexFunc char_index
Definition: ftobjs.h:216

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

3535 {
3536 FT_Int i;
3537
3538
3539 if ( !charmap || !charmap->face )
3540 return -1;
3541
3542 for ( i = 0; i < charmap->face->num_charmaps; i++ )
3543 if ( charmap->face->charmaps[i] == charmap )
3544 break;
3545
3546 FT_ASSERT( i < charmap->face->num_charmaps );
3547
3548 return i;
3549 }
#define FT_ASSERT(condition)
Definition: ftdebug.h:211
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:842
FT_Int num_charmaps
Definition: freetype.h:1084
FT_CharMap * charmaps
Definition: freetype.h:1085

◆ FT_Get_First_Char()

FT_Get_First_Char ( FT_Face  face,
FT_UInt agindex 
)

Definition at line 3697 of file ftobjs.c.

3699 {
3700 FT_ULong result = 0;
3701 FT_UInt gindex = 0;
3702
3703
3704 /* only do something if we have a charmap, and we have glyphs at all */
3705 if ( face && face->charmap && face->num_glyphs )
3706 {
3707 gindex = FT_Get_Char_Index( face, 0 );
3708 if ( gindex == 0 )
3709 result = FT_Get_Next_Char( face, 0, &gindex );
3710 }
3711
3712 if ( agindex )
3713 *agindex = gindex;
3714
3715 return result;
3716 }
FT_Get_Next_Char(FT_Face face, FT_ULong charcode, FT_UInt *agindex)
Definition: ftobjs.c:3722
FT_Get_Char_Index(FT_Face face, FT_ULong charcode)
Definition: ftobjs.c:3668
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 28 of file ftfstype.c.

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

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

4051 {
4053 FT_Service_GlyphDict service;
4054
4055
4056 if ( !face )
4057 return FT_THROW( Invalid_Face_Handle );
4058
4059 if ( !buffer || buffer_max == 0 )
4060 return FT_THROW( Invalid_Argument );
4061
4062 /* clean up buffer */
4063 ((FT_Byte*)buffer)[0] = '\0';
4064
4065 if ( (FT_Long)glyph_index >= face->num_glyphs )
4066 return FT_THROW( Invalid_Glyph_Index );
4067
4068 if ( !FT_HAS_GLYPH_NAMES( face ) )
4069 return FT_THROW( Invalid_Argument );
4070
4071 FT_FACE_LOOKUP_SERVICE( face, service, GLYPH_DICT );
4072 if ( service && service->get_name )
4073 error = service->get_name( face, glyph_index, buffer, buffer_max );
4074 else
4075 error = FT_THROW( Invalid_Argument );
4076
4077 return error;
4078 }
#define FT_HAS_GLYPH_NAMES(face)
Definition: freetype.h:1387
#define FT_FACE_LOOKUP_SERVICE(face, ptr, id)
Definition: ftserv.h:950
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 3347 of file ftobjs.c.

3352 {
3355
3356
3357 if ( !face )
3358 return FT_THROW( Invalid_Face_Handle );
3359
3360 if ( !akerning )
3361 return FT_THROW( Invalid_Argument );
3362
3363 driver = face->driver;
3364
3365 akerning->x = 0;
3366 akerning->y = 0;
3367
3368 if ( driver->clazz->get_kerning )
3369 {
3370 error = driver->clazz->get_kerning( face,
3371 left_glyph,
3373 akerning );
3374 if ( !error )
3375 {
3376 if ( kern_mode != FT_KERNING_UNSCALED )
3377 {
3378 akerning->x = FT_MulFix( akerning->x, face->size->metrics.x_scale );
3379 akerning->y = FT_MulFix( akerning->y, face->size->metrics.y_scale );
3380
3381 if ( kern_mode != FT_KERNING_UNFITTED )
3382 {
3383 FT_Pos orig_x = akerning->x;
3384 FT_Pos orig_y = akerning->y;
3385
3386
3387 /* we scale down kerning values for small ppem values */
3388 /* to avoid that rounding makes them too big. */
3389 /* `25' has been determined heuristically. */
3390 if ( face->size->metrics.x_ppem < 25 )
3391 akerning->x = FT_MulDiv( orig_x,
3392 face->size->metrics.x_ppem, 25 );
3393 if ( face->size->metrics.y_ppem < 25 )
3394 akerning->y = FT_MulDiv( orig_y,
3395 face->size->metrics.y_ppem, 25 );
3396
3397 akerning->x = FT_PIX_ROUND( akerning->x );
3398 akerning->y = FT_PIX_ROUND( akerning->y );
3399
3400#ifdef FT_DEBUG_LEVEL_TRACE
3401 {
3402 FT_Pos orig_x_rounded = FT_PIX_ROUND( orig_x );
3403 FT_Pos orig_y_rounded = FT_PIX_ROUND( orig_y );
3404
3405
3406 if ( akerning->x != orig_x_rounded ||
3407 akerning->y != orig_y_rounded )
3408 FT_TRACE5(( "FT_Get_Kerning: horizontal kerning"
3409 " (%d, %d) scaled down to (%d, %d) pixels\n",
3410 orig_x_rounded / 64, orig_y_rounded / 64,
3411 akerning->x / 64, akerning->y / 64 ));
3412 }
3413#endif
3414 }
3415 }
3416 }
3417 }
3418
3419 return error;
3420 }
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_TRACE5(varformat)
Definition: ftdebug.h:162
FT_BEGIN_HEADER typedef signed long FT_Pos
Definition: ftimage.h:58
#define FT_PIX_ROUND(x)
Definition: ftobjs.h:93
FT_Pos x
Definition: ftimage.h:76
FT_Pos y
Definition: ftimage.h:77
FT_UInt left_glyph
Definition: ttdriver.c:201
FT_UInt FT_UInt right_glyph
Definition: ttdriver.c:202

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

◆ FT_Get_Name_Index()

FT_Get_Name_Index ( FT_Face  face,
FT_String glyph_name 
)

Definition at line 4019 of file ftobjs.c.

4021 {
4022 FT_UInt result = 0;
4023
4024
4025 if ( face &&
4027 glyph_name )
4028 {
4029 FT_Service_GlyphDict service;
4030
4031
4033 service,
4034 GLYPH_DICT );
4035
4036 if ( service && service->name_index )
4037 result = service->name_index( face, glyph_name );
4038 }
4039
4040 return result;
4041 }

◆ FT_Get_Next_Char()

FT_Get_Next_Char ( FT_Face  face,
FT_ULong  char_code,
FT_UInt agindex 
)

Definition at line 3722 of file ftobjs.c.

3725 {
3726 FT_ULong result = 0;
3727 FT_UInt gindex = 0;
3728
3729
3730 if ( face && face->charmap && face->num_glyphs )
3731 {
3732 FT_UInt32 code = (FT_UInt32)charcode;
3733 FT_CMap cmap = FT_CMAP( face->charmap );
3734
3735
3736 do
3737 {
3738 gindex = cmap->clazz->char_next( cmap, &code );
3739
3740 } while ( gindex >= (FT_UInt)face->num_glyphs );
3741
3742 result = ( gindex == 0 ) ? 0 : code;
3743 }
3744
3745 if ( agindex )
3746 *agindex = gindex;
3747
3748 return result;
3749 }
FT_CMap_CharNextFunc char_next
Definition: ftobjs.h:217
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 4084 of file ftobjs.c.

4085 {
4086 const char* result = NULL;
4087
4088
4089 if ( !face )
4090 goto Exit;
4091
4092 if ( !result )
4093 {
4094 FT_Service_PsFontName service;
4095
4096
4098 service,
4099 POSTSCRIPT_FONT_NAME );
4100
4101 if ( service && service->get_ps_font_name )
4102 result = service->get_ps_font_name( face );
4103 }
4104
4105 Exit:
4106 return result;
4107 }

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

5380 {
5381 FT_Error error = FT_ERR( Invalid_Argument );
5382
5383
5384 if ( glyph &&
5385 glyph->subglyphs &&
5386 glyph->format == FT_GLYPH_FORMAT_COMPOSITE &&
5387 sub_index < glyph->num_subglyphs )
5388 {
5389 FT_SubGlyph subg = glyph->subglyphs + sub_index;
5390
5391
5392 *p_index = subg->index;
5393 *p_flags = subg->flags;
5394 *p_arg1 = subg->arg1;
5395 *p_arg2 = subg->arg2;
5396 *p_transform = subg->transform;
5397
5398 error = FT_Err_Ok;
5399 }
5400
5401 return error;
5402 }
FT_SubGlyph subglyphs
Definition: freetype.h:1930
FT_Glyph_Format format
Definition: freetype.h:1921
FT_Int arg2
Definition: ftgloadr.h:44
FT_UShort flags
Definition: ftgloadr.h:42
FT_Matrix transform
Definition: ftgloadr.h:45
FT_Int index
Definition: ftgloadr.h:41
FT_Int arg1
Definition: ftgloadr.h:43

◆ FT_Get_Track_Kerning()

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

Definition at line 3426 of file ftobjs.c.

3430 {
3431 FT_Service_Kerning service;
3433
3434
3435 if ( !face )
3436 return FT_THROW( Invalid_Face_Handle );
3437
3438 if ( !akerning )
3439 return FT_THROW( Invalid_Argument );
3440
3441 FT_FACE_FIND_SERVICE( face, service, KERNING );
3442 if ( !service )
3443 return FT_THROW( Unimplemented_Feature );
3444
3445 error = service->get_track( face,
3446 point_size,
3447 degree,
3448 akerning );
3449
3450 return error;
3451 }

◆ FT_Init_FreeType()

FT_Init_FreeType ( FT_Library alibrary)

Definition at line 320 of file ftinit.c.

321 {
324
325
326 /* check of `alibrary' delayed to `FT_New_Library' */
327
328 /* First of all, allocate a new system object -- this function is part */
329 /* of the system-specific component, i.e. `ftsystem.c'. */
330
332 if ( !memory )
333 {
334 FT_ERROR(( "FT_Init_FreeType: cannot find memory manager\n" ));
335 return FT_THROW( Unimplemented_Feature );
336 }
337
338 /* build a library out of it, then fill it with the set of */
339 /* default drivers. */
340
341 error = FT_New_Library( memory, alibrary );
342 if ( error )
344 else
345 FT_Add_Default_Modules( *alibrary );
346
347 FT_Set_Default_Properties( *alibrary );
348
349 return error;
350 }
#define FT_ERROR(varformat)
Definition: ftdebug.h:181
FT_Set_Default_Properties(FT_Library library)
Definition: ftinit.c:309
FT_Add_Default_Modules(FT_Library library)
Definition: ftinit.c:198
FT_New_Library(FT_Memory memory, FT_Library *alibrary)
Definition: ftobjs.c:5138
FT_New_Memory(void)
Definition: ftsystem.c:287

Referenced by ExecuteTest(), FtfdEnableDriver(), InitFontSupport(), and main().

◆ FT_Library_Version()

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

Definition at line 5189 of file ftobjs.c.

5193 {
5194 FT_Int major = 0;
5195 FT_Int minor = 0;
5196 FT_Int patch = 0;
5197
5198
5199 if ( library )
5200 {
5203 patch = library->version_patch;
5204 }
5205
5206 if ( amajor )
5207 *amajor = major;
5208
5209 if ( aminor )
5210 *aminor = minor;
5211
5212 if ( apatch )
5213 *apatch = patch;
5214 }
#define minor(rdev)
Definition: propsheet.cpp:929
#define major(rdev)
Definition: propsheet.cpp:928
FT_Int version_minor
Definition: ftobjs.h:921
FT_Int version_major
Definition: ftobjs.h:920
FT_Int version_patch
Definition: ftobjs.h:922

◆ FT_Load_Char()

FT_Load_Char ( FT_Face  face,
FT_ULong  char_code,
FT_Int32  load_flags 
)

Definition at line 1037 of file ftobjs.c.

1040 {
1041 FT_UInt glyph_index;
1042
1043
1044 if ( !face )
1045 return FT_THROW( Invalid_Face_Handle );
1046
1047 glyph_index = (FT_UInt)char_code;
1048 if ( face->charmap )
1049 glyph_index = FT_Get_Char_Index( face, char_code );
1050
1051 return FT_Load_Glyph( face, glyph_index, load_flags );
1052 }
FT_Load_Glyph(FT_Face face, FT_UInt glyph_index, FT_Int32 load_flags)
Definition: ftobjs.c:760

◆ FT_Load_Glyph()

FT_Load_Glyph ( FT_Face  face,
FT_UInt  glyph_index,
FT_Int32  load_flags 
)

Definition at line 760 of file ftobjs.c.

763 {
768 FT_Bool autohint = FALSE;
769 FT_Module hinter;
770 TT_Face ttface = (TT_Face)face;
771
772
773 if ( !face || !face->size || !face->glyph )
774 return FT_THROW( Invalid_Face_Handle );
775
776 /* The validity test for `glyph_index' is performed by the */
777 /* font drivers. */
778
779 slot = face->glyph;
781
782 driver = face->driver;
783 library = driver->root.library;
784 hinter = library->auto_hinter;
785
786 /* resolve load flags dependencies */
787
788 if ( load_flags & FT_LOAD_NO_RECURSE )
789 load_flags |= FT_LOAD_NO_SCALE |
791
792 if ( load_flags & FT_LOAD_NO_SCALE )
793 {
794 load_flags |= FT_LOAD_NO_HINTING |
796
797 load_flags &= ~FT_LOAD_RENDER;
798 }
799
800 if ( load_flags & FT_LOAD_BITMAP_METRICS_ONLY )
801 load_flags &= ~FT_LOAD_RENDER;
802
803 /*
804 * Determine whether we need to auto-hint or not.
805 * The general rules are:
806 *
807 * - Do only auto-hinting if we have
808 *
809 * - a hinter module,
810 * - a scalable font format dealing with outlines,
811 * - not a tricky font, and
812 * - no transforms except simple slants and/or rotations by
813 * integer multiples of 90 degrees.
814 *
815 * - Then, auto-hint if FT_LOAD_FORCE_AUTOHINT is set or if we don't
816 * have a native font hinter.
817 *
818 * - Otherwise, auto-hint for LIGHT hinting mode or if there isn't
819 * any hinting bytecode in the TrueType/OpenType font.
820 *
821 * - Exception: The font is `tricky' and requires the native hinter to
822 * load properly.
823 */
824
825 if ( hinter &&
826 !( load_flags & FT_LOAD_NO_HINTING ) &&
827 !( load_flags & FT_LOAD_NO_AUTOHINT ) &&
830 !FT_IS_TRICKY( face ) &&
831 ( ( load_flags & FT_LOAD_IGNORE_TRANSFORM ) ||
832 ( face->internal->transform_matrix.yx == 0 &&
833 face->internal->transform_matrix.xx != 0 ) ||
834 ( face->internal->transform_matrix.xx == 0 &&
835 face->internal->transform_matrix.yx != 0 ) ) )
836 {
837 if ( ( load_flags & FT_LOAD_FORCE_AUTOHINT ) ||
839 autohint = TRUE;
840 else
841 {
843 FT_Bool is_light_type1;
844
845
846 /* only the new Adobe engine (for both CFF and Type 1) is `light'; */
847 /* we use `strstr' to catch both `Type 1' and `CID Type 1' */
848 is_light_type1 =
849 ft_strstr( FT_Get_Font_Format( face ), "Type 1" ) != NULL &&
850 ((PS_Driver)driver)->hinting_engine == FT_HINTING_ADOBE;
851
852 /* the check for `num_locations' assures that we actually */
853 /* test for instructions in a TTF and not in a CFF-based OTF */
854 /* */
855 /* since `maxSizeOfInstructions' might be unreliable, we */
856 /* check the size of the `fpgm' and `prep' tables, too -- */
857 /* the assumption is that there don't exist real TTFs where */
858 /* both `fpgm' and `prep' tables are missing */
859 if ( ( mode == FT_RENDER_MODE_LIGHT &&
861 !is_light_type1 ) ) ||
862 ( FT_IS_SFNT( face ) &&
863 ttface->num_locations &&
864 ttface->max_profile.maxSizeOfInstructions == 0 &&
865 ttface->font_program_size == 0 &&
866 ttface->cvt_program_size == 0 ) )
867 autohint = TRUE;
868 }
869 }
870
871 if ( autohint )
872 {
874
875
876 /* try to load embedded bitmaps first if available */
877 /* */
878 /* XXX: This is really a temporary hack that should disappear */
879 /* promptly with FreeType 2.1! */
880 /* */
881 if ( FT_HAS_FIXED_SIZES( face ) &&
882 ( load_flags & FT_LOAD_NO_BITMAP ) == 0 )
883 {
884 error = driver->clazz->load_glyph( slot, face->size,
885 glyph_index,
886 load_flags | FT_LOAD_SBITS_ONLY );
887
888 if ( !error && slot->format == FT_GLYPH_FORMAT_BITMAP )
889 goto Load_Ok;
890 }
891
892 {
893 FT_Face_Internal internal = face->internal;
894 FT_Int transform_flags = internal->transform_flags;
895
896
897 /* since the auto-hinter calls FT_Load_Glyph by itself, */
898 /* make sure that glyphs aren't transformed */
899 internal->transform_flags = 0;
900
901 /* load auto-hinted outline */
903
904 error = hinting->load_glyph( (FT_AutoHinter)hinter,
905 slot, face->size,
906 glyph_index, load_flags );
907
908 internal->transform_flags = transform_flags;
909 }
910 }
911 else
912 {
913 error = driver->clazz->load_glyph( slot,
914 face->size,
915 glyph_index,
916 load_flags );
917 if ( error )
918 goto Exit;
919
920 if ( slot->format == FT_GLYPH_FORMAT_OUTLINE )
921 {
922 /* check that the loaded outline is correct */
923 error = FT_Outline_Check( &slot->outline );
924 if ( error )
925 goto Exit;
926
927#ifdef GRID_FIT_METRICS
928 if ( !( load_flags & FT_LOAD_NO_HINTING ) )
930 FT_BOOL( load_flags & FT_LOAD_VERTICAL_LAYOUT ) );
931#endif
932 }
933 }
934
935 Load_Ok:
936 /* compute the advance */
937 if ( load_flags & FT_LOAD_VERTICAL_LAYOUT )
938 {
939 slot->advance.x = 0;
940 slot->advance.y = slot->metrics.vertAdvance;
941 }
942 else
943 {
944 slot->advance.x = slot->metrics.horiAdvance;
945 slot->advance.y = 0;
946 }
947
948 /* compute the linear advance in 16.16 pixels */
949 if ( ( load_flags & FT_LOAD_LINEAR_DESIGN ) == 0 &&
951 {
952 FT_Size_Metrics* metrics = &face->size->metrics;
953
954
955 /* it's tricky! */
956 slot->linearHoriAdvance = FT_MulDiv( slot->linearHoriAdvance,
957 metrics->x_scale, 64 );
958
959 slot->linearVertAdvance = FT_MulDiv( slot->linearVertAdvance,
960 metrics->y_scale, 64 );
961 }
962
963 if ( ( load_flags & FT_LOAD_IGNORE_TRANSFORM ) == 0 )
964 {
965 FT_Face_Internal internal = face->internal;
966
967
968 /* now, transform the glyph image if needed */
969 if ( internal->transform_flags )
970 {
971 /* get renderer */
973
974
975 if ( renderer )
976 error = renderer->clazz->transform_glyph(
977 renderer, slot,
978 &internal->transform_matrix,
979 &internal->transform_delta );
980 else if ( slot->format == FT_GLYPH_FORMAT_OUTLINE )
981 {
982 /* apply `standard' transformation if no renderer is available */
983 if ( internal->transform_flags & 1 )
984 FT_Outline_Transform( &slot->outline,
985 &internal->transform_matrix );
986
987 if ( internal->transform_flags & 2 )
988 FT_Outline_Translate( &slot->outline,
989 internal->transform_delta.x,
990 internal->transform_delta.y );
991 }
992
993 /* transform advance */
994 FT_Vector_Transform( &slot->advance, &internal->transform_matrix );
995 }
996 }
997
998 /* do we need to render the image or preset the bitmap now? */
999 if ( !error &&
1000 ( load_flags & FT_LOAD_NO_SCALE ) == 0 &&
1001 slot->format != FT_GLYPH_FORMAT_BITMAP &&
1002 slot->format != FT_GLYPH_FORMAT_COMPOSITE )
1003 {
1004 FT_Render_Mode mode = FT_LOAD_TARGET_MODE( load_flags );
1005
1006
1007 if ( mode == FT_RENDER_MODE_NORMAL &&
1008 load_flags & FT_LOAD_MONOCHROME )
1010
1011 if ( load_flags & FT_LOAD_RENDER )
1013 else
1015 }
1016
1017 FT_TRACE5(( "FT_Load_Glyph: index %d, flags %x\n",
1018 glyph_index, load_flags ));
1019 FT_TRACE5(( " x advance: %f\n", slot->advance.x / 64.0 ));
1020 FT_TRACE5(( " y advance: %f\n", slot->advance.y / 64.0 ));
1021 FT_TRACE5(( " linear x advance: %f\n",
1022 slot->linearHoriAdvance / 65536.0 ));
1023 FT_TRACE5(( " linear y advance: %f\n",
1024 slot->linearVertAdvance / 65536.0 ));
1025 FT_TRACE5(( " bitmap %dx%d, mode %d\n",
1026 slot->bitmap.width, slot->bitmap.rows,
1027 slot->bitmap.pixel_mode ));
1028
1029 Exit:
1030 return error;
1031 }
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:80
#define FT_LOAD_RENDER
Definition: freetype.h:3011
#define FT_LOAD_VERTICAL_LAYOUT
Definition: freetype.h:3013
#define FT_LOAD_TARGET_MODE(x)
Definition: freetype.h:3137
#define FT_LOAD_SBITS_ONLY
Definition: freetype.h:3032
#define FT_LOAD_NO_BITMAP
Definition: freetype.h:3012
FT_Vector_Transform(FT_Vector *vec, const FT_Matrix *matrix)
Definition: ftoutln.c:688
#define FT_IS_SFNT(face)
Definition: freetype.h:1331
#define FT_LOAD_IGNORE_TRANSFORM
Definition: freetype.h:3019
#define FT_LOAD_NO_SCALE
Definition: freetype.h:3009
#define FT_LOAD_NO_RECURSE
Definition: freetype.h:3018
#define FT_LOAD_BITMAP_METRICS_ONLY
Definition: freetype.h:3026
#define FT_LOAD_NO_HINTING
Definition: freetype.h:3010
#define FT_HAS_FIXED_SIZES(face)
Definition: freetype.h:1361
#define FT_LOAD_FORCE_AUTOHINT
Definition: freetype.h:3014
#define FT_IS_SCALABLE(face)
Definition: freetype.h:1312
#define FT_LOAD_MONOCHROME
Definition: freetype.h:3020
#define FT_LOAD_NO_AUTOHINT
Definition: freetype.h:3022
#define FT_IS_TRICKY(face)
Definition: freetype.h:1474
#define FT_LOAD_LINEAR_DESIGN
Definition: freetype.h:3021
#define FT_HINTING_ADOBE
Definition: ftdriver.h:346
FT_BEGIN_HEADER FT_Get_Font_Format(FT_Face face)
Definition: ftfntfmt.c:28
static void ft_glyphslot_clear(FT_GlyphSlot slot)
Definition: ftobjs.c:496
static FT_Renderer ft_lookup_glyph_renderer(FT_GlyphSlot slot)
Definition: ftobjs.c:4306
ft_glyphslot_preset_bitmap(FT_GlyphSlot slot, FT_Render_Mode mode, const FT_Vector *origin)
Definition: ftobjs.c:334
static void ft_glyphslot_grid_fit_metrics(FT_GlyphSlot slot, FT_Bool vertical)
Definition: ftobjs.c:707
FT_Render_Glyph(FT_GlyphSlot slot, FT_Render_Mode render_mode)
Definition: ftobjs.c:4650
#define FT_DRIVER_HAS_HINTER(x)
Definition: ftobjs.h:568
#define FT_DRIVER_IS_SCALABLE(x)
Definition: ftobjs.h:562
#define FT_DRIVER_USES_OUTLINES(x)
Definition: ftobjs.h:565
#define FT_DRIVER_HINTS_LIGHTLY(x)
Definition: ftobjs.h:571
FT_Outline_Check(FT_Outline *outline)
Definition: ftoutln.c:357
FT_Outline_Translate(const FT_Outline *outline, FT_Pos xOffset, FT_Pos yOffset)
Definition: ftoutln.c:528
FT_Outline_Transform(const FT_Outline *outline, const FT_Matrix *matrix)
Definition: ftoutln.c:711
smooth FT_Module_Constructor FT_Module_Destructor FT_Module_Requester FT_GLYPH_FORMAT_OUTLINE
Definition: ftsmooth.c:426
#define ft_strstr
Definition: ftstdlib.h:92
#define FT_BOOL(x)
Definition: fttypes.h:578
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:195
FT_Module auto_hinter
Definition: ftobjs.h:929
FT_Module_Class * clazz
Definition: ftobjs.h:535
const void * module_interface
Definition: ftmodapi.h:225
FT_Renderer_Class * clazz
Definition: ftobjs.h:774
FT_Renderer_TransformFunc transform_glyph
Definition: ftrender.h:152
TT_MaxProfile max_profile
Definition: tttypes.h:1404
FT_ULong num_locations
Definition: tttypes.h:1523
FT_ULong font_program_size
Definition: tttypes.h:1475
FT_ULong cvt_program_size
Definition: tttypes.h:1479
FT_UShort maxSizeOfInstructions
Definition: tttables.h:581
Definition: vfat.h:185
struct TT_FaceRec_ * TT_Face
Definition: tttypes.h:973
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(), ftc_basic_family_load_bitmap(), ftc_basic_family_load_glyph(), ftGdiGetGlyphOutline(), gxv_ctlPoint_validate(), gxv_prop_zero_advance_validate(), IntGetRealGlyph(), NtGdiGetCharABCWidthsW(), NtGdiGetCharWidthW(), and TestFace().

◆ FT_MulDiv()

FT_MulDiv ( FT_Long  a,
FT_Long  b,
FT_Long  c 
)

Definition at line 416 of file ftcalc.c.

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

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

1410 {
1412
1413
1414 /* test for valid `library' and `aface' delayed to `FT_Open_Face' */
1415 if ( !pathname )
1416 return FT_THROW( Invalid_Argument );
1417
1418 args.flags = FT_OPEN_PATHNAME;
1419 args.pathname = (char*)pathname;
1420 args.stream = NULL;
1421
1422 return ft_open_face_internal( library, &args, face_index, aface, 1 );
1423 }
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:2327
char pathname[512]
Definition: util.h:13
#define args
Definition: format.c:66
Definition: match.c:390

Referenced by ExecuteTest().

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

1436 {
1438
1439
1440 /* test for valid `library' and `face' delayed to `FT_Open_Face' */
1441 if ( !file_base )
1442 return FT_THROW( Invalid_Argument );
1443
1444 args.flags = FT_OPEN_MEMORY;
1445 args.memory_base = file_base;
1446 args.memory_size = file_size;
1447 args.stream = NULL;
1448
1449 return ft_open_face_internal( library, &args, face_index, aface, 1 );
1450 }
#define FT_OPEN_MEMORY
Definition: freetype.h:2034
static unsigned int file_size
Definition: regtests2xml.c:47

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

◆ FT_Open_Face()

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

Definition at line 2317 of file ftobjs.c.

2321 {
2322 return ft_open_face_internal( library, args, face_index, aface, 1 );
2323 }

Referenced by T42_Face_Init().

◆ FT_Reference_Face()

FT_Reference_Face ( FT_Face  face)

Definition at line 2707 of file ftobjs.c.

2708 {
2709 if ( !face )
2710 return FT_THROW( Invalid_Face_Handle );
2711
2712 face->internal->refcount++;
2713
2714 return FT_Err_Ok;
2715 }

◆ FT_Render_Glyph()

FT_Render_Glyph ( FT_GlyphSlot  slot,
FT_Render_Mode  render_mode 
)

Definition at line 4650 of file ftobjs.c.

4652 {
4654
4655
4656 if ( !slot || !slot->face )
4657 return FT_THROW( Invalid_Argument );
4658
4659 library = FT_FACE_LIBRARY( slot->face );
4660
4661 return FT_Render_Glyph_Internal( library, slot, render_mode );
4662 }
FT_Render_Glyph_Internal(FT_Library library, FT_GlyphSlot slot, FT_Render_Mode render_mode)
Definition: ftobjs.c:4485
#define FT_FACE_LIBRARY(x)
Definition: ftobjs.h:635

Referenced by FT_Load_Glyph(), and TestFace().

◆ FT_Request_Size()

FT_Request_Size ( FT_Face  face,
FT_Size_Request  req 
)

Definition at line 3192 of file ftobjs.c.

3194 {
3196 FT_Driver_Class clazz;
3197 FT_ULong strike_index;
3198
3199
3200 if ( !face )
3201 return FT_THROW( Invalid_Face_Handle );
3202
3203 if ( !req || req->width < 0 || req->height < 0 ||
3205 return FT_THROW( Invalid_Argument );
3206
3207 /* signal the auto-hinter to recompute its size metrics */
3208 /* (if requested) */
3209 face->size->internal->autohint_metrics.x_scale = 0;
3210
3211 clazz = face->driver->clazz;
3212
3213 if ( clazz->request_size )
3214 {
3215 error = clazz->request_size( face->size, req );
3216
3217 FT_TRACE5(( "FT_Request_Size (%s driver):\n",
3218 face->driver->root.clazz->module_name ));
3219 }
3220 else if ( !FT_IS_SCALABLE( face ) && FT_HAS_FIXED_SIZES( face ) )
3221 {
3222 /*
3223 * The reason that a driver doesn't have `request_size' defined is
3224 * either that the scaling here suffices or that the supported formats
3225 * are bitmap-only and size matching is not implemented.
3226 *
3227 * In the latter case, a simple size matching is done.
3228 */
3229 error = FT_Match_Size( face, req, 0, &strike_index );
3230 if ( error )
3231 return error;
3232
3233 return FT_Select_Size( face, (FT_Int)strike_index );
3234 }
3235 else
3236 {
3237 FT_Request_Metrics( face, req );
3238
3239 FT_TRACE5(( "FT_Request_Size:\n" ));
3240 }
3241
3242#ifdef FT_DEBUG_LEVEL_TRACE
3243 {
3244 FT_Size_Metrics* metrics = &face->size->metrics;
3245
3246
3247 FT_TRACE5(( " x scale: %d (%f)\n",
3248 metrics->x_scale, metrics->x_scale / 65536.0 ));
3249 FT_TRACE5(( " y scale: %d (%f)\n",
3250 metrics->y_scale, metrics->y_scale / 65536.0 ));
3251 FT_TRACE5(( " ascender: %f\n", metrics->ascender / 64.0 ));
3252 FT_TRACE5(( " descender: %f\n", metrics->descender / 64.0 ));
3253 FT_TRACE5(( " height: %f\n", metrics->height / 64.0 ));
3254 FT_TRACE5(( " max advance: %f\n", metrics->max_advance / 64.0 ));
3255 FT_TRACE5(( " x ppem: %d\n", metrics->x_ppem ));
3256 FT_TRACE5(( " y ppem: %d\n", metrics->y_ppem ));
3257 }
3258#endif
3259
3260 return error;
3261 }
FT_Match_Size(FT_Face face, FT_Size_Request req, FT_Bool ignore_width, FT_ULong *size_index)
Definition: ftobjs.c:2875
FT_Select_Size(FT_Face face, FT_Int strike_index)
Definition: ftobjs.c:3138
FT_Request_Metrics(FT_Face face, FT_Size_Request req)
Definition: ftobjs.c:3028
FT_Size_RequestFunc request_size
Definition: ftdrv.h:181
FT_Size_Request_Type type
Definition: freetype.h:2619

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 88 of file ftcalc.c.

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

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

3459 {
3460 FT_CharMap* cur;
3462
3463
3464 if ( !face )
3465 return FT_THROW( Invalid_Face_Handle );
3466
3467 if ( encoding == FT_ENCODING_NONE )
3468 return FT_THROW( Invalid_Argument );
3469
3470 /* FT_ENCODING_UNICODE is special. We try to find the `best' Unicode */
3471 /* charmap available, i.e., one with UCS-4 characters, if possible. */
3472 /* */
3473 /* This is done by find_unicode_charmap() above, to share code. */
3474 if ( encoding == FT_ENCODING_UNICODE )
3475 return find_unicode_charmap( face );
3476
3477 cur = face->charmaps;
3478 if ( !cur )
3479 return FT_THROW( Invalid_CharMap_Handle );
3480
3481 limit = cur + face->num_charmaps;
3482
3483 for ( ; cur < limit; cur++ )
3484 {
3485 if ( cur[0]->encoding == encoding )
3486 {
3487 face->charmap = cur[0];
3488 return 0;
3489 }
3490 }
3491
3492 return FT_THROW( Invalid_Argument );
3493 }
static FT_Error find_unicode_charmap(FT_Face face)
Definition: ftobjs.c:1180
FxCollectionEntry * cur
GLint limit
Definition: glext.h:10326
static char * encoding
Definition: xmllint.c:155

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

3140 {
3142 FT_Driver_Class clazz;
3143
3144
3145 if ( !face || !FT_HAS_FIXED_SIZES( face ) )
3146 return FT_THROW( Invalid_Face_Handle );
3147
3148 if ( strike_index < 0 || strike_index >= face->num_fixed_sizes )
3149 return FT_THROW( Invalid_Argument );
3150
3151 clazz = face->driver->clazz;
3152
3153 if ( clazz->select_size )
3154 {
3155 error = clazz->select_size( face->size, (FT_ULong)strike_index );
3156
3157 FT_TRACE5(( "FT_Select_Size (%s driver):\n",
3158 face->driver->root.clazz->module_name ));
3159 }
3160 else
3161 {
3162 FT_Select_Metrics( face, (FT_ULong)strike_index );
3163
3164 FT_TRACE5(( "FT_Select_Size:\n" ));
3165 }
3166
3167#ifdef FT_DEBUG_LEVEL_TRACE
3168 {
3169 FT_Size_Metrics* metrics = &face->size->metrics;
3170
3171
3172 FT_TRACE5(( " x scale: %d (%f)\n",
3173 metrics->x_scale, metrics->x_scale / 65536.0 ));
3174 FT_TRACE5(( " y scale: %d (%f)\n",
3175 metrics->y_scale, metrics->y_scale / 65536.0 ));
3176 FT_TRACE5(( " ascender: %f\n", metrics->ascender / 64.0 ));
3177 FT_TRACE5(( " descender: %f\n", metrics->descender / 64.0 ));
3178 FT_TRACE5(( " height: %f\n", metrics->height / 64.0 ));
3179 FT_TRACE5(( " max advance: %f\n", metrics->max_advance / 64.0 ));
3180 FT_TRACE5(( " x ppem: %d\n", metrics->x_ppem ));
3181 FT_TRACE5(( " y ppem: %d\n", metrics->y_ppem ));
3182 }
3183#endif
3184
3185 return error;
3186 }
FT_Select_Metrics(FT_Face face, FT_ULong strike_index)
Definition: ftobjs.c:2993
FT_Size_SelectFunc select_size
Definition: ftdrv.h:182

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

3272 {
3274
3275
3276 /* check of `face' delayed to `FT_Request_Size' */
3277
3278 if ( !char_width )
3279 char_width = char_height;
3280 else if ( !char_height )
3281 char_height = char_width;
3282
3283 if ( !horz_resolution )
3284 horz_resolution = vert_resolution;
3285 else if ( !vert_resolution )
3286 vert_resolution = horz_resolution;
3287
3288 if ( char_width < 1 * 64 )
3289 char_width = 1 * 64;
3290 if ( char_height < 1 * 64 )
3291 char_height = 1 * 64;
3292
3293 if ( !horz_resolution )
3294 horz_resolution = vert_resolution = 72;
3295
3297 req.width = char_width;
3298 req.height = char_height;
3299 req.horiResolution = horz_resolution;
3300 req.vertResolution = vert_resolution;
3301
3302 return FT_Request_Size( face, &req );
3303 }
FT_Request_Size(FT_Face face, FT_Size_Request req)
Definition: ftobjs.c:3192
FT_UInt horiResolution
Definition: freetype.h:2622
FT_UInt vertResolution
Definition: freetype.h:2623

Referenced by ftc_scaler_lookup_size(), and TestFace().

◆ FT_Set_Charmap()

FT_Set_Charmap ( FT_Face  face,
FT_CharMap  charmap 
)

Definition at line 3499 of file ftobjs.c.

3501 {
3502 FT_CharMap* cur;
3504
3505
3506 if ( !face )
3507 return FT_THROW( Invalid_Face_Handle );
3508
3509 cur = face->charmaps;
3510 if ( !cur || !charmap )
3511 return FT_THROW( Invalid_CharMap_Handle );
3512
3513 if ( FT_Get_CMap_Format( charmap ) == 14 )
3514 return FT_THROW( Invalid_Argument );
3515
3516 limit = cur + face->num_charmaps;
3517
3518 for ( ; cur < limit; cur++ )
3519 {
3520 if ( cur[0] == charmap )
3521 {
3522 face->charmap = cur[0];
3523 return FT_Err_Ok;
3524 }
3525 }
3526
3527 return FT_THROW( Invalid_Argument );
3528 }
FT_Get_CMap_Format(FT_CharMap charmap)
Definition: ftobjs.c:4206

Referenced by af_face_globals_compute_style_coverage(), af_latin_metrics_init(), FTC_CMapCache_Lookup(), NtGdiGetCharABCWidthsW(), NtGdiGetCharWidthW(), 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 3309 of file ftobjs.c.

3312 {
3314
3315
3316 /* check of `face' delayed to `FT_Request_Size' */
3317
3318 if ( pixel_width == 0 )
3319 pixel_width = pixel_height;
3320 else if ( pixel_height == 0 )
3321 pixel_height = pixel_width;
3322
3323 if ( pixel_width < 1 )
3324 pixel_width = 1;
3325 if ( pixel_height < 1 )
3326 pixel_height = 1;
3327
3328 /* use `>=' to avoid potential compiler warning on 16bit platforms */
3329 if ( pixel_width >= 0xFFFFU )
3330 pixel_width = 0xFFFFU;
3331 if ( pixel_height >= 0xFFFFU )
3332 pixel_height = 0xFFFFU;
3333
3335 req.width = (FT_Long)( pixel_width << 6 );
3336 req.height = (FT_Long)( pixel_height << 6 );
3337 req.horiResolution = 0;
3338 req.vertResolution = 0;
3339
3340 return FT_Request_Size( face, &req );
3341 }

Referenced by ftc_scaler_lookup_size().

◆ FT_Set_Transform()

FT_Set_Transform ( FT_Face  face,
FT_Matrix matrix,
FT_Vector delta 
)

Definition at line 653 of file ftobjs.c.

656 {
658
659
660 if ( !face )
661 return;
662
663 internal = face->internal;
664
665 internal->transform_flags = 0;
666
667 if ( !matrix )
668 {
669 internal->transform_matrix.xx = 0x10000L;
670 internal->transform_matrix.xy = 0;
671 internal->transform_matrix.yx = 0;
672 internal->transform_matrix.yy = 0x10000L;
673
674 matrix = &internal->transform_matrix;
675 }
676 else
677 internal->transform_matrix = *matrix;
678
679 /* set transform_flags bit flag 0 if `matrix' isn't the identity */
680 if ( ( matrix->xy | matrix->yx ) ||
681 matrix->xx != 0x10000L ||
682 matrix->yy != 0x10000L )
683 internal->transform_flags |= 1;
684
685 if ( !delta )
686 {
687 internal->transform_delta.x = 0;
688 internal->transform_delta.y = 0;
689
690 delta = &internal->transform_delta;
691 }
692 else
693 internal->transform_delta = *delta;
694
695 /* set transform_flags bit flag 1 if `delta' isn't the null vector */
696 if ( delta->x | delta->y )
697 internal->transform_flags |= 2;
698 }
GLuint GLenum matrix
Definition: glext.h:9407

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

◆ FT_Vector_Transform()

FT_Vector_Transform ( FT_Vector vec,
const FT_Matrix matrix 
)

Definition at line 688 of file ftoutln.c.

690 {
691 FT_Pos xz, yz;
692
693
694 if ( !vector || !matrix )
695 return;
696
697 xz = FT_MulFix( vector->x, matrix->xx ) +
698 FT_MulFix( vector->y, matrix->xy );
699
700 yz = FT_MulFix( vector->x, matrix->yx ) +
701 FT_MulFix( vector->y, matrix->yy );
702
703 vector->x = xz;
704 vector->y = yz;
705 }

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