diff options
Diffstat (limited to 'pango/pangocoretext.c')
-rw-r--r-- | pango/pangocoretext.c | 35 |
1 files changed, 33 insertions, 2 deletions
diff --git a/pango/pangocoretext.c b/pango/pangocoretext.c index d75b2e8d..dc5769bc 100644 --- a/pango/pangocoretext.c +++ b/pango/pangocoretext.c @@ -137,13 +137,44 @@ pango_core_text_font_get_coverage (PangoFont *font, return pango_coverage_ref (priv->coverage); } +/* Wrap shaper in PangoEngineShape to pass it through old API, + * from times when there were modules and engines. */ +typedef PangoEngineShape PangoCoreTextShapeEngine; +typedef PangoEngineShapeClass PangoCoreTextShapeEngineClass; +static GType pango_core_text_shape_engine_get_type (void) G_GNUC_CONST; +G_DEFINE_TYPE (PangoCoreTextShapeEngine, pango_core_text_shape_engine, PANGO_TYPE_ENGINE_SHAPE); +static void +_pango_core_text_shape_engine_shape (PangoEngineShape *engine G_GNUC_UNUSED, + PangoFont *font, + const char *item_text, + unsigned int item_length, + const PangoAnalysis *analysis, + PangoGlyphString *glyphs, + const char *paragraph_text, + unsigned int paragraph_length) +{ + _pango_core_text_shape (font, item_text, item_length, analysis, glyphs, + paragraph_text, paragraph_length); +} +static void +pango_core_text_shape_engine_class_init (PangoEngineShapeClass *class) +{ + class->script_shape = _pango_core_text_shape_engine_shape; +} +static void +pango_core_text_shape_engine_init (PangoEngineShape *object) +{ +} + static PangoEngineShape * pango_core_text_font_find_shaper (PangoFont *font, PangoLanguage *language, guint32 ch) { - /* FIXME: Implement */ - return NULL; + static PangoEngineShape *shaper; + if (!shaper) + shaper = g_object_new (pango_core_text_shape_engine_get_type(), NULL); /* XXX MT-unsafe */ + return shaper; } static PangoFontMap * |