1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
|
/* Pango
* pango-font.h: Font handling
*
* Copyright (C) 2000 Red Hat Software
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public
* License along with this library; if not, write to the
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
* Boston, MA 02111-1307, USA.
*/
#ifndef __PANGO_FONT_H__
#define __PANGO_FONT_H__
#include <pango/pango-coverage.h>
#include <pango/pango-types.h>
#include <glib-object.h>
#include <hb.h>
G_BEGIN_DECLS
/**
* PangoFontDescription:
*
* The #PangoFontDescription structure represents the description
* of an ideal font. These structures are used both to list
* what fonts are available on the system and also for specifying
* the characteristics of a font to load.
*/
typedef struct _PangoFontDescription PangoFontDescription;
/**
* PangoFontMetrics:
*
* A #PangoFontMetrics structure holds the overall metric information
* for a font (possibly restricted to a script). The fields of this
* structure are private to implementations of a font backend. See
* the documentation of the corresponding getters for documentation
* of their meaning.
*/
typedef struct _PangoFontMetrics PangoFontMetrics;
/**
* PangoStyle:
* @PANGO_STYLE_NORMAL: the font is upright.
* @PANGO_STYLE_OBLIQUE: the font is slanted, but in a roman style.
* @PANGO_STYLE_ITALIC: the font is slanted in an italic style.
*
* An enumeration specifying the various slant styles possible for a font.
**/
typedef enum {
PANGO_STYLE_NORMAL,
PANGO_STYLE_OBLIQUE,
PANGO_STYLE_ITALIC
} PangoStyle;
/**
* PangoVariant:
* @PANGO_VARIANT_NORMAL: A normal font.
* @PANGO_VARIANT_SMALL_CAPS: A font with the lower case characters
* replaced by smaller variants of the capital characters.
*
* An enumeration specifying capitalization variant of the font.
*/
typedef enum {
PANGO_VARIANT_NORMAL,
PANGO_VARIANT_SMALL_CAPS
} PangoVariant;
/**
* PangoWeight:
* @PANGO_WEIGHT_THIN: the thin weight (= 100; Since: 1.24)
* @PANGO_WEIGHT_ULTRALIGHT: the ultralight weight (= 200)
* @PANGO_WEIGHT_LIGHT: the light weight (= 300)
* @PANGO_WEIGHT_SEMILIGHT: the semilight weight (= 350; Since: 1.36.7)
* @PANGO_WEIGHT_BOOK: the book weight (= 380; Since: 1.24)
* @PANGO_WEIGHT_NORMAL: the default weight (= 400)
* @PANGO_WEIGHT_MEDIUM: the normal weight (= 500; Since: 1.24)
* @PANGO_WEIGHT_SEMIBOLD: the semibold weight (= 600)
* @PANGO_WEIGHT_BOLD: the bold weight (= 700)
* @PANGO_WEIGHT_ULTRABOLD: the ultrabold weight (= 800)
* @PANGO_WEIGHT_HEAVY: the heavy weight (= 900)
* @PANGO_WEIGHT_ULTRAHEAVY: the ultraheavy weight (= 1000; Since: 1.24)
*
* An enumeration specifying the weight (boldness) of a font. This is a numerical
* value ranging from 100 to 1000, but there are some predefined values:
*/
typedef enum {
PANGO_WEIGHT_THIN = 100,
PANGO_WEIGHT_ULTRALIGHT = 200,
PANGO_WEIGHT_LIGHT = 300,
PANGO_WEIGHT_SEMILIGHT = 350,
PANGO_WEIGHT_BOOK = 380,
PANGO_WEIGHT_NORMAL = 400,
PANGO_WEIGHT_MEDIUM = 500,
PANGO_WEIGHT_SEMIBOLD = 600,
PANGO_WEIGHT_BOLD = 700,
PANGO_WEIGHT_ULTRABOLD = 800,
PANGO_WEIGHT_HEAVY = 900,
PANGO_WEIGHT_ULTRAHEAVY = 1000
} PangoWeight;
/**
* PangoStretch:
* @PANGO_STRETCH_ULTRA_CONDENSED: ultra condensed width
* @PANGO_STRETCH_EXTRA_CONDENSED: extra condensed width
* @PANGO_STRETCH_CONDENSED: condensed width
* @PANGO_STRETCH_SEMI_CONDENSED: semi condensed width
* @PANGO_STRETCH_NORMAL: the normal width
* @PANGO_STRETCH_SEMI_EXPANDED: semi expanded width
* @PANGO_STRETCH_EXPANDED: expanded width
* @PANGO_STRETCH_EXTRA_EXPANDED: extra expanded width
* @PANGO_STRETCH_ULTRA_EXPANDED: ultra expanded width
*
* An enumeration specifying the width of the font relative to other designs
* within a family.
*/
typedef enum {
PANGO_STRETCH_ULTRA_CONDENSED,
PANGO_STRETCH_EXTRA_CONDENSED,
PANGO_STRETCH_CONDENSED,
PANGO_STRETCH_SEMI_CONDENSED,
PANGO_STRETCH_NORMAL,
PANGO_STRETCH_SEMI_EXPANDED,
PANGO_STRETCH_EXPANDED,
PANGO_STRETCH_EXTRA_EXPANDED,
PANGO_STRETCH_ULTRA_EXPANDED
} PangoStretch;
/**
* PangoFontMask:
* @PANGO_FONT_MASK_FAMILY: the font family is specified.
* @PANGO_FONT_MASK_STYLE: the font style is specified.
* @PANGO_FONT_MASK_VARIANT: the font variant is specified.
* @PANGO_FONT_MASK_WEIGHT: the font weight is specified.
* @PANGO_FONT_MASK_STRETCH: the font stretch is specified.
* @PANGO_FONT_MASK_SIZE: the font size is specified.
* @PANGO_FONT_MASK_GRAVITY: the font gravity is specified (Since: 1.16.)
* @PANGO_FONT_MASK_VARIATIONS: OpenType font variations are specified (Since: 1.42)
*
* The bits in a #PangoFontMask correspond to fields in a
* #PangoFontDescription that have been set.
*/
typedef enum {
PANGO_FONT_MASK_FAMILY = 1 << 0,
PANGO_FONT_MASK_STYLE = 1 << 1,
PANGO_FONT_MASK_VARIANT = 1 << 2,
PANGO_FONT_MASK_WEIGHT = 1 << 3,
PANGO_FONT_MASK_STRETCH = 1 << 4,
PANGO_FONT_MASK_SIZE = 1 << 5,
PANGO_FONT_MASK_GRAVITY = 1 << 6,
PANGO_FONT_MASK_VARIATIONS = 1 << 7,
} PangoFontMask;
/* CSS scale factors (1.2 factor between each size) */
/**
* PANGO_SCALE_XX_SMALL:
*
* The scale factor for three shrinking steps (1 / (1.2 * 1.2 * 1.2)).
*/
/**
* PANGO_SCALE_X_SMALL:
*
* The scale factor for two shrinking steps (1 / (1.2 * 1.2)).
*/
/**
* PANGO_SCALE_SMALL:
*
* The scale factor for one shrinking step (1 / 1.2).
*/
/**
* PANGO_SCALE_MEDIUM:
*
* The scale factor for normal size (1.0).
*/
/**
* PANGO_SCALE_LARGE:
*
* The scale factor for one magnification step (1.2).
*/
/**
* PANGO_SCALE_X_LARGE:
*
* The scale factor for two magnification steps (1.2 * 1.2).
*/
/**
* PANGO_SCALE_XX_LARGE:
*
* The scale factor for three magnification steps (1.2 * 1.2 * 1.2).
*/
#define PANGO_SCALE_XX_SMALL ((double)0.5787037037037)
#define PANGO_SCALE_X_SMALL ((double)0.6944444444444)
#define PANGO_SCALE_SMALL ((double)0.8333333333333)
#define PANGO_SCALE_MEDIUM ((double)1.0)
#define PANGO_SCALE_LARGE ((double)1.2)
#define PANGO_SCALE_X_LARGE ((double)1.44)
#define PANGO_SCALE_XX_LARGE ((double)1.728)
/*
* PangoFontDescription
*/
/**
* PANGO_TYPE_FONT_DESCRIPTION:
*
* The #GObject type for #PangoFontDescription.
*/
#define PANGO_TYPE_FONT_DESCRIPTION (pango_font_description_get_type ())
PANGO_AVAILABLE_IN_ALL
GType pango_font_description_get_type (void) G_GNUC_CONST;
PANGO_AVAILABLE_IN_ALL
PangoFontDescription *pango_font_description_new (void);
PANGO_AVAILABLE_IN_ALL
PangoFontDescription *pango_font_description_copy (const PangoFontDescription *desc);
PANGO_AVAILABLE_IN_ALL
PangoFontDescription *pango_font_description_copy_static (const PangoFontDescription *desc);
PANGO_AVAILABLE_IN_ALL
guint pango_font_description_hash (const PangoFontDescription *desc) G_GNUC_PURE;
PANGO_AVAILABLE_IN_ALL
gboolean pango_font_description_equal (const PangoFontDescription *desc1,
const PangoFontDescription *desc2) G_GNUC_PURE;
PANGO_AVAILABLE_IN_ALL
void pango_font_description_free (PangoFontDescription *desc);
PANGO_AVAILABLE_IN_ALL
void pango_font_descriptions_free (PangoFontDescription **descs,
int n_descs);
PANGO_AVAILABLE_IN_ALL
void pango_font_description_set_family (PangoFontDescription *desc,
const char *family);
PANGO_AVAILABLE_IN_ALL
void pango_font_description_set_family_static (PangoFontDescription *desc,
const char *family);
PANGO_AVAILABLE_IN_ALL
const char *pango_font_description_get_family (const PangoFontDescription *desc) G_GNUC_PURE;
PANGO_AVAILABLE_IN_ALL
void pango_font_description_set_style (PangoFontDescription *desc,
PangoStyle style);
PANGO_AVAILABLE_IN_ALL
PangoStyle pango_font_description_get_style (const PangoFontDescription *desc) G_GNUC_PURE;
PANGO_AVAILABLE_IN_ALL
void pango_font_description_set_variant (PangoFontDescription *desc,
PangoVariant variant);
PANGO_AVAILABLE_IN_ALL
PangoVariant pango_font_description_get_variant (const PangoFontDescription *desc) G_GNUC_PURE;
PANGO_AVAILABLE_IN_ALL
void pango_font_description_set_weight (PangoFontDescription *desc,
PangoWeight weight);
PANGO_AVAILABLE_IN_ALL
PangoWeight pango_font_description_get_weight (const PangoFontDescription *desc) G_GNUC_PURE;
PANGO_AVAILABLE_IN_ALL
void pango_font_description_set_stretch (PangoFontDescription *desc,
PangoStretch stretch);
PANGO_AVAILABLE_IN_ALL
PangoStretch pango_font_description_get_stretch (const PangoFontDescription *desc) G_GNUC_PURE;
PANGO_AVAILABLE_IN_ALL
void pango_font_description_set_size (PangoFontDescription *desc,
gint size);
PANGO_AVAILABLE_IN_ALL
gint pango_font_description_get_size (const PangoFontDescription *desc) G_GNUC_PURE;
PANGO_AVAILABLE_IN_1_8
void pango_font_description_set_absolute_size (PangoFontDescription *desc,
double size);
PANGO_AVAILABLE_IN_1_8
gboolean pango_font_description_get_size_is_absolute (const PangoFontDescription *desc) G_GNUC_PURE;
PANGO_AVAILABLE_IN_1_16
void pango_font_description_set_gravity (PangoFontDescription *desc,
PangoGravity gravity);
PANGO_AVAILABLE_IN_1_16
PangoGravity pango_font_description_get_gravity (const PangoFontDescription *desc) G_GNUC_PURE;
PANGO_AVAILABLE_IN_1_42
void pango_font_description_set_variations_static (PangoFontDescription *desc,
const char *variations);
PANGO_AVAILABLE_IN_1_42
void pango_font_description_set_variations (PangoFontDescription *desc,
const char *variations);
PANGO_AVAILABLE_IN_1_42
const char *pango_font_description_get_variations (const PangoFontDescription *desc) G_GNUC_PURE;
PANGO_AVAILABLE_IN_ALL
PangoFontMask pango_font_description_get_set_fields (const PangoFontDescription *desc) G_GNUC_PURE;
PANGO_AVAILABLE_IN_ALL
void pango_font_description_unset_fields (PangoFontDescription *desc,
PangoFontMask to_unset);
PANGO_AVAILABLE_IN_ALL
void pango_font_description_merge (PangoFontDescription *desc,
const PangoFontDescription *desc_to_merge,
gboolean replace_existing);
PANGO_AVAILABLE_IN_ALL
void pango_font_description_merge_static (PangoFontDescription *desc,
const PangoFontDescription *desc_to_merge,
gboolean replace_existing);
PANGO_AVAILABLE_IN_ALL
gboolean pango_font_description_better_match (const PangoFontDescription *desc,
const PangoFontDescription *old_match,
const PangoFontDescription *new_match) G_GNUC_PURE;
PANGO_AVAILABLE_IN_ALL
PangoFontDescription *pango_font_description_from_string (const char *str);
PANGO_AVAILABLE_IN_ALL
char * pango_font_description_to_string (const PangoFontDescription *desc);
PANGO_AVAILABLE_IN_ALL
char * pango_font_description_to_filename (const PangoFontDescription *desc);
/*
* PangoFontMetrics
*/
/**
* PANGO_TYPE_FONT_METRICS:
*
* The #GObject type for #PangoFontMetrics.
*/
#define PANGO_TYPE_FONT_METRICS (pango_font_metrics_get_type ())
PANGO_AVAILABLE_IN_ALL
GType pango_font_metrics_get_type (void) G_GNUC_CONST;
PANGO_AVAILABLE_IN_ALL
PangoFontMetrics *pango_font_metrics_ref (PangoFontMetrics *metrics);
PANGO_AVAILABLE_IN_ALL
void pango_font_metrics_unref (PangoFontMetrics *metrics);
PANGO_AVAILABLE_IN_ALL
int pango_font_metrics_get_ascent (PangoFontMetrics *metrics) G_GNUC_PURE;
PANGO_AVAILABLE_IN_ALL
int pango_font_metrics_get_descent (PangoFontMetrics *metrics) G_GNUC_PURE;
PANGO_AVAILABLE_IN_1_44
int pango_font_metrics_get_height (PangoFontMetrics *metrics) G_GNUC_PURE;
PANGO_AVAILABLE_IN_ALL
int pango_font_metrics_get_approximate_char_width (PangoFontMetrics *metrics) G_GNUC_PURE;
PANGO_AVAILABLE_IN_ALL
int pango_font_metrics_get_approximate_digit_width (PangoFontMetrics *metrics) G_GNUC_PURE;
PANGO_AVAILABLE_IN_1_6
int pango_font_metrics_get_underline_position (PangoFontMetrics *metrics) G_GNUC_PURE;
PANGO_AVAILABLE_IN_1_6
int pango_font_metrics_get_underline_thickness (PangoFontMetrics *metrics) G_GNUC_PURE;
PANGO_AVAILABLE_IN_1_6
int pango_font_metrics_get_strikethrough_position (PangoFontMetrics *metrics) G_GNUC_PURE;
PANGO_AVAILABLE_IN_1_6
int pango_font_metrics_get_strikethrough_thickness (PangoFontMetrics *metrics) G_GNUC_PURE;
/*
* PangoFontFamily
*/
/**
* PANGO_TYPE_FONT_FAMILY:
*
* The #GObject type for #PangoFontFamily.
*/
/**
* PANGO_FONT_FAMILY:
* @object: a #GObject.
*
* Casts a #GObject to a #PangoFontFamily.
*/
/**
* PANGO_IS_FONT_FAMILY:
* @object: a #GObject.
*
* Returns: %TRUE if @object is a #PangoFontFamily.
*/
#define PANGO_TYPE_FONT_FAMILY (pango_font_family_get_type ())
#define PANGO_FONT_FAMILY(object) (G_TYPE_CHECK_INSTANCE_CAST ((object), PANGO_TYPE_FONT_FAMILY, PangoFontFamily))
#define PANGO_IS_FONT_FAMILY(object) (G_TYPE_CHECK_INSTANCE_TYPE ((object), PANGO_TYPE_FONT_FAMILY))
typedef struct _PangoFontFamily PangoFontFamily;
typedef struct _PangoFontFace PangoFontFace;
PANGO_AVAILABLE_IN_ALL
GType pango_font_family_get_type (void) G_GNUC_CONST;
PANGO_AVAILABLE_IN_ALL
void pango_font_family_list_faces (PangoFontFamily *family,
PangoFontFace ***faces,
int *n_faces);
PANGO_AVAILABLE_IN_ALL
const char *pango_font_family_get_name (PangoFontFamily *family) G_GNUC_PURE;
PANGO_AVAILABLE_IN_1_4
gboolean pango_font_family_is_monospace (PangoFontFamily *family) G_GNUC_PURE;
PANGO_AVAILABLE_IN_1_44
gboolean pango_font_family_is_variable (PangoFontFamily *family) G_GNUC_PURE;
/*
* PangoFontFace
*/
/**
* PANGO_TYPE_FONT_FACE:
*
* The #GObject type for #PangoFontFace.
*/
/**
* PANGO_FONT_FACE:
* @object: a #GObject.
*
* Casts a #GObject to a #PangoFontFace.
*/
/**
* PANGO_IS_FONT_FACE:
* @object: a #GObject.
*
* Returns: %TRUE if @object is a #PangoFontFace.
*/
#define PANGO_TYPE_FONT_FACE (pango_font_face_get_type ())
#define PANGO_FONT_FACE(object) (G_TYPE_CHECK_INSTANCE_CAST ((object), PANGO_TYPE_FONT_FACE, PangoFontFace))
#define PANGO_IS_FONT_FACE(object) (G_TYPE_CHECK_INSTANCE_TYPE ((object), PANGO_TYPE_FONT_FACE))
PANGO_AVAILABLE_IN_ALL
GType pango_font_face_get_type (void) G_GNUC_CONST;
PANGO_AVAILABLE_IN_ALL
PangoFontDescription *pango_font_face_describe (PangoFontFace *face);
PANGO_AVAILABLE_IN_ALL
const char *pango_font_face_get_face_name (PangoFontFace *face) G_GNUC_PURE;
PANGO_AVAILABLE_IN_1_4
void pango_font_face_list_sizes (PangoFontFace *face,
int **sizes,
int *n_sizes);
PANGO_AVAILABLE_IN_1_18
gboolean pango_font_face_is_synthesized (PangoFontFace *face) G_GNUC_PURE;
/*
* PangoFont
*/
/**
* PANGO_TYPE_FONT:
*
* The #GObject type for #PangoFont.
*/
/**
* PANGO_FONT:
* @object: a #GObject.
*
* Casts a #GObject to a #PangoFont.
*/
/**
* PANGO_IS_FONT:
* @object: a #GObject.
*
* Returns: %TRUE if @object is a #PangoFont.
*/
#define PANGO_TYPE_FONT (pango_font_get_type ())
#define PANGO_FONT(object) (G_TYPE_CHECK_INSTANCE_CAST ((object), PANGO_TYPE_FONT, PangoFont))
#define PANGO_IS_FONT(object) (G_TYPE_CHECK_INSTANCE_TYPE ((object), PANGO_TYPE_FONT))
PANGO_AVAILABLE_IN_ALL
GType pango_font_get_type (void) G_GNUC_CONST;
PANGO_AVAILABLE_IN_ALL
PangoFontDescription *pango_font_describe (PangoFont *font);
PANGO_AVAILABLE_IN_1_14
PangoFontDescription *pango_font_describe_with_absolute_size (PangoFont *font);
PANGO_AVAILABLE_IN_ALL
PangoCoverage * pango_font_get_coverage (PangoFont *font,
PangoLanguage *language);
PANGO_DEPRECATED_IN_1_44
PangoEngineShape * pango_font_find_shaper (PangoFont *font,
PangoLanguage *language,
guint32 ch);
PANGO_AVAILABLE_IN_ALL
PangoFontMetrics * pango_font_get_metrics (PangoFont *font,
PangoLanguage *language);
PANGO_AVAILABLE_IN_ALL
void pango_font_get_glyph_extents (PangoFont *font,
PangoGlyph glyph,
PangoRectangle *ink_rect,
PangoRectangle *logical_rect);
PANGO_AVAILABLE_IN_1_10
PangoFontMap *pango_font_get_font_map (PangoFont *font);
PANGO_AVAILABLE_IN_1_44
gboolean pango_font_has_char (PangoFont *font,
gunichar wc);
PANGO_AVAILABLE_IN_1_44
void pango_font_get_features (PangoFont *font,
hb_feature_t *features,
guint len,
guint *num_features);
PANGO_AVAILABLE_IN_1_44
hb_font_t * pango_font_get_hb_font (PangoFont *font);
/**
* PANGO_GLYPH_EMPTY:
*
* The %PANGO_GLYPH_EMPTY macro represents a #PangoGlyph value that has a
* special meaning, which is a zero-width empty glyph. This is useful for
* example in shaper modules, to use as the glyph for various zero-width
* Unicode characters (those passing pango_is_zero_width()).
*/
/**
* PANGO_GLYPH_INVALID_INPUT:
*
* The %PANGO_GLYPH_INVALID_INPUT macro represents a #PangoGlyph value that has a
* special meaning of invalid input. #PangoLayout produces one such glyph
* per invalid input UTF-8 byte and such a glyph is rendered as a crossed
* box.
*
* Note that this value is defined such that it has the %PANGO_GLYPH_UNKNOWN_FLAG
* on.
*
* Since: 1.20
*/
/**
* PANGO_GLYPH_UNKNOWN_FLAG:
*
* The %PANGO_GLYPH_UNKNOWN_FLAG macro is a flag value that can be added to
* a #gunichar value of a valid Unicode character, to produce a #PangoGlyph
* value, representing an unknown-character glyph for the respective #gunichar.
*/
/**
* PANGO_GET_UNKNOWN_GLYPH:
* @wc: a Unicode character
*
* The way this unknown glyphs are rendered is backend specific. For example,
* a box with the hexadecimal Unicode code-point of the character written in it
* is what is done in the most common backends.
*
* Returns: a #PangoGlyph value that means no glyph was found for @wc.
*/
#define PANGO_GLYPH_EMPTY ((PangoGlyph)0x0FFFFFFF)
#define PANGO_GLYPH_INVALID_INPUT ((PangoGlyph)0xFFFFFFFF)
#define PANGO_GLYPH_UNKNOWN_FLAG ((PangoGlyph)0x10000000)
#define PANGO_GET_UNKNOWN_GLYPH(wc) ((PangoGlyph)(wc)|PANGO_GLYPH_UNKNOWN_FLAG)
#ifndef PANGO_DISABLE_DEPRECATED
#define PANGO_UNKNOWN_GLYPH_WIDTH 10
#define PANGO_UNKNOWN_GLYPH_HEIGHT 14
#endif
G_END_DECLS
#endif /* __PANGO_FONT_H__ */
|