summaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
authorAlexander Larsson <alla@lysator.liu.se>2001-11-18 16:06:02 +0000
committerAlexander Larsson <alexl@src.gnome.org>2001-11-18 16:06:02 +0000
commit0766534429b5830716e782418179ea63f8f1f65d (patch)
tree1ab6b8c50e572af8320c8f3623b8135276c010f6 /modules
parentb12c0fb6263fd542bb03f8bb10076a0653694f12 (diff)
downloadpango-0766534429b5830716e782418179ea63f8f1f65d.tar.gz
Check for LEX and YACC. This will be made optional later, with the build
2001-11-17 Alexander Larsson <alla@lysator.liu.se> * configure.in: Check for LEX and YACC. This will be made optional later, with the build sources checked in to cvs. Generate pango/mini-xft/Makefile * modules/basic/basic-ft2.c: Use the new pangoft2 API. * pango/Makefile.am: Build mini-xft. Add new files. * pango/pango-context.[ch]: Support only one fontmap per context. Use pango_font_map_load_fontset() and PangoFontset instead of internal fontset. * pango/pango-fontmap.[ch]: New virtual function pango_font_map_load_fontset() and default implementation that uses pango_font_map_load_font(). * pango/pango-utils.[ch] (pango_lookup_aliases): Utility function for looking up aliases. This can be used by backend that has no backend specific aliases. * pango/pangoft2-fontcache.c: Removed file. * pango/pangoft2-fontmap.c: * pango/pangoft2-private.h: * pango/pangoft2.c: * pango/pangoft2.h: Major rewrite. Doesn't handle fontsets. Uses mini-xft so that it will always match the PangoXft backend. Simplified the public API. * pango/pangowin32.c: * pango/pangox.c: pango_context_add_font_map -> pango_context_set_font_map * pango/pangoxft-font.c: * pango/pangoxft-fontmap.c: * pango/pangoxft-private.h: New code to handle fontsets. * pango/mini-xft/*: Mini version of libXft from XFree86 in order to have the pangoFT2 and pangXft backends have same config files and generate the same fonts.
Diffstat (limited to 'modules')
-rw-r--r--modules/basic/basic-ft2.c35
1 files changed, 8 insertions, 27 deletions
diff --git a/modules/basic/basic-ft2.c b/modules/basic/basic-ft2.c
index 9c5dac66..15779904 100644
--- a/modules/basic/basic-ft2.c
+++ b/modules/basic/basic-ft2.c
@@ -119,21 +119,13 @@ static PangoGlyph
find_char (PangoFont *font,
gunichar wc)
{
- int i;
- int n_subfonts;
-
- n_subfonts = pango_ft2_n_subfonts (font);
+ FT_Face face;
+ FT_UInt index;
- for (i = 0; i < n_subfonts; i++)
- {
- FT_Face face;
- FT_UInt index;
-
- face = pango_ft2_get_face (font, i+1);
- index = FT_Get_Char_Index (face, wc);
- if (index && index <= face->num_glyphs)
- return PANGO_FT2_MAKE_GLYPH (i+1, index);
- }
+ face = pango_ft2_font_get_face (font);
+ index = FT_Get_Char_Index (face, wc);
+ if (index && index <= face->num_glyphs)
+ return index;
return 0;
}
@@ -285,19 +277,7 @@ static PangoCoverage *
basic_engine_get_coverage (PangoFont *font,
PangoLanguage *lang)
{
- PangoCoverage *result;
-#if 0
- gunichar wc;
-
- result = pango_coverage_new ();
-
- for (wc = 0; wc < 65536; wc++)
- if (find_char (font, wc))
- pango_coverage_set (result, wc, PANGO_COVERAGE_EXACT);
-#else
- result = pango_ft2_get_coverage (font, lang);
-#endif
- return result;
+ return pango_ft2_font_get_coverage (font, lang);
}
static PangoEngine *
@@ -346,3 +326,4 @@ void
MODULE_ENTRY(script_engine_unload) (PangoEngine *engine)
{
}
+