diff options
author | Owen Taylor <otaylor@redhat.com> | 2001-06-14 20:38:25 +0000 |
---|---|---|
committer | Owen Taylor <otaylor@src.gnome.org> | 2001-06-14 20:38:25 +0000 |
commit | 5ee19fca3c7c3da53ef4f000efdb3bbf4dcb1a04 (patch) | |
tree | 17a70e18597aae753e36a983150500bd9362dcfd /pango/pangox-fontmap.c | |
parent | 3a42444e7f2449598106338be7e6ec9468bb7946 (diff) | |
download | pango-5ee19fca3c7c3da53ef4f000efdb3bbf4dcb1a04.tar.gz |
Add a new PangoLanguage type to represent language tags; these can
Sat Jun 9 17:36:09 2001 Owen Taylor <otaylor@redhat.com>
* pango/pango-types.h pango/pango-utils.c: Add a new PangoLanguage
type to represent language tags; these can efficiently be compared
and don't need to be copied. Also add pango_language_matches()
to match a language tag against a pattern.
* pango/pango-item.[ch] pango/pango-layout.c: Move extra_attrs
from PangoItem to PangoAnalysis. Add a language tag field to
PangoAnalysis. (#55894)
* pango/pango-attributes.[ch] (pango_attr_iterator_get_font): Return
the language tag as well.
* pango/pango-attributes.[ch]: Rename PangoAttrLang to PangoAttrLanguage,
and make it hold a PangoLanguage.
* pango/pango-context.[ch]: Rename pango_context_{get,set}_lang() to
pango_context_{get,set}_language().
* **.[ch]: Adapt to PangoLanguage and s/lang/language/ changes.
* modules/basic/basic-x.c modules/basic/tables-big.i: Add support
for ordering character sets differently for different language
tags.
* pango/itemize.c: Remove old, unused file.
* pango/pango-context.c (pango_itemize): Reduce number of mallocs
by allocating one array of PangoAnalysis instead of many arrays.
Diffstat (limited to 'pango/pangox-fontmap.c')
-rw-r--r-- | pango/pangox-fontmap.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/pango/pangox-fontmap.c b/pango/pangox-fontmap.c index 631591f4..f95eb5d7 100644 --- a/pango/pangox-fontmap.c +++ b/pango/pangox-fontmap.c @@ -1349,7 +1349,7 @@ free_coverages_foreach (gpointer key, PangoCoverage * pango_x_font_entry_get_coverage (PangoXFontEntry *entry, PangoFont *font, - const char *lang) + PangoLanguage *language) { PangoXFont *xfont; PangoXFontMap *xfontmap = NULL; /* Quiet gcc */ @@ -1370,7 +1370,9 @@ pango_x_font_entry_get_coverage (PangoXFontEntry *entry, xfontmap = (PangoXFontMap *)pango_x_font_map_for_display (xfont->display); if (entry->xlfd) { - char *str = g_strconcat (lang ? lang : "*", "|", entry->xlfd, NULL); + const char *lang_str = language ? pango_language_to_string (language) : "*"; + + char *str = g_strconcat (lang_str, "|", entry->xlfd, NULL); result = pango_x_get_cached_coverage (xfontmap, str, &atom); g_free (str); } @@ -1388,7 +1390,7 @@ pango_x_font_entry_get_coverage (PangoXFontEntry *entry, coverage_hash = g_hash_table_new (g_str_hash, g_str_equal); - shape_map = pango_x_get_shaper_map (lang); + shape_map = pango_x_get_shaper_map (language); for (ch = 0; ch < 65536; ch++) { @@ -1399,7 +1401,7 @@ pango_x_font_entry_get_coverage (PangoXFontEntry *entry, if (!coverage) { PangoEngineShape *engine = (PangoEngineShape *)pango_map_get_engine (shape_map, ch); - coverage = engine->get_coverage (font, lang); + coverage = engine->get_coverage (font, language); g_hash_table_insert (coverage_hash, map_entry->info->id, coverage); } |