From ffcea1aa2e1c0f8a46b26bf90444942c421418ba Mon Sep 17 00:00:00 2001 From: Owen Taylor Date: Tue, 4 Jun 2002 00:20:51 +0000 Subject: on Jun 3 18:56:09 2002 Owen Taylor 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. --- modules/basic/basic-fc.c | 16 +--------------- 1 file changed, 1 insertion(+), 15 deletions(-) (limited to 'modules/basic/basic-fc.c') diff --git a/modules/basic/basic-fc.c b/modules/basic/basic-fc.c index f72ae195..be3e63fc 100644 --- a/modules/basic/basic-fc.c +++ b/modules/basic/basic-fc.c @@ -89,17 +89,6 @@ set_glyph (PangoFont *font, PangoGlyphString *glyphs, int i, int offset, PangoGl glyphs->glyphs[i].geometry.width = logical_rect.width; } -static guint -find_char (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 basic_engine_shape (PangoFont *font, const char *text, @@ -117,9 +106,6 @@ basic_engine_shape (PangoFont *font, g_return_if_fail (length >= 0); g_return_if_fail (analysis != NULL); - face = pango_xft_font_get_face (font); - g_assert (face); - n_chars = g_utf8_strlen (text, length); pango_glyph_string_set_size (glyphs, n_chars); @@ -145,7 +131,7 @@ basic_engine_shape (PangoFont *font, } else { - index = find_char (face, font, wc); + index = pango_xft_font_get_glyph (font, wc); if (!index) { -- cgit v1.2.1