ReactOS 0.4.16-dev-2332-g4cba65d
ftadvanc.h File Reference
Include dependency graph for ftadvanc.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define FT_ADVANCE_FLAG_FAST_ONLY   0x20000000L
 

Functions

 FT_Get_Advance (FT_Face face, FT_UInt gindex, FT_Int32 load_flags, FT_Fixed *padvance)
 
 FT_Get_Advances (FT_Face face, FT_UInt start, FT_UInt count, FT_Int32 load_flags, FT_Fixed *padvances)
 

Macro Definition Documentation

◆ FT_ADVANCE_FLAG_FAST_ONLY

#define FT_ADVANCE_FLAG_FAST_ONLY   0x20000000L

Definition at line 77 of file ftadvanc.h.

Function Documentation

◆ FT_Get_Advance()

FT_Get_Advance ( FT_Face  face,
FT_UInt  gindex,
FT_Int32  load_flags,
FT_Fixed padvance 
)

Definition at line 74 of file ftadvanc.c.

78 {
80
81
82 if ( !face )
83 return FT_THROW( Invalid_Face_Handle );
84
85 if ( !padvance )
86 return FT_THROW( Invalid_Argument );
87
88 if ( gindex >= (FT_UInt)face->num_glyphs )
89 return FT_THROW( Invalid_Glyph_Index );
90
91 func = face->driver->clazz->get_advances;
93 {
95
96
97 error = func( face, gindex, 1, flags, padvance );
98 if ( !error )
99 return _ft_face_scale_advances( face, padvance, 1, flags );
100
101 if ( FT_ERR_NEQ( error, Unimplemented_Feature ) )
102 return error;
103 }
104
105 return FT_Get_Advances( face, gindex, 1, flags, padvance );
106 }
FT_Get_Advances(FT_Face face, FT_UInt start, FT_UInt count, FT_Int32 flags, FT_Fixed *padvances)
Definition: ftadvanc.c:112
static FT_Error _ft_face_scale_advances(FT_Face face, FT_Fixed *advances, FT_UInt count, FT_Int32 flags)
Definition: ftadvanc.c:26
#define LOAD_ADVANCE_FAST_CHECK(face, flags)
Definition: ftadvanc.c:66
#define FT_THROW(e)
Definition: ftdebug.h:243
FT_Error(* FT_Face_GetAdvancesFunc)(FT_Face face, FT_UInt first, FT_UInt count, FT_Int32 flags, FT_Fixed *advances)
Definition: ftdrv.h:83
int FT_Error
Definition: fttypes.h:299
#define FT_ERR_NEQ(x, e)
Definition: fttypes.h:606
unsigned int FT_UInt
Definition: fttypes.h:231
GLenum func
Definition: glext.h:6028
GLenum GLuint GLint GLenum face
Definition: glext.h:7025
GLbitfield flags
Definition: glext.h:7161
#define error(str)
Definition: mkdosfs.c:1605

Referenced by af_shaper_get_elem().

◆ FT_Get_Advances()

FT_Get_Advances ( FT_Face  face,
FT_UInt  start,
FT_UInt  count,
FT_Int32  load_flags,
FT_Fixed padvances 
)

Definition at line 112 of file ftadvanc.c.

117 {
119
121
122 FT_UInt num, end, nn;
124
125
126 if ( !face )
127 return FT_THROW( Invalid_Face_Handle );
128
129 if ( !padvances )
130 return FT_THROW( Invalid_Argument );
131
132 num = (FT_UInt)face->num_glyphs;
133 end = start + count;
134 if ( start >= num || end < start || end > num )
135 return FT_THROW( Invalid_Glyph_Index );
136
137 if ( count == 0 )
138 return FT_Err_Ok;
139
140 func = face->driver->clazz->get_advances;
142 {
143 error = func( face, start, count, flags, padvances );
144 if ( !error )
145 return _ft_face_scale_advances( face, padvances, count, flags );
146
147 if ( FT_ERR_NEQ( error, Unimplemented_Feature ) )
148 return error;
149 }
150
152
154 return FT_THROW( Unimplemented_Feature );
155
156 flags |= (FT_UInt32)FT_LOAD_ADVANCE_ONLY;
157 factor = ( flags & FT_LOAD_NO_SCALE ) ? 1 : 1024;
158 for ( nn = 0; nn < count; nn++ )
159 {
160 error = FT_Load_Glyph( face, start + nn, flags );
161 if ( error )
162 break;
163
164 /* scale from 26.6 to 16.16, unless NO_SCALE was requested */
165 padvances[nn] = ( flags & FT_LOAD_VERTICAL_LAYOUT )
166 ? face->glyph->advance.y * factor
167 : face->glyph->advance.x * factor;
168 }
169
170 return error;
171 }
FT_Load_Glyph(FT_Face face, FT_UInt glyph_index, FT_Int32 load_flags)
Definition: ftobjs.c:796
#define FT_LOAD_VERTICAL_LAYOUT
Definition: freetype.h:3026
#define FT_LOAD_NO_SCALE
Definition: freetype.h:3022
#define FT_LOAD_ADVANCE_ONLY
Definition: freetype.h:3044
#define FT_ADVANCE_FLAG_FAST_ONLY
Definition: ftadvanc.h:77
return FT_Err_Ok
Definition: ftbbox.c:526
signed int FT_Int
Definition: fttypes.h:220
GLuint start
Definition: gl.h:1545
GLuint GLuint GLsizei count
Definition: gl.h:1545
GLuint GLuint end
Definition: gl.h:1545
GLuint GLuint num
Definition: glext.h:9618
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 factor
Definition: glfuncs.h:178
if(dx< 0)
Definition: linetemp.h:194

Referenced by FT_Get_Advance().