w32tex
About: TeX Live provides a comprehensive TeX system including all the major TeX-related programs, macro packages, and fonts that are free software. Windows sources.
  Fossies Dox: w32tex-src.tar.xz  ("unofficial" and yet experimental doxygen-generated source code documentation)  

XeTeXFontInst.cpp
Go to the documentation of this file.
1 /****************************************************************************\
2  Part of the XeTeX typesetting system
3  Copyright (c) 1994-2008 by SIL International
4  Copyright (c) 2009 by Jonathan Kew
5 
6  SIL Author(s): Jonathan Kew
7 
8 Permission is hereby granted, free of charge, to any person obtaining
9 a copy of this software and associated documentation files (the
10 "Software"), to deal in the Software without restriction, including
11 without limitation the rights to use, copy, modify, merge, publish,
12 distribute, sublicense, and/or sell copies of the Software, and to
13 permit persons to whom the Software is furnished to do so, subject to
14 the following conditions:
15 
16 The above copyright notice and this permission notice shall be
17 included in all copies or substantial portions of the Software.
18 
19 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
20 EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
21 MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
22 NONINFRINGEMENT. IN NO EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE
23 FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
24 CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
25 WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
26 
27 Except as contained in this notice, the name of the copyright holders
28 shall not be used in advertising or otherwise to promote the sale,
29 use or other dealings in this Software without prior written
30 authorization from the copyright holders.
31 \****************************************************************************/
32 
33 /*
34  * file name: XeTeXFontInst.cpp
35  *
36  * created on: 2005-10-22
37  * created by: Jonathan Kew
38  *
39  * originally based on PortableFontInstance.cpp from ICU
40  */
41 
42 #include <w2c/config.h>
43 #include <kpathsea/kpathsea.h>
44 
45 #include "XeTeXFontInst.h"
46 #include "XeTeXLayoutInterface.h"
47 #include "XeTeX_ext.h"
48 
49 #include <string.h>
50 #include FT_GLYPH_H
51 #include FT_ADVANCES_H
52 
54 
56 
57 XeTeXFontInst::XeTeXFontInst(const char* pathname, int index, float pointSize, int &status)
58  : m_unitsPerEM(0)
59  , m_pointSize(pointSize)
60  , m_ascent(0)
61  , m_descent(0)
62  , m_capHeight(0)
63  , m_xHeight(0)
64  , m_italicAngle(0)
65  , m_vertical(false)
66  , m_filename(NULL)
67  , m_index(0)
68  , m_ftFace(0)
69  , m_hbFont(NULL)
70 {
71  if (pathname != NULL)
72  initialize(pathname, index, status);
73 }
74 
76 {
77  if (m_ftFace != 0) {
79  m_ftFace = 0;
80  }
82  delete[] m_filename;
83 }
84 
85 /* HarfBuzz font functions */
86 
87 static hb_bool_t
88 _get_glyph(hb_font_t*, void *font_data, hb_codepoint_t ch, hb_codepoint_t vs, hb_codepoint_t *gid, void*)
89 {
90  FT_Face face = (FT_Face) font_data;
91  *gid = 0;
92 
93  if (vs)
94  *gid = FT_Face_GetCharVariantIndex (face, ch, vs);
95 
96  if (*gid == 0)
97  *gid = FT_Get_Char_Index (face, ch);
98 
99  return *gid != 0;
100 }
101 
102 static FT_Fixed
104 {
105  FT_Error error;
107  int flags = FT_LOAD_NO_SCALE;
108 
109  if (vertical)
111 
113  if (error)
114  advance = 0;
115  else
116  advance = advance;
117 
118  /* FreeType's vertical metrics grows downward */
119  if (vertical)
120  advance = -advance;
121 
122  return advance;
123 }
124 
125 static hb_position_t
126 _get_glyph_h_advance(hb_font_t*, void *font_data, hb_codepoint_t gid, void*)
127 {
128  return _get_glyph_advance((FT_Face) font_data, gid, false);
129 }
130 
131 static hb_position_t
132 _get_glyph_v_advance(hb_font_t*, void *font_data, hb_codepoint_t gid, void*)
133 {
134  return _get_glyph_advance((FT_Face) font_data, gid, true);
135 }
136 
137 static hb_bool_t
139 {
140  // horizontal origin is (0, 0)
141  return true;
142 }
143 
144 static hb_bool_t
146 {
147  // vertical origin is (0, 0) for now
148  return true;
149 
150  // TODO
151  // Keep the code below for reference, for now we want to keep vertical
152  // origin at (0, 0) for compatibility with pre-0.9999.
153  // Reconsider this (e.g. using BASE table) when we get around overhauling
154  // the text directionality model and implementing real vertical typesetting.
155 
156  FT_Face face = (FT_Face) font_data;
157  FT_Error error;
158 
160  if (!error) {
163  }
164 
165  return !error;
166 }
167 
168 static hb_position_t
169 _get_glyph_h_kerning(hb_font_t*, void *font_data, hb_codepoint_t gid1, hb_codepoint_t gid2, void*)
170 {
171  FT_Face face = (FT_Face) font_data;
172  FT_Error error;
175 
177  if (error)
178  ret = 0;
179  else
180  ret = kerning.x;
181  return ret;
182 }
183 
184 static hb_position_t
185 _get_glyph_v_kerning(hb_font_t*, void *font_data, hb_codepoint_t gid1, hb_codepoint_t gid2, void*)
186 {
187  /* FreeType does not support vertical kerning */
188  return 0;
189 }
190 
191 static hb_bool_t
193 {
194  FT_Face face = (FT_Face) font_data;
195  FT_Error error;
196 
198  if (!error) {
199  extents->x_bearing = face->glyph->metrics.horiBearingX;
200  extents->y_bearing = face->glyph->metrics.horiBearingY;
201  extents->width = face->glyph->metrics.width;
202  extents->height = -face->glyph->metrics.height;
203  }
204 
205  return !error;
206 }
207 
208 static hb_bool_t
209 _get_glyph_contour_point(hb_font_t*, void *font_data, hb_codepoint_t gid, unsigned int point_index, hb_position_t *x, hb_position_t *y, void*)
210 {
211  FT_Face face = (FT_Face) font_data;
212  FT_Error error;
213  bool ret = false;
214 
216  if (!error) {
218  if (point_index < (unsigned int) face->glyph->outline.n_points) {
219  *x = face->glyph->outline.points[point_index].x;
220  *y = face->glyph->outline.points[point_index].y;
221  ret = true;
222  }
223  }
224  }
225 
226  return ret;
227 }
228 
229 static hb_bool_t
230 _get_glyph_name(hb_font_t *, void *font_data, hb_codepoint_t gid, char *name, unsigned int size, void *)
231 {
232  FT_Face face = (FT_Face) font_data;
233  bool ret = false;
234 
235  ret = !FT_Get_Glyph_Name (face, gid, name, size);
236  if (ret && (size && !*name))
237  ret = false;
238 
239  return ret;
240 }
241 
242 static hb_font_funcs_t *
244 {
246 
257 
258  return funcs;
259 }
260 
261 static hb_blob_t *
262 _get_table(hb_face_t *, hb_tag_t tag, void *user_data)
263 {
264  FT_Face face = (FT_Face) user_data;
265  FT_ULong length = 0;
266  FT_Byte *table;
267  FT_Error error;
268  hb_blob_t* blob = NULL;
269 
271  if (!error) {
272  table = (FT_Byte *) xmalloc(length * sizeof(char));
273  if (table != NULL) {
275  if (!error) {
276  blob = hb_blob_create((const char*) table, length, HB_MEMORY_MODE_WRITABLE, table, free);
277  } else {
278  free(table);
279  }
280  }
281  }
282 
283  return blob;
284 }
285 
286 void
287 XeTeXFontInst::initialize(const char* pathname, int index, int &status)
288 {
289  TT_Postscript *postTable;
290  TT_OS2* os2Table;
291  FT_Error error;
292  hb_face_t *hbFace;
293 
294  if (!gFreeTypeLibrary) {
296  if (error) {
297  fprintf(stderr, "FreeType initialization failed! (%d)\n", error);
298  exit(1);
299  }
300  }
301 
303  if (error) {
304  status = 1;
305  return;
306  }
307 
308  if (!FT_IS_SCALABLE(m_ftFace)) {
309  status = 1;
310  return;
311  }
312 
313  /* for non-sfnt-packaged fonts (presumably Type 1), see if there is an AFM file we can attach */
314  if (index == 0 && !FT_IS_SFNT(m_ftFace)) {
315  char* afm = xstrdup (xbasename (pathname));
316  char* p = strrchr (afm, '.');
317  if (p != NULL && strlen(p) == 4 && tolower(*(p+1)) == 'p' &&
318  tolower(*(p+2)) == 'f')
319  strcpy(p, ".afm");
320  char *fullafm = kpse_find_file (afm, kpse_afm_format, 0);
321  free (afm);
322  if (fullafm) {
323  FT_Attach_File(m_ftFace, fullafm);
324  free (fullafm);
325  }
326  }
327 
328  m_filename = xstrdup(pathname);
329  m_index = index;
333 
334  postTable = (TT_Postscript *) getFontTable(ft_sfnt_post);
335  if (postTable != NULL) {
336  m_italicAngle = Fix2D(postTable->italicAngle);
337  }
338 
339  os2Table = (TT_OS2*) getFontTable(ft_sfnt_os2);
340  if (os2Table) {
341  m_capHeight = unitsToPoints(os2Table->sCapHeight);
342  m_xHeight = unitsToPoints(os2Table->sxHeight);
343  }
344 
345  // Set up HarfBuzz font
347  hb_face_set_index(hbFace, index);
349  m_hbFont = hb_font_create(hbFace);
350  hb_face_destroy(hbFace);
351 
352  if (hbFontFuncs == NULL)
354 
357  // We don’t want device tables adjustments
358  hb_font_set_ppem(m_hbFont, 0, 0);
359 
360  return;
361 }
362 
363 void
365 {
366  m_vertical = vertical;
367 }
368 
369 void *
371 {
372  FT_ULong tmpLength = 0;
373  FT_Error error = FT_Load_Sfnt_Table(m_ftFace, tag, 0, NULL, &tmpLength);
374  if (error)
375  return NULL;
376 
377  void* table = xmalloc(tmpLength * sizeof(char));
378  if (table != NULL) {
379  error = FT_Load_Sfnt_Table(m_ftFace, tag, 0, (FT_Byte*)table, &tmpLength);
380  if (error) {
381  free((void *) table);
382  return NULL;
383  }
384  }
385 
386  return table;
387 }
388 
389 void *
391 {
392  return FT_Get_Sfnt_Table(m_ftFace, tag);
393 }
394 
395 void
397 {
398  bbox->xMin = bbox->yMin = bbox->xMax = bbox->yMax = 0.0;
399 
401  if (error)
402  return;
403 
404  FT_Glyph glyph;
406  if (error == 0) {
407  FT_BBox ft_bbox;
409  bbox->xMin = unitsToPoints(ft_bbox.xMin);
410  bbox->yMin = unitsToPoints(ft_bbox.yMin);
411  bbox->xMax = unitsToPoints(ft_bbox.xMax);
412  bbox->yMax = unitsToPoints(ft_bbox.yMax);
414  }
415 }
416 
417 GlyphID
419 {
420  return FT_Get_Char_Index(m_ftFace, ch);
421 }
422 
423 uint16_t
425 {
426  return m_ftFace->num_glyphs;
427 }
428 
429 float
431 {
432  return unitsToPoints(_get_glyph_advance(m_ftFace, gid, false));
433 }
434 
435 void
437 {
438  GlyphBBox bbox;
439  getGlyphBounds(gid, &bbox);
440 
441  if (ht)
442  *ht = bbox.yMax;
443  if (dp)
444  *dp = -bbox.yMin;
445 }
446 
447 void
449 {
450  float width = getGlyphWidth(gid);
451 
452  GlyphBBox bbox;
453  getGlyphBounds(gid, &bbox);
454 
455  if (lsb)
456  *lsb = bbox.xMin;
457  if (rsb)
458  *rsb = width - bbox.xMax;
459 }
460 
461 float
463 {
464  float rval = 0.0;
465 
466  float width = getGlyphWidth(gid);
467 
468  GlyphBBox bbox;
469  getGlyphBounds(gid, &bbox);
470 
471  if (bbox.xMax > width)
472  rval = bbox.xMax - width;
473 
474  return rval;
475 }
476 
477 GlyphID
478 XeTeXFontInst::mapGlyphToIndex(const char* glyphName) const
479 {
480  return FT_Get_Name_Index(m_ftFace, const_cast<char*>(glyphName));
481 }
482 
483 const char*
485 {
487  static char buffer[256];
488  FT_Get_Glyph_Name(m_ftFace, gid, buffer, 256);
489  nameLen = strlen(buffer);
490  return &buffer[0];
491  }
492  else {
493  nameLen = 0;
494  return NULL;
495  }
496 }
497 
498 UChar32
500 {
501  FT_UInt gindex;
502  return FT_Get_First_Char(m_ftFace, &gindex);
503 }
504 
505 UChar32
507 {
508  FT_UInt gindex;
509  UChar32 ch = FT_Get_First_Char(m_ftFace, &gindex);
510  UChar32 prev = ch;
511  while (gindex != 0) {
512  prev = ch;
513  ch = FT_Get_Next_Char(m_ftFace, ch, &gindex);
514  }
515  return prev;
516 }
static hb_position_t _get_glyph_h_kerning(hb_font_t *, void *font_data, hb_codepoint_t gid1, hb_codepoint_t gid2, void *)
static hb_position_t _get_glyph_h_advance(hb_font_t *, void *font_data, hb_codepoint_t gid, void *)
static hb_bool_t _get_glyph_h_origin(hb_font_t *, void *font_data, hb_codepoint_t gid, hb_position_t *x, hb_position_t *y, void *)
static hb_bool_t _get_glyph(hb_font_t *, void *font_data, hb_codepoint_t ch, hb_codepoint_t vs, hb_codepoint_t *gid, void *)
static hb_bool_t _get_glyph_name(hb_font_t *, void *font_data, hb_codepoint_t gid, char *name, unsigned int size, void *)
FT_Library gFreeTypeLibrary
static FT_Fixed _get_glyph_advance(FT_Face face, FT_UInt gid, Bool__ vertical)
static hb_blob_t * _get_table(hb_face_t *, hb_tag_t tag, void *user_data)
static hb_bool_t _get_glyph_v_origin(hb_font_t *, void *font_data, hb_codepoint_t gid, hb_position_t *x, hb_position_t *y, void *)
static hb_font_funcs_t * _get_font_funcs(void)
static hb_position_t _get_glyph_v_advance(hb_font_t *, void *font_data, hb_codepoint_t gid, void *)
static hb_font_funcs_t * hbFontFuncs
static hb_bool_t _get_glyph_extents(hb_font_t *, void *font_data, hb_codepoint_t gid, hb_glyph_extents_t *extents, void *)
static hb_position_t _get_glyph_v_kerning(hb_font_t *, void *font_data, hb_codepoint_t gid1, hb_codepoint_t gid2, void *)
static hb_bool_t _get_glyph_contour_point(hb_font_t *, void *font_data, hb_codepoint_t gid, unsigned int point_index, hb_position_t *x, hb_position_t *y, void *)
double Fix2D(Fixed f)
Definition: XeTeX_ext.c:2321
uint32_t OTTag
Definition: XeTeX_ext.h:64
static const char * xbasename(const char *name)
Definition: afm2pl.c:410
@ kpse_afm_format
Definition: afm2pl.c:372
struct @88 table[500]
#define width(a)
Definition: aptex-macros.h:198
#define name
#define advance
Definition: aptex-macros.h:464
Bool__ m_vertical
Definition: XeTeXFontInst.h:66
void setLayoutDirVertical(Bool__ vertical)
void getGlyphBounds(GlyphID glyph, GlyphBBox *bbox)
char * m_filename
Definition: XeTeXFontInst.h:68
void getGlyphSidebearings(GlyphID glyph, float *lsb, float *rsb)
float getGlyphItalCorr(GlyphID glyph)
UChar32 getFirstCharCode()
float getGlyphWidth(GlyphID glyph)
const char * getGlyphName(GlyphID gid, int &nameLen)
void getGlyphHeightDepth(GlyphID glyph, float *ht, float *dp)
void initialize(const char *pathname, int index, int &status)
uint32_t m_index
Definition: XeTeXFontInst.h:69
GlyphID mapCharToGlyph(UChar32 ch) const
GlyphID mapGlyphToIndex(const char *glyphName) const
float m_italicAngle
Definition: XeTeXFontInst.h:64
FT_Face m_ftFace
Definition: XeTeXFontInst.h:71
hb_font_t * m_hbFont
Definition: XeTeXFontInst.h:72
void * getFontTable(OTTag tableTag) const
XeTeXFontInst(float pointSize, int &status)
float unitsToPoints(float units) const
virtual ~XeTeXFontInst()
unsigned short m_unitsPerEM
Definition: XeTeXFontInst.h:58
uint16_t getNumGlyphs() const
UChar32 getLastCharCode()
#define free(a)
Definition: decNumber.cpp:310
#define strrchr
Definition: detex.c:67
char * strcpy()
#define error(a)
Definition: dviinfo.c:48
static FIELD_PTR prev
Definition: genind.c:36
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
FT_New_Face(FT_Library library, const char *filepathname, FT_Long face_index, FT_Face *aface)
Definition: ftobjs.c:1468
#define FT_IS_SFNT(face)
Definition: freetype.h:1290
#define FT_LOAD_NO_SCALE
Definition: freetype.h:3022
FT_Done_Face(FT_Face face)
Definition: ftobjs.c:2783
FT_Get_First_Char(FT_Face face, FT_UInt *agindex)
Definition: ftobjs.c:3760
FT_Get_Char_Index(FT_Face face, FT_ULong charcode)
Definition: ftobjs.c:3731
#define FT_IS_SCALABLE(face)
Definition: freetype.h:1271
struct FT_FaceRec_ * FT_Face
Definition: freetype.h:483
FT_Face_GetCharVariantIndex(FT_Face face, FT_ULong charcode, FT_ULong variantSelector)
Definition: ftobjs.c:3897
FT_Get_Next_Char(FT_Face face, FT_ULong char_code, FT_UInt *agindex)
Definition: ftobjs.c:3785
FT_Get_Glyph_Name(FT_Face face, FT_UInt glyph_index, FT_Pointer buffer, FT_UInt buffer_max)
Definition: ftobjs.c:4110
#define FT_HAS_GLYPH_NAMES(face)
Definition: freetype.h:1346
FT_Get_Name_Index(FT_Face face, const FT_String *glyph_name)
Definition: ftobjs.c:4082
FT_Get_Kerning(FT_Face face, FT_UInt left_glyph, FT_UInt right_glyph, FT_UInt kern_mode, FT_Vector *akerning)
Definition: ftobjs.c:3411
@ FT_KERNING_UNSCALED
Definition: freetype.h:3408
FT_Attach_File(FT_Face face, const char *filepathname)
Definition: ftobjs.c:2703
FT_Init_FreeType(FT_Library *alibrary)
Definition: ftinit.c:199
FT_Get_Advance(FT_Face face, FT_UInt gindex, FT_Int32 load_flags, FT_Fixed *padvance)
Definition: ftadvanc.c:74
FT_Done_Glyph(FT_Glyph glyph)
Definition: ftglyph.c:641
@ FT_GLYPH_BBOX_UNSCALED
Definition: ftglyph.h:371
FT_Get_Glyph(FT_GlyphSlot slot, FT_Glyph *aglyph)
Definition: ftglyph.c:401
FT_Glyph_Get_CBox(FT_Glyph glyph, FT_UInt bbox_mode, FT_BBox *acbox)
Definition: ftglyph.c:489
@ FT_GLYPH_FORMAT_OUTLINE
Definition: ftimage.h:749
unsigned long FT_ULong
Definition: fttypes.h:253
unsigned char FT_Byte
Definition: fttypes.h:154
signed long FT_Fixed
Definition: fttypes.h:287
int FT_Error
Definition: fttypes.h:299
unsigned int FT_UInt
Definition: fttypes.h:231
#define NULL
Definition: ftobjs.h:61
FT_Get_Sfnt_Table(FT_Face face, FT_Sfnt_Tag tag)
Definition: ftobjs.c:4176
#define ft_sfnt_post
Definition: tttables.h:641
FT_Load_Sfnt_Table(FT_Face face, FT_ULong tag, FT_Long offset, FT_Byte *buffer, FT_ULong *length)
Definition: ftobjs.c:4197
enum FT_Sfnt_Tag_ FT_Sfnt_Tag
#define ft_sfnt_os2
Definition: tttables.h:638
small capitals from c petite p
Definition: afcover.h:72
FT_BBox bbox
Definition: ftbbox.c:467
FT_Face face
Definition: cffdrivr.c:659
void exit()
#define false
Definition: ftrandom.c:52
FT_UInt FT_UInt FT_Vector * kerning
Definition: ttdriver.c:206
kerning y
Definition: ttdriver.c:212
unsigned short uint16_t
Definition: stdint.h:79
#define xstrdup(s)
Definition: writet1.c:34
#define xmalloc(size)
Definition: writet1.c:33
USHORT GlyphID
Definition: tt_gsub.c:44
static int ret
Definition: convert.c:72
#define fprintf
Definition: mendex.h:64
#define length(c)
Definition: ctangleboot.c:65
Definition: afm.py:1
float x
Definition: cordic.py:15
set set set set set set set set set set set set set set set set set set set set *set set set macro pixldst op &r &cond WK op &r &cond WK op &r &cond WK else op &m &cond &ia op &r &cond WK else op &m &cond &ia elseif elseif else error unsupported base if elseif elseif else error unsupported unaligned pixldst unaligned endm macro pixst base base else pixldst base endif endm macro PF base if bpp PF set rept prefetch_distance PF set OFFSET endr endif endm macro preload_leading_step2 base if bpp ifc DST PF PF else if bpp lsl PF PF rsb
#define index(s, c)
Definition: plain2.h:351
static int size
Definition: ppmlabel.c:24
#define status
#define flags
hb_blob_t * hb_blob_create(const char *data, unsigned int length, hb_memory_mode_t mode, void *user_data, hb_destroy_func_t destroy)
Definition: hb-blob.cc:72
@ HB_MEMORY_MODE_WRITABLE
Definition: hb-blob.h:70
uint32_t hb_codepoint_t
Definition: hb-common.h:106
int32_t hb_position_t
Definition: hb-common.h:115
int hb_bool_t
Definition: hb-common.h:97
uint32_t hb_tag_t
Definition: hb-common.h:147
void hb_font_funcs_set_glyph_v_kerning_func(hb_font_funcs_t *ffuncs, hb_font_get_glyph_v_kerning_func_t func, void *user_data, hb_destroy_func_t destroy)
Definition: hb-font.cc:733
void hb_font_funcs_set_glyph_func(hb_font_funcs_t *ffuncs, hb_font_get_glyph_func_t func, void *user_data, hb_destroy_func_t destroy)
Definition: hb-font.cc:2331
void hb_face_set_index(hb_face_t *face, unsigned int index)
Definition: hb-face.cc:427
void hb_face_destroy(hb_face_t *face)
Definition: hb-face.cc:276
void hb_face_set_upem(hb_face_t *face, unsigned int upem)
Definition: hb-face.cc:464
hb_face_t * hb_face_create_for_tables(hb_reference_table_func_t reference_table_func, void *user_data, hb_destroy_func_t destroy)
Definition: hb-face.cc:118
hb_font_t * hb_font_create(hb_face_t *face)
Definition: hb-font.cc:1523
void hb_font_funcs_set_glyph_contour_point_func(hb_font_funcs_t *ffuncs, hb_font_get_glyph_contour_point_func_t func, void *user_data, hb_destroy_func_t destroy)
Definition: hb-font.cc:733
void hb_font_set_funcs(hb_font_t *font, hb_font_funcs_t *klass, void *font_data, hb_destroy_func_t destroy)
Definition: hb-font.cc:1841
void hb_font_funcs_set_glyph_h_origin_func(hb_font_funcs_t *ffuncs, hb_font_get_glyph_h_origin_func_t func, void *user_data, hb_destroy_func_t destroy)
Definition: hb-font.cc:733
void hb_font_set_ppem(hb_font_t *font, unsigned int x_ppem, unsigned int y_ppem)
Definition: hb-font.cc:1951
void hb_font_funcs_set_glyph_h_kerning_func(hb_font_funcs_t *ffuncs, hb_font_get_glyph_h_kerning_func_t func, void *user_data, hb_destroy_func_t destroy)
Definition: hb-font.cc:733
void hb_font_funcs_set_glyph_h_advance_func(hb_font_funcs_t *ffuncs, hb_font_get_glyph_h_advance_func_t func, void *user_data, hb_destroy_func_t destroy)
Definition: hb-font.cc:733
void hb_font_set_scale(hb_font_t *font, int x_scale, int y_scale)
Definition: hb-font.cc:1909
void hb_font_funcs_set_glyph_v_advance_func(hb_font_funcs_t *ffuncs, hb_font_get_glyph_v_advance_func_t func, void *user_data, hb_destroy_func_t destroy)
Definition: hb-font.cc:733
void hb_font_funcs_set_glyph_v_origin_func(hb_font_funcs_t *ffuncs, hb_font_get_glyph_v_origin_func_t func, void *user_data, hb_destroy_func_t destroy)
Definition: hb-font.cc:733
hb_font_funcs_t * hb_font_funcs_create()
Definition: hb-font.cc:560
void hb_font_funcs_set_glyph_name_func(hb_font_funcs_t *ffuncs, hb_font_get_glyph_name_func_t func, void *user_data, hb_destroy_func_t destroy)
Definition: hb-font.cc:733
void hb_font_destroy(hb_font_t *font)
Definition: hb-font.cc:1643
void hb_font_funcs_set_glyph_extents_func(hb_font_funcs_t *ffuncs, hb_font_get_glyph_extents_func_t func, void *user_data, hb_destroy_func_t destroy)
Definition: hb-font.cc:733
#define tolower(ch)
Definition: utype.h:137
static const luaL_Reg funcs[]
Definition: lutf8lib.c:238
RETTYPE mp_ptr mp_size_t mp_srcptr dp
Definition: sec_div.c:70
FT_Pos xMin
Definition: ftimage.h:120
FT_Pos yMax
Definition: ftimage.h:121
FT_Pos yMin
Definition: ftimage.h:120
FT_Pos xMax
Definition: ftimage.h:121
FT_Long num_glyphs
Definition: freetype.h:1036
FT_Short descender
Definition: freetype.h:1056
FT_UShort units_per_EM
Definition: freetype.h:1054
FT_GlyphSlot glyph
Definition: freetype.h:1065
FT_Short ascender
Definition: freetype.h:1055
FT_Outline outline
Definition: freetype.h:1890
FT_Glyph_Metrics metrics
Definition: freetype.h:1879
FT_Glyph_Format format
Definition: freetype.h:1884
FT_Pos horiBearingX
Definition: freetype.h:305
FT_Pos vertBearingY
Definition: freetype.h:310
FT_Pos vertBearingX
Definition: freetype.h:309
FT_Pos horiBearingY
Definition: freetype.h:306
FT_Vector * points
Definition: ftimage.h:341
short n_points
Definition: ftimage.h:339
FT_Pos x
Definition: ftimage.h:77
FT_Pos y
Definition: ftimage.h:78
FT_Short sxHeight
Definition: tttables.h:419
FT_Short sCapHeight
Definition: tttables.h:420
FT_Fixed italicAngle
Definition: tttables.h:453
Definition: nsfix.c:44
Definition: utils.c:300
Definition: pbmfont.h:4
Definition: mendex.h:20
Definition: table.h:30
Definition: xmlparse.c:179
ch
Definition: t4ht.c:1443
*job_name strlen((char *) job_name) - 4)
TT_Glyph glyph
Definition: ttf2pfb.c:162
int32_t UChar32
Definition: umachine.h:467