summaryrefslogtreecommitdiff
path: root/pango/pangowin32.c
diff options
context:
space:
mode:
authorHans Breuer <hans@breuer.org>2001-06-22 14:13:31 +0000
committerHans Breuer <hans@src.gnome.org>2001-06-22 14:13:31 +0000
commit71b9b61cff35a82d199b6f0faeac0a13d5882159 (patch)
tree7568d9dbcfeab641c8915321842f8241e2945553 /pango/pangowin32.c
parent5ee19fca3c7c3da53ef4f000efdb3bbf4dcb1a04 (diff)
downloadpango-71b9b61cff35a82d199b6f0faeac0a13d5882159.tar.gz
changed version to 0.17
2001-06-22 Hans Breuer <hans@breuer.org> * pango/makefile.msc : changed version to 0.17 * pango/pango.def : updated externals * pango/pangowin32-fontmap.c : * pango/pangowin32-private.h : * pango/pangowin32.c : adapted to PangoLanguage usage
Diffstat (limited to 'pango/pangowin32.c')
-rw-r--r--pango/pangowin32.c33
1 files changed, 17 insertions, 16 deletions
diff --git a/pango/pangowin32.c b/pango/pangowin32.c
index 6bfe0293..cd6c8388 100644
--- a/pango/pangowin32.c
+++ b/pango/pangowin32.c
@@ -80,7 +80,7 @@ struct _PangoWin32SubfontInfo
struct _PangoWin32MetricsInfo
{
- const char *lang;
+ PangoLanguage *lang;
PangoFontMetrics metrics;
};
@@ -99,10 +99,10 @@ static void pango_win32_font_finalize (GObject *object);
static PangoFontDescription *pango_win32_font_describe (PangoFont *font);
static PangoCoverage *pango_win32_font_get_coverage (PangoFont *font,
- const char *lang);
+ PangoLanguage *lang);
static PangoEngineShape *pango_win32_font_find_shaper (PangoFont *font,
- const char *lang,
+ PangoLanguage *lang,
guint32 ch);
static void pango_win32_font_get_glyph_extents (PangoFont *font,
@@ -111,7 +111,7 @@ static void pango_win32_font_get_glyph_extents (PangoFont *font,
PangoRectangle *logical_rect);
static void pango_win32_font_get_metrics (PangoFont *font,
- const gchar *lang,
+ PangoLanguage *lang,
PangoFontMetrics *metrics);
static PangoWin32SubfontInfo *pango_win32_find_subfont (PangoFont *font,
@@ -682,7 +682,7 @@ get_font_metrics_from_subfonts (PangoFont *font,
*/
static void
get_font_metrics_from_string (PangoFont *font,
- const char *lang,
+ PangoLanguage *lang,
const char *str,
PangoFontMetrics *metrics)
{
@@ -800,36 +800,37 @@ LangInfo lang_texts[] = {
static void
pango_win32_font_get_metrics (PangoFont *font,
- const gchar *lang,
+ PangoLanguage *lang,
PangoFontMetrics *metrics)
{
PangoWin32MetricsInfo *info;
PangoWin32Font *win32font = (PangoWin32Font *)font;
GSList *tmp_list;
- const char *lookup_lang;
+ const char *lang_str = pango_language_to_string (lang);
+ PangoLanguage *lookup_lang;
const char *str;
if (lang)
{
- LangInfo *lang_info = bsearch (lang, lang_texts,
+ LangInfo *lang_info = bsearch (lang_str, lang_texts,
G_N_ELEMENTS (lang_texts), sizeof (LangInfo),
lang_info_compare);
if (lang_info)
{
- lookup_lang = lang_info->lang;
+ lookup_lang = pango_language_from_string (lang_info->lang);
str = lang_info->str;
}
else
{
- lookup_lang = "UNKNOWN";
+ lookup_lang = pango_language_to_string ("UNKNOWN");
str = "French (Français)"; /* Assume iso-8859-1 */
}
}
else
{
- lookup_lang = "NONE";
+ lookup_lang = pango_language_to_string ("NONE");
/* Complete junk
*/
@@ -868,7 +869,7 @@ pango_win32_font_get_metrics (PangoFont *font,
* chars in "0123456789"
*/
context = pango_win32_get_context ();
- pango_context_set_lang (context, lookup_lang);
+ pango_context_set_language (context, lookup_lang);
layout = pango_layout_new (context);
pango_layout_set_text (layout, "0123456789", -1);
@@ -1283,7 +1284,7 @@ pango_win32_font_describe (PangoFont *font)
}
PangoMap *
-pango_win32_get_shaper_map (const char *lang)
+pango_win32_get_shaper_map (PangoLanguage *lang)
{
static guint engine_type_id = 0;
static guint render_type_id = 0;
@@ -1299,7 +1300,7 @@ pango_win32_get_shaper_map (const char *lang)
static PangoCoverage *
pango_win32_font_get_coverage (PangoFont *font,
- const char *lang)
+ PangoLanguage *lang)
{
PangoWin32Font *win32font = (PangoWin32Font *)font;
@@ -1308,7 +1309,7 @@ pango_win32_font_get_coverage (PangoFont *font,
static PangoEngineShape *
pango_win32_font_find_shaper (PangoFont *font,
- const gchar *lang,
+ PangoLanguage *lang,
guint32 ch)
{
PangoMap *shape_map = NULL;
@@ -1575,7 +1576,7 @@ pango_win32_get_item_properties (PangoItem *item,
PangoAttrColor *bg_color,
gboolean *bg_set)
{
- GSList *tmp_list = item->extra_attrs;
+ GSList *tmp_list = item->analysis.extra_attrs;
if (fg_set)
*fg_set = FALSE;