2016-03-17 13:48:19 +00:00
|
|
|
#include "gskresources.h"
|
2017-04-18 14:14:35 +00:00
|
|
|
#include "gskprivate.h"
|
2016-03-17 13:48:19 +00:00
|
|
|
|
|
|
|
static gpointer
|
|
|
|
register_resources (gpointer data)
|
|
|
|
{
|
|
|
|
_gsk_register_resource ();
|
|
|
|
return NULL;
|
|
|
|
}
|
|
|
|
|
|
|
|
void
|
|
|
|
gsk_ensure_resources (void)
|
|
|
|
{
|
|
|
|
static GOnce register_resources_once = G_ONCE_INIT;
|
|
|
|
|
|
|
|
g_once (®ister_resources_once, register_resources, NULL);
|
|
|
|
}
|
2017-09-01 20:58:42 +00:00
|
|
|
|
|
|
|
int
|
|
|
|
pango_glyph_string_num_glyphs (PangoGlyphString *glyphs)
|
|
|
|
{
|
|
|
|
int i, count;
|
|
|
|
|
|
|
|
count = 0;
|
|
|
|
for (i = 0; i < glyphs->num_glyphs; i++)
|
|
|
|
{
|
|
|
|
PangoGlyphInfo *gi = &glyphs->glyphs[i];
|
|
|
|
if (gi->glyph != PANGO_GLYPH_EMPTY)
|
|
|
|
{
|
|
|
|
if (!(gi->glyph & PANGO_GLYPH_UNKNOWN_FLAG))
|
|
|
|
count++;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
return count;
|
|
|
|
}
|
|
|
|
|