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)  

main.cc
Go to the documentation of this file.
1 /*
2  * Copyright © 2007,2008,2009 Red Hat, Inc.
3  * Copyright © 2018,2019,2020 Ebrahim Byagowi
4  * Copyright © 2018 Khaled Hosny
5  *
6  * This is part of HarfBuzz, a text shaping library.
7  *
8  * Permission is hereby granted, without written agreement and without
9  * license or royalty fees, to use, copy, modify, and distribute this
10  * software and its documentation for any purpose, provided that the
11  * above copyright notice and the following two paragraphs appear in
12  * all copies of this software.
13  *
14  * IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE TO ANY PARTY FOR
15  * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES
16  * ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN
17  * IF THE COPYRIGHT HOLDER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
18  * DAMAGE.
19  *
20  * THE COPYRIGHT HOLDER SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING,
21  * BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
22  * FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS
23  * ON AN "AS IS" BASIS, AND THE COPYRIGHT HOLDER HAS NO OBLIGATION TO
24  * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
25  *
26  * Red Hat Author(s): Behdad Esfahbod
27  */
28 
29 #ifdef HAVE_CONFIG_H
30 #include "config.h"
31 #endif
32 
33 #include "hb.h"
34 #include "hb-ot.h"
35 
36 #include <stdlib.h>
37 #include <stdio.h>
38 #include <string.h>
39 
40 #ifdef HB_NO_OPEN
41 #define hb_blob_create_from_file(x) hb_blob_get_empty ()
42 #endif
43 
44 #if !defined(HB_NO_COLOR) && !defined(HB_NO_DRAW) && defined(HB_EXPERIMENTAL_API)
45 static void
46 svg_dump (hb_face_t *face, unsigned face_index)
47 {
48  unsigned glyph_count = hb_face_get_glyph_count (face);
49 
50  for (unsigned glyph_id = 0; glyph_id < glyph_count; ++glyph_id)
51  {
53 
54  if (hb_blob_get_length (blob) == 0) continue;
55 
56  unsigned length;
57  const char *data = hb_blob_get_data (blob, &length);
58 
59  char output_path[255];
60  sprintf (output_path, "out/svg-%u-%u.svg%s",
61  glyph_id,
62  face_index,
63  // append "z" if the content is gzipped, https://stackoverflow.com/a/6059405
64  (length > 2 && (data[0] == '\x1F') && (data[1] == '\x8B')) ? "z" : "");
65 
66  FILE *f = fopen (output_path, "wb");
67  fwrite (data, 1, length, f);
68  fclose (f);
69 
70  hb_blob_destroy (blob);
71  }
72 }
73 
74 /* _png API is so easy to use unlike the below code, don't get confused */
75 static void
76 png_dump (hb_face_t *face, unsigned face_index)
77 {
78  unsigned glyph_count = hb_face_get_glyph_count (face);
80 
81  /* scans the font for strikes */
82  unsigned sample_glyph_id;
83  /* we don't care about different strikes for different glyphs at this point */
84  for (sample_glyph_id = 0; sample_glyph_id < glyph_count; ++sample_glyph_id)
85  {
86  hb_blob_t *blob = hb_ot_color_glyph_reference_png (font, sample_glyph_id);
87  unsigned blob_length = hb_blob_get_length (blob);
88  hb_blob_destroy (blob);
89  if (blob_length != 0)
90  break;
91  }
92 
93  unsigned upem = hb_face_get_upem (face);
94  unsigned blob_length = 0;
95  unsigned strike = 0;
96  for (unsigned ppem = 1; ppem < upem; ++ppem)
97  {
99  hb_blob_t *blob = hb_ot_color_glyph_reference_png (font, sample_glyph_id);
100  unsigned new_blob_length = hb_blob_get_length (blob);
101  hb_blob_destroy (blob);
102  if (new_blob_length != blob_length)
103  {
104  for (unsigned glyph_id = 0; glyph_id < glyph_count; ++glyph_id)
105  {
106  hb_blob_t *blob = hb_ot_color_glyph_reference_png (font, glyph_id);
107 
108  if (hb_blob_get_length (blob) == 0) continue;
109 
110  unsigned length;
111  const char *data = hb_blob_get_data (blob, &length);
112 
113  char output_path[255];
114  sprintf (output_path, "out/png-%u-%u-%u.png", glyph_id, strike, face_index);
115 
116  FILE *f = fopen (output_path, "wb");
117  fwrite (data, 1, length, f);
118  fclose (f);
119 
120  hb_blob_destroy (blob);
121  }
122 
123  strike++;
124  blob_length = new_blob_length;
125  }
126  }
127 
129 }
130 
131 struct user_data_t
132 {
133  FILE *f;
135 };
136 
137 static void
138 move_to (hb_position_t to_x, hb_position_t to_y, user_data_t &user_data)
139 {
140  fprintf (user_data.f, "M%d,%d", to_x, user_data.ascender - to_y);
141 }
142 
143 static void
144 line_to (hb_position_t to_x, hb_position_t to_y, user_data_t &user_data)
145 {
146  fprintf (user_data.f, "L%d,%d", to_x, user_data.ascender - to_y);
147 }
148 
149 static void
150 quadratic_to (hb_position_t control_x, hb_position_t control_y,
151  hb_position_t to_x, hb_position_t to_y,
152  user_data_t &user_data)
153 {
154  fprintf (user_data.f, "Q%d,%d %d,%d", control_x, user_data.ascender - control_y,
155  to_x, user_data.ascender - to_y);
156 }
157 
158 static void
159 cubic_to (hb_position_t control1_x, hb_position_t control1_y,
160  hb_position_t control2_x, hb_position_t control2_y,
161  hb_position_t to_x, hb_position_t to_y,
162  user_data_t &user_data)
163 {
164  fprintf (user_data.f, "C%d,%d %d,%d %d,%d", control1_x, user_data.ascender - control1_y,
165  control2_x, user_data.ascender - control2_y,
166  to_x, user_data.ascender - to_y);
167 }
168 
169 static void
170 close_path (user_data_t &user_data)
171 {
172  fprintf (user_data.f, "Z");
173 }
174 
175 static void
176 layered_glyph_dump (hb_font_t *font, hb_draw_funcs_t *funcs, unsigned face_index)
177 {
179  unsigned palette_count = hb_ot_color_palette_get_count (face);
180  for (unsigned palette = 0; palette < palette_count; ++palette)
181  {
182  unsigned num_colors = hb_ot_color_palette_get_colors (face, palette, 0, nullptr, nullptr);
183  if (!num_colors) continue;
184 
187  if (!num_colors)
188  {
189  free (colors);
190  continue;
191  }
192 
193  unsigned num_glyphs = hb_face_get_glyph_count (face);
194  for (hb_codepoint_t gid = 0; gid < num_glyphs; ++gid)
195  {
196  unsigned num_layers = hb_ot_color_glyph_get_layers (face, gid, 0, nullptr, nullptr);
197  if (!num_layers) continue;
198 
199  hb_ot_color_layer_t *layers = (hb_ot_color_layer_t*) malloc (num_layers * sizeof (hb_ot_color_layer_t));
200 
201  hb_ot_color_glyph_get_layers (face, gid, 0, &num_layers, layers);
202  if (num_layers)
203  {
204  hb_font_extents_t font_extents;
207  if (!hb_font_get_glyph_extents (font, gid, &extents))
208  {
209  printf ("Skip gid: %d\n", gid);
210  continue;
211  }
212 
213  char output_path[255];
214  sprintf (output_path, "out/colr-%u-%u-%u.svg", gid, palette, face_index);
215  FILE *f = fopen (output_path, "wb");
216  fprintf (f, "<svg xmlns=\"http://www.w3.org/2000/svg\""
217  " viewBox=\"%d %d %d %d\">\n",
218  extents.x_bearing, 0,
219  extents.x_bearing + extents.width, -extents.height);
220  user_data_t user_data;
221  user_data.ascender = extents.y_bearing;
222  user_data.f = f;
223 
224  for (unsigned layer = 0; layer < num_layers; ++layer)
225  {
226  hb_color_t color = 0x000000FF;
227  if (layers[layer].color_index != 0xFFFF)
228  color = colors[layers[layer].color_index];
229  fprintf (f, "<path fill=\"#%02X%02X%02X\" ",
231  if (hb_color_get_alpha (color) != 255)
232  fprintf (f, "fill-opacity=\"%.3f\"", (double) hb_color_get_alpha (color) / 255.);
233  fprintf (f, "d=\"");
234  if (!hb_font_draw_glyph (font, layers[layer].glyph, funcs, &user_data))
235  printf ("Failed to decompose layer %d while %d\n", layers[layer].glyph, gid);
236  fprintf (f, "\"/>\n");
237  }
238 
239  fprintf (f, "</svg>");
240  fclose (f);
241  }
242  free (layers);
243  }
244 
245  free (colors);
246  }
247 }
248 
249 static void
250 dump_glyphs (hb_font_t *font, hb_draw_funcs_t *funcs, unsigned face_index)
251 {
252  unsigned num_glyphs = hb_face_get_glyph_count (hb_font_get_face (font));
253  for (unsigned gid = 0; gid < num_glyphs; ++gid)
254  {
255  hb_font_extents_t font_extents;
258  if (!hb_font_get_glyph_extents (font, gid, &extents))
259  {
260  printf ("Skip gid: %d\n", gid);
261  continue;
262  }
263 
264  char output_path[255];
265  sprintf (output_path, "out/%u-%u.svg", face_index, gid);
266  FILE *f = fopen (output_path, "wb");
267  fprintf (f, "<svg xmlns=\"http://www.w3.org/2000/svg\""
268  " viewBox=\"%d %d %d %d\"><path d=\"",
269  extents.x_bearing, 0,
270  extents.x_bearing + extents.width, font_extents.ascender - font_extents.descender);
271  user_data_t user_data;
272  user_data.ascender = font_extents.ascender;
273  user_data.f = f;
274  if (!hb_font_draw_glyph (font, gid, funcs, &user_data))
275  printf ("Failed to decompose gid: %d\n", gid);
276  fprintf (f, "\"/></svg>");
277  fclose (f);
278  }
279 }
280 
281 static void
282 dump_glyphs (hb_blob_t *blob, const char *font_name)
283 {
284  FILE *font_name_file = fopen ("out/.dumped_font_name", "r");
285  if (font_name_file)
286  {
287  fprintf (stderr, "Purge or rename ./out folder if you like to run a glyph dump,\n"
288  "run it like `rm -rf out && mkdir out && src/main font-file.ttf`\n");
289  return;
290  }
291 
292  font_name_file = fopen ("out/.dumped_font_name", "w");
293  if (!font_name_file)
294  {
295  fprintf (stderr, "./out is not accessible as a folder, create it please\n");
296  return;
297  }
298  fwrite (font_name, 1, strlen (font_name), font_name_file);
299  fclose (font_name_file);
300 
301  hb_draw_funcs_t *funcs = hb_draw_funcs_create ();
302  hb_draw_funcs_set_move_to_func (funcs, (hb_draw_move_to_func_t) move_to);
303  hb_draw_funcs_set_line_to_func (funcs, (hb_draw_line_to_func_t) line_to);
304  hb_draw_funcs_set_quadratic_to_func (funcs, (hb_draw_quadratic_to_func_t) quadratic_to);
305  hb_draw_funcs_set_cubic_to_func (funcs, (hb_draw_cubic_to_func_t) cubic_to);
306  hb_draw_funcs_set_close_path_func (funcs, (hb_draw_close_path_func_t) close_path);
307 
308  unsigned num_faces = hb_face_count (blob);
309  for (unsigned face_index = 0; face_index < num_faces; ++face_index)
310  {
311  hb_face_t *face = hb_face_create (blob, face_index);
313 
315  printf ("Dumping png (CBDT/sbix)...\n");
316  png_dump (face, face_index);
317 
319  printf ("Dumping svg (SVG )...\n");
320  svg_dump (face, face_index);
321 
323  printf ("Dumping layered color glyphs (COLR/CPAL)...\n");
324  layered_glyph_dump (font, funcs, face_index);
325 
326  dump_glyphs (font, funcs, face_index);
327 
330  }
331 
332  hb_draw_funcs_destroy (funcs);
333 }
334 #endif
335 
336 #ifndef MAIN_CC_NO_PRIVATE_API
337 /* Only this part of this mini app uses private API */
338 #include "hb-static.cc"
339 #include "hb-open-file.hh"
341 #include "hb-ot-layout-gsubgpos.hh"
342 
343 using namespace OT;
344 
345 static void
347 {
348  const char *font_data = hb_blob_get_data (blob, nullptr);
350  const OpenTypeFontFile* sanitized = font_blob->as<OpenTypeFontFile> ();
351  if (!font_blob->data)
352  {
353  printf ("Sanitization of the file wasn't successful. Exit");
354  exit (1);
355  }
356  const OpenTypeFontFile& ot = *sanitized;
357 
358  switch (ot.get_tag ())
359  {
360  case OpenTypeFontFile::TrueTypeTag:
361  printf ("OpenType font with TrueType outlines\n");
362  break;
363  case OpenTypeFontFile::CFFTag:
364  printf ("OpenType font with CFF (Type1) outlines\n");
365  break;
366  case OpenTypeFontFile::TTCTag:
367  printf ("TrueType Collection of OpenType fonts\n");
368  break;
369  case OpenTypeFontFile::TrueTag:
370  printf ("Obsolete Apple TrueType font\n");
371  break;
372  case OpenTypeFontFile::Typ1Tag:
373  printf ("Obsolete Apple Type1 font in SFNT container\n");
374  break;
375  case OpenTypeFontFile::DFontTag:
376  printf ("DFont Mac Resource Fork\n");
377  break;
378  default:
379  printf ("Unknown font format\n");
380  break;
381  }
382 
383  unsigned num_faces = hb_face_count (blob);
384  printf ("%d font(s) found in file\n", num_faces);
385  for (unsigned n_font = 0; n_font < num_faces; ++n_font)
386  {
387  const OpenTypeFontFace &font = ot.get_face (n_font);
388  printf ("Font %d of %d:\n", n_font, num_faces);
389 
390  unsigned num_tables = font.get_table_count ();
391  printf (" %d table(s) found in font\n", num_tables);
392  for (unsigned n_table = 0; n_table < num_tables; ++n_table)
393  {
394  const OpenTypeTable &table = font.get_table (n_table);
395  printf (" Table %2d of %2d: %.4s (0x%08x+0x%08x)\n", n_table, num_tables,
396  (const char *) table.tag,
397  (unsigned) table.offset,
398  (unsigned) table.length);
399 
400  switch (table.tag)
401  {
402 
403  case HB_OT_TAG_GSUB:
404  case HB_OT_TAG_GPOS:
405  {
406 
407  const GSUBGPOS &g = *reinterpret_cast<const GSUBGPOS *> (font_data + table.offset);
408 
409  unsigned num_scripts = g.get_script_count ();
410  printf (" %d script(s) found in table\n", num_scripts);
411  for (unsigned n_script = 0; n_script < num_scripts; ++n_script)
412  {
413  const Script &script = g.get_script (n_script);
414  printf (" Script %2d of %2d: %.4s\n", n_script, num_scripts,
415  (const char *) g.get_script_tag (n_script));
416 
417  if (!script.has_default_lang_sys ())
418  printf (" No default language system\n");
419  int num_langsys = script.get_lang_sys_count ();
420  printf (" %d language system(s) found in script\n", num_langsys);
421  for (int n_langsys = script.has_default_lang_sys () ? -1 : 0; n_langsys < num_langsys; ++n_langsys)
422  {
423  const LangSys &langsys = n_langsys == -1
424  ? script.get_default_lang_sys ()
425  : script.get_lang_sys (n_langsys);
426  if (n_langsys == -1)
427  printf (" Default Language System\n");
428  else
429  printf (" Language System %2d of %2d: %.4s\n", n_langsys, num_langsys,
430  (const char *) script.get_lang_sys_tag (n_langsys));
431  if (!langsys.has_required_feature ())
432  printf (" No required feature\n");
433  else
434  printf (" Required feature index: %d\n",
435  langsys.get_required_feature_index ());
436 
437  unsigned num_features = langsys.get_feature_count ();
438  printf (" %d feature(s) found in language system\n", num_features);
439  for (unsigned n_feature = 0; n_feature < num_features; ++n_feature)
440  {
441  printf (" Feature index %2d of %2d: %d\n", n_feature, num_features,
442  langsys.get_feature_index (n_feature));
443  }
444  }
445  }
446 
447  unsigned num_features = g.get_feature_count ();
448  printf (" %d feature(s) found in table\n", num_features);
449  for (unsigned n_feature = 0; n_feature < num_features; ++n_feature)
450  {
451  const Feature &feature = g.get_feature (n_feature);
452  unsigned num_lookups = feature.get_lookup_count ();
453  printf (" Feature %2d of %2d: %c%c%c%c\n", n_feature, num_features,
454  HB_UNTAG (g.get_feature_tag (n_feature)));
455 
456  printf (" %d lookup(s) found in feature\n", num_lookups);
457  for (unsigned n_lookup = 0; n_lookup < num_lookups; ++n_lookup) {
458  printf (" Lookup index %2d of %2d: %d\n", n_lookup, num_lookups,
459  feature.get_lookup_index (n_lookup));
460  }
461  }
462 
463  unsigned num_lookups = g.get_lookup_count ();
464  printf (" %d lookup(s) found in table\n", num_lookups);
465  for (unsigned n_lookup = 0; n_lookup < num_lookups; ++n_lookup)
466  {
467  const Lookup &lookup = g.get_lookup (n_lookup);
468  printf (" Lookup %2d of %2d: type %d, props 0x%04X\n", n_lookup, num_lookups,
469  lookup.get_type (), lookup.get_props ());
470  }
471 
472  }
473  break;
474 
475  case GDEF::tableTag:
476  {
477 
478  const GDEF &gdef = *reinterpret_cast<const GDEF *> (font_data + table.offset);
479 
480  printf (" Has %sglyph classes\n",
481  gdef.has_glyph_classes () ? "" : "no ");
482  printf (" Has %smark attachment types\n",
483  gdef.has_mark_attachment_types () ? "" : "no ");
484  printf (" Has %sattach points\n",
485  gdef.has_attach_points () ? "" : "no ");
486  printf (" Has %slig carets\n",
487  gdef.has_lig_carets () ? "" : "no ");
488  printf (" Has %smark sets\n",
489  gdef.has_mark_sets () ? "" : "no ");
490  break;
491  }
492  }
493  }
494  }
495 }
496 /* end of private API use */
497 #endif
498 
499 int
500 main (int argc, char **argv)
501 {
502  if (argc != 2)
503  {
504  fprintf (stderr, "usage: %s font-file.ttf\n", argv[0]);
505  exit (1);
506  }
507 
509  printf ("Opened font file %s: %d bytes long\n", argv[1], hb_blob_get_length (blob));
510 #ifndef MAIN_CC_NO_PRIVATE_API
512 #endif
513 #if !defined(HB_NO_COLOR) && !defined(HB_NO_DRAW) && defined(HB_EXPERIMENTAL_API)
514  dump_glyphs (blob, argv[1]);
515 #endif
516  hb_blob_destroy (blob);
517 
518  return 0;
519 }
int ascender
Definition: afm2pfm.c:103
static cairo_status_t line_to(void *closure, const cairo_point_t *point)
static cairo_status_t move_to(void *closure, const cairo_point_t *point)
#define free(a)
Definition: decNumber.cpp:310
#define fopen
Definition: xxstdio.h:21
int printf()
static void dump_glyphs(char **glyphs, int n, int show_index)
Definition: ttf.c:447
struct rect data
Definition: dvipdfm.c:64
int ot
Definition: fcweight.c:26
mpz_t * f
Definition: gen-fib.c:34
xD9 x84 xD8 xAD xD9 x80 xF0 x90 xAC x9A xE0 xA7 xA6 xE0 xA7 xAA xF0 x91 x84 xA4 xF0 x91 x84 x89 xF0 x91 x84 x9B xF0 x90 x8A xAB xF0 x90 x8B x89 xE2 xB2 x9E xE2 xB2 x9F xD0 xBE xD0 x9E xF0 x90 x90 x84 xF0 x90 x90 xAC xE1 x83 x98 xE1 x83 x94 xE1 x83 x90 xE1 xB2 xBF xE2 xB0 x95 xE2 xB1 x85 xCE xBF xCE x9F xE0 xA8 xA0 xE0 xA8 xB0 xE0 xA9 xA6 Kayah xEA xA4 x8D xEA xA4 x80 Khmer xE1 xA7 xA1 xE1 xA7 xAA xE0 xBB x90 Latin Subscript xE2 x82 x92 xE2 x82 x80 xEA x93 xB3 xF0 x96 xB9 xA1 xF0 x96 xB9 x9B xF0 x96 xB9 xAF xE1 x80 x9D xE1 x80 x84 xE1 x80 x82 no script
Definition: afscript.h:271
FT_Face face
Definition: cffdrivr.c:659
void exit()
voidp calloc()
static void close_path(void)
Definition: mpost.c:270
static int num_colors
Definition: pdfdev.c:732
#define fclose
Definition: debug.h:100
#define fprintf
Definition: mendex.h:64
#define length(c)
Definition: ctangleboot.c:65
Code related to b fwrite(a, sizeof(char), b, stdout) @d C_printf(c
#define malloc
Definition: alloca.c:91
#define sprintf
Definition: snprintf.c:44
Definition: hb-iter.hh:336
struct const_name font_name[]
Definition: picttoppm.c:492
int g
Definition: ppmqvga.c:68
int colors
Definition: ppmtogif.c:51
const char * hb_blob_get_data(hb_blob_t *blob, unsigned int *length)
Definition: hb-blob.cc:341
hb_blob_t * hb_blob_create_from_file(const char *file_name)
Definition: hb-blob.cc:574
unsigned int hb_blob_get_length(hb_blob_t *blob)
Definition: hb-blob.cc:324
void hb_blob_destroy(hb_blob_t *blob)
Definition: hb-blob.cc:226
#define hb_color_get_alpha(color)
Definition: hb-common.h:776
#define HB_UNTAG(tag)
Definition: hb-common.h:163
uint32_t hb_codepoint_t
Definition: hb-common.h:106
#define hb_color_get_red(color)
Definition: hb-common.h:780
#define hb_color_get_green(color)
Definition: hb-common.h:784
uint32_t hb_color_t
Definition: hb-common.h:770
int32_t hb_position_t
Definition: hb-common.h:115
@ HB_DIRECTION_LTR
Definition: hb-common.h:195
void hb_face_destroy(hb_face_t *face)
Definition: hb-face.cc:276
unsigned int hb_face_get_glyph_count(const hb_face_t *face)
Definition: hb-face.cc:519
unsigned int hb_face_count(hb_blob_t *blob)
Definition: hb-face.cc:64
unsigned int hb_face_get_upem(const hb_face_t *face)
Definition: hb-face.cc:484
hb_face_t * hb_face_create(hb_blob_t *blob, unsigned int index)
Definition: hb-face.cc:206
hb_font_t * hb_font_create(hb_face_t *face)
Definition: hb-font.cc:1523
void hb_font_get_extents_for_direction(hb_font_t *font, hb_direction_t direction, hb_font_extents_t *extents)
Definition: hb-font.cc:1183
void hb_font_set_ppem(hb_font_t *font, unsigned int x_ppem, unsigned int y_ppem)
Definition: hb-font.cc:1951
hb_bool_t hb_font_get_glyph_extents(hb_font_t *font, hb_codepoint_t glyph, hb_glyph_extents_t *extents)
Definition: hb-font.cc:1087
hb_face_t * hb_font_get_face(hb_font_t *font)
Definition: hb-font.cc:1822
void hb_font_destroy(hb_font_t *font)
Definition: hb-font.cc:1643
unsigned int hb_ot_color_palette_get_count(hb_face_t *face)
Definition: hb-ot-color.cc:88
hb_bool_t hb_ot_color_has_layers(hb_face_t *face)
Definition: hb-ot-color.cc:203
unsigned int hb_ot_color_glyph_get_layers(hb_face_t *face, hb_codepoint_t glyph, unsigned int start_offset, unsigned int *layer_count, hb_ot_color_layer_t *layers)
Definition: hb-ot-color.cc:225
unsigned int hb_ot_color_palette_get_colors(hb_face_t *face, unsigned int palette_index, unsigned int start_offset, unsigned int *colors_count, hb_color_t *colors)
Definition: hb-ot-color.cc:178
hb_bool_t hb_ot_color_has_svg(hb_face_t *face)
Definition: hb-ot-color.cc:250
hb_bool_t hb_ot_color_has_png(hb_face_t *face)
Definition: hb-ot-color.cc:288
hb_blob_t * hb_ot_color_glyph_reference_svg(hb_face_t *face, hb_codepoint_t glyph)
Definition: hb-ot-color.cc:267
hb_bool_t hb_ot_color_has_palettes(hb_face_t *face)
Definition: hb-ot-color.cc:72
hb_blob_t * hb_ot_color_glyph_reference_png(hb_font_t *font, hb_codepoint_t glyph)
Definition: hb-ot-color.cc:307
#define HB_OT_TAG_GPOS
Definition: hb-ot-layout.h:44
#define HB_OT_TAG_GSUB
Definition: hb-ot-layout.h:43
int main(int argc, char **argv)
Definition: main.cc:500
static const luaL_Reg funcs[]
Definition: lutf8lib.c:238
static void print_layout_info_using_private_api(hb_blob_t *blob)
Definition: main.cc:346
bool has_mark_attachment_types() const
bool has_glyph_classes() const
bool has_mark_sets() const
bool has_lig_carets() const
bool has_attach_points() const
Definition: pdfdev.c:706
Definition: pbmfont.h:11
Definition: pbmfont.h:4
const Type * as() const
Definition: hb-blob.hh:59
const char * data
Definition: hb-blob.hh:64
hb_position_t descender
Definition: hb-font.h:110
hb_position_t ascender
Definition: hb-font.h:109
unsigned int color_index
Definition: hb-ot-color.h:105
hb_blob_t * sanitize_blob(hb_blob_t *blob)
Definition: hb-sanitize.hh:315
Definition: zic.c:306
Definition: table.h:30
unsigned long tag
#define FILE
Definition: t1stdio.h:34
*job_name strlen((char *) job_name) - 4)
TTF_USHORT upem
Definition: ttf2afm.c:109
int ppem
Definition: ttflib.c:39
#define argv
Definition: xmain.c:270
#define argc
Definition: xmain.c:269