summaryrefslogtreecommitdiff
path: root/pango/pangofc-shape.c
diff options
context:
space:
mode:
Diffstat (limited to 'pango/pangofc-shape.c')
-rw-r--r--pango/pangofc-shape.c85
1 files changed, 10 insertions, 75 deletions
diff --git a/pango/pangofc-shape.c b/pango/pangofc-shape.c
index d77dacef..8db471a6 100644
--- a/pango/pangofc-shape.c
+++ b/pango/pangofc-shape.c
@@ -1,5 +1,5 @@
/* Pango
- * basic-fc.c: Basic shaper for FreeType-based backends
+ * pangofc-shape.c: Basic shaper for FreeType-based backends
*
* Copyright (C) 2000, 2007, 2009 Red Hat Software
* Authors:
@@ -27,37 +27,12 @@
#define PANGO_ENABLE_BACKEND 1 /* XXX */
-#include "pango-engine.h"
-#include "pango-utils.h"
-#include "pangofc-fontmap.h"
-#include "pangofc-font.h"
+#include "pangofc-private.h"
#include <hb-ft.h>
#include <hb-glib.h>
#define PANGO_UNITS_26_6(d) ((d) << 4)
-
-/* No extra fields needed */
-typedef PangoEngineShape BasicEngineFc;
-typedef PangoEngineShapeClass BasicEngineFcClass;
-
-#define SCRIPT_ENGINE_NAME "BasicScriptEngineFc"
-#define RENDER_TYPE PANGO_RENDER_TYPE_FC
-
-static PangoEngineScriptInfo basic_scripts[] = {
- { PANGO_SCRIPT_COMMON, "" }
-};
-
-static PangoEngineInfo script_engines[] = {
- {
- SCRIPT_ENGINE_NAME,
- PANGO_ENGINE_TYPE_SHAPE,
- RENDER_TYPE,
- basic_scripts, G_N_ELEMENTS(basic_scripts)
- }
-};
-
-
/* cache a single hb_buffer_t */
static hb_buffer_t *cached_buffer = NULL; /* MT-safe */
G_LOCK_DEFINE_STATIC (cached_buffer);
@@ -299,17 +274,14 @@ pango_fc_get_hb_font_funcs (void)
}
-
-
-static void
-basic_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)
+void
+_pango_fc_shape (PangoFont *font,
+ const char *item_text,
+ unsigned int item_length,
+ const PangoAnalysis *analysis,
+ PangoGlyphString *glyphs,
+ const char *paragraph_text,
+ unsigned int paragraph_length)
{
PangoFcHbContext context;
PangoFcFont *fc_font;
@@ -444,40 +416,3 @@ basic_engine_shape (PangoEngineShape *engine G_GNUC_UNUSED,
hb_face_destroy (hb_face);
pango_fc_font_unlock_face (fc_font);
}
-
-static void
-basic_engine_fc_class_init (PangoEngineShapeClass *class)
-{
- class->script_shape = basic_engine_shape;
-}
-
-PANGO_ENGINE_SHAPE_DEFINE_TYPE (BasicEngineFc, basic_engine_fc,
- basic_engine_fc_class_init, NULL)
-
-void
-PANGO_MODULE_ENTRY(init) (GTypeModule *module)
-{
- basic_engine_fc_register_type (module);
-}
-
-void
-PANGO_MODULE_ENTRY(exit) (void)
-{
-}
-
-void
-PANGO_MODULE_ENTRY(list) (PangoEngineInfo **engines,
- int *n_engines)
-{
- *engines = script_engines;
- *n_engines = G_N_ELEMENTS (script_engines);
-}
-
-PangoEngine *
-PANGO_MODULE_ENTRY(create) (const char *id)
-{
- if (!strcmp (id, SCRIPT_ENGINE_NAME))
- return g_object_new (basic_engine_fc_type, NULL);
- else
- return NULL;
-}