1 | #include "gskresources.h" |
---|---|
2 | #include "gskprivate.h" |
3 | |
4 | static gpointer |
5 | register_resources (gpointer data) |
6 | { |
7 | _gsk_register_resource (); |
8 | return NULL; |
9 | } |
10 | |
11 | void |
12 | gsk_ensure_resources (void) |
13 | { |
14 | static GOnce register_resources_once = G_ONCE_INIT; |
15 | |
16 | g_once (®ister_resources_once, register_resources, NULL); |
17 | } |
18 | |
19 | int |
20 | pango_glyph_string_num_glyphs (PangoGlyphString *glyphs) |
21 | { |
22 | int i, count; |
23 | |
24 | count = 0; |
25 | for (i = 0; i < glyphs->num_glyphs; i++) |
26 | { |
27 | PangoGlyphInfo *gi = &glyphs->glyphs[i]; |
28 | if (gi->glyph != PANGO_GLYPH_EMPTY) |
29 | { |
30 | if (!(gi->glyph & PANGO_GLYPH_UNKNOWN_FLAG)) |
31 | count++; |
32 | } |
33 | } |
34 | |
35 | return count; |
36 | } |
37 | |
38 |