diff options
author | Owen Taylor <otaylor@src.gnome.org> | 2002-06-04 00:20:51 +0000 |
---|---|---|
committer | Owen Taylor <otaylor@src.gnome.org> | 2002-06-04 00:20:51 +0000 |
commit | ffcea1aa2e1c0f8a46b26bf90444942c421418ba (patch) | |
tree | dc6fb251146c49ea7422e05660e4568a8e724e46 /modules/hebrew | |
parent | 8de41bc064a69ead1e38ca8c8b6483bb34b98d64 (diff) | |
download | pango-ffcea1aa2e1c0f8a46b26bf90444942c421418ba.tar.gz |
on Jun 3 18:56:09 2002 Owen Taylor <otaylor@redhat.com>
Xft2 and fontconfig conversion, based largely on a patch
from Keith Packard.
* configure.in acconfig.h: Add checks for fontconfig, switch
Xft checks to switch for Xft2 using pkg-config.
* pangoxft.pc.in pangoxft.pc.in
modules/{arabic,basic,hebrew,indic,tamil}/Makefile.am
pango/Makefile.am: Reflect new Xft/fontconfig dependencies.
* pango/pangoxft-private.h pango/pangoxft-fontmap.c
modules/arabic/arabic-xft.c modules/indic/indic-xft.c:
Switch over to using Xft2 and fontconfig.
* pango/pangoft2.c pango/pangoft2-fontmap.c pango/pangoft2-private.h
pango/pango/Makefile.am: Remove usage of mini-xft in
favor of fontconfig.
* pango/pango-ot.h pango/opentype/pango-ot-info.c pango/pangoxft.h
modules/arabic/arabic-{xft,ft2}.c modules/indic/indic-xft.c:
Attach OpenType information directly to the FT_Face
structure using FT_Generic.
* modules/tamil/Makefile.am modules/tamil/tamil-xft.c
configure.in: Remove this module, no longer needed.
* pango/pangoxft-font.c (pango_xft_real_render): Coalesce
calls to Xft rendering functions.
Diffstat (limited to 'modules/hebrew')
-rw-r--r-- | modules/hebrew/Makefile.am | 3 | ||||
-rw-r--r-- | modules/hebrew/hebrew-fc.c | 21 | ||||
-rw-r--r-- | modules/hebrew/hebrew-xft.c | 21 |
3 files changed, 8 insertions, 37 deletions
diff --git a/modules/hebrew/Makefile.am b/modules/hebrew/Makefile.am index bf780770..5a02c277 100644 --- a/modules/hebrew/Makefile.am +++ b/modules/hebrew/Makefile.am @@ -75,8 +75,9 @@ INCLUDES = \ -DG_DISABLE_DEPRECATED \ -I$(top_srcdir) \ -I$(top_srcdir)/pango/ \ - $(X_CFLAGS) \ + $(XFT_CFLAGS) \ $(FREETYPE_CFLAGS) \ + $(X_CFLAGS) \ $(moddefine) pango_hebrew_x_la_LDFLAGS = -export-dynamic -avoid-version -module diff --git a/modules/hebrew/hebrew-fc.c b/modules/hebrew/hebrew-fc.c index 365d34fb..913bb224 100644 --- a/modules/hebrew/hebrew-fc.c +++ b/modules/hebrew/hebrew-fc.c @@ -43,20 +43,8 @@ static PangoEngineInfo script_engines[] = { } }; -static guint -get_glyph_num (FT_Face face, PangoFont *font, gunichar wc) -{ - int index = FT_Get_Char_Index (face, wc); - - if (index && index <= face->num_glyphs) - return index; - else - return 0; -} - static void -get_cluster_glyphs(FT_Face face, - PangoFont *font, +get_cluster_glyphs(PangoFont *font, gunichar cluster[], gint cluster_size, /* output */ @@ -69,7 +57,7 @@ get_cluster_glyphs(FT_Face face, for (i=0; i<cluster_size; i++) { PangoRectangle logical_rect; - glyph_num[i] = get_glyph_num(face, font, cluster[i]); + glyph_num[i] = pango_xft_font_get_glyph (font, cluster[i]); glyph[i] = glyph_num[i]; pango_font_get_glyph_extents (font, @@ -154,8 +142,6 @@ hebrew_engine_shape (PangoFont *font, g_return_if_fail (analysis != NULL); pango_glyph_string_set_size (glyphs, 0); - face = pango_xft_font_get_face (font); - g_assert (face); p = text; while (p < text + length) @@ -164,8 +150,7 @@ hebrew_engine_shape (PangoFont *font, p = hebrew_shaper_get_next_cluster (p, text + length - p, /* output */ cluster, &cluster_size); - get_cluster_glyphs(face, - font, + get_cluster_glyphs(font, cluster, cluster_size, /* output */ diff --git a/modules/hebrew/hebrew-xft.c b/modules/hebrew/hebrew-xft.c index 365d34fb..913bb224 100644 --- a/modules/hebrew/hebrew-xft.c +++ b/modules/hebrew/hebrew-xft.c @@ -43,20 +43,8 @@ static PangoEngineInfo script_engines[] = { } }; -static guint -get_glyph_num (FT_Face face, PangoFont *font, gunichar wc) -{ - int index = FT_Get_Char_Index (face, wc); - - if (index && index <= face->num_glyphs) - return index; - else - return 0; -} - static void -get_cluster_glyphs(FT_Face face, - PangoFont *font, +get_cluster_glyphs(PangoFont *font, gunichar cluster[], gint cluster_size, /* output */ @@ -69,7 +57,7 @@ get_cluster_glyphs(FT_Face face, for (i=0; i<cluster_size; i++) { PangoRectangle logical_rect; - glyph_num[i] = get_glyph_num(face, font, cluster[i]); + glyph_num[i] = pango_xft_font_get_glyph (font, cluster[i]); glyph[i] = glyph_num[i]; pango_font_get_glyph_extents (font, @@ -154,8 +142,6 @@ hebrew_engine_shape (PangoFont *font, g_return_if_fail (analysis != NULL); pango_glyph_string_set_size (glyphs, 0); - face = pango_xft_font_get_face (font); - g_assert (face); p = text; while (p < text + length) @@ -164,8 +150,7 @@ hebrew_engine_shape (PangoFont *font, p = hebrew_shaper_get_next_cluster (p, text + length - p, /* output */ cluster, &cluster_size); - get_cluster_glyphs(face, - font, + get_cluster_glyphs(font, cluster, cluster_size, /* output */ |