Fix up for change to Pango font API. #61933. (Untested, even for
Fri Oct 19 12:24:32 2001 Owen Taylor <otaylor@redhat.com> * gdk/linux-fb/gdkfont-fb.c: Fix up for change to Pango font API. #61933. (Untested, even for compilation.)
This commit is contained in:
parent
1da46404b7
commit
061fec5841
@ -1,3 +1,8 @@
|
|||||||
|
Fri Oct 19 12:24:32 2001 Owen Taylor <otaylor@redhat.com>
|
||||||
|
|
||||||
|
* gdk/linux-fb/gdkfont-fb.c: Fix up for change to
|
||||||
|
Pango font API. #61933. (Untested, even for compilation.)
|
||||||
|
|
||||||
Fri Oct 19 11:24:58 2001 Owen Taylor <otaylor@redhat.com>
|
Fri Oct 19 11:24:58 2001 Owen Taylor <otaylor@redhat.com>
|
||||||
|
|
||||||
* gtk/gtkmain.[ch] (gtk_disable_setlocale): Actually
|
* gtk/gtkmain.[ch] (gtk_disable_setlocale): Actually
|
||||||
|
@ -1,3 +1,8 @@
|
|||||||
|
Fri Oct 19 12:24:32 2001 Owen Taylor <otaylor@redhat.com>
|
||||||
|
|
||||||
|
* gdk/linux-fb/gdkfont-fb.c: Fix up for change to
|
||||||
|
Pango font API. #61933. (Untested, even for compilation.)
|
||||||
|
|
||||||
Fri Oct 19 11:24:58 2001 Owen Taylor <otaylor@redhat.com>
|
Fri Oct 19 11:24:58 2001 Owen Taylor <otaylor@redhat.com>
|
||||||
|
|
||||||
* gtk/gtkmain.[ch] (gtk_disable_setlocale): Actually
|
* gtk/gtkmain.[ch] (gtk_disable_setlocale): Actually
|
||||||
|
@ -1,3 +1,8 @@
|
|||||||
|
Fri Oct 19 12:24:32 2001 Owen Taylor <otaylor@redhat.com>
|
||||||
|
|
||||||
|
* gdk/linux-fb/gdkfont-fb.c: Fix up for change to
|
||||||
|
Pango font API. #61933. (Untested, even for compilation.)
|
||||||
|
|
||||||
Fri Oct 19 11:24:58 2001 Owen Taylor <otaylor@redhat.com>
|
Fri Oct 19 11:24:58 2001 Owen Taylor <otaylor@redhat.com>
|
||||||
|
|
||||||
* gtk/gtkmain.[ch] (gtk_disable_setlocale): Actually
|
* gtk/gtkmain.[ch] (gtk_disable_setlocale): Actually
|
||||||
|
@ -1,3 +1,8 @@
|
|||||||
|
Fri Oct 19 12:24:32 2001 Owen Taylor <otaylor@redhat.com>
|
||||||
|
|
||||||
|
* gdk/linux-fb/gdkfont-fb.c: Fix up for change to
|
||||||
|
Pango font API. #61933. (Untested, even for compilation.)
|
||||||
|
|
||||||
Fri Oct 19 11:24:58 2001 Owen Taylor <otaylor@redhat.com>
|
Fri Oct 19 11:24:58 2001 Owen Taylor <otaylor@redhat.com>
|
||||||
|
|
||||||
* gtk/gtkmain.[ch] (gtk_disable_setlocale): Actually
|
* gtk/gtkmain.[ch] (gtk_disable_setlocale): Actually
|
||||||
|
@ -1,3 +1,8 @@
|
|||||||
|
Fri Oct 19 12:24:32 2001 Owen Taylor <otaylor@redhat.com>
|
||||||
|
|
||||||
|
* gdk/linux-fb/gdkfont-fb.c: Fix up for change to
|
||||||
|
Pango font API. #61933. (Untested, even for compilation.)
|
||||||
|
|
||||||
Fri Oct 19 11:24:58 2001 Owen Taylor <otaylor@redhat.com>
|
Fri Oct 19 11:24:58 2001 Owen Taylor <otaylor@redhat.com>
|
||||||
|
|
||||||
* gtk/gtkmain.[ch] (gtk_disable_setlocale): Actually
|
* gtk/gtkmain.[ch] (gtk_disable_setlocale): Actually
|
||||||
|
@ -1,3 +1,8 @@
|
|||||||
|
Fri Oct 19 12:24:32 2001 Owen Taylor <otaylor@redhat.com>
|
||||||
|
|
||||||
|
* gdk/linux-fb/gdkfont-fb.c: Fix up for change to
|
||||||
|
Pango font API. #61933. (Untested, even for compilation.)
|
||||||
|
|
||||||
Fri Oct 19 11:24:58 2001 Owen Taylor <otaylor@redhat.com>
|
Fri Oct 19 11:24:58 2001 Owen Taylor <otaylor@redhat.com>
|
||||||
|
|
||||||
* gtk/gtkmain.[ch] (gtk_disable_setlocale): Actually
|
* gtk/gtkmain.[ch] (gtk_disable_setlocale): Actually
|
||||||
|
@ -1,3 +1,8 @@
|
|||||||
|
Fri Oct 19 12:24:32 2001 Owen Taylor <otaylor@redhat.com>
|
||||||
|
|
||||||
|
* gdk/linux-fb/gdkfont-fb.c: Fix up for change to
|
||||||
|
Pango font API. #61933. (Untested, even for compilation.)
|
||||||
|
|
||||||
Fri Oct 19 11:24:58 2001 Owen Taylor <otaylor@redhat.com>
|
Fri Oct 19 11:24:58 2001 Owen Taylor <otaylor@redhat.com>
|
||||||
|
|
||||||
* gtk/gtkmain.[ch] (gtk_disable_setlocale): Actually
|
* gtk/gtkmain.[ch] (gtk_disable_setlocale): Actually
|
||||||
|
@ -93,7 +93,7 @@ gdk_font_from_description (PangoFontDescription *desc)
|
|||||||
GdkFontPrivateFB *private;
|
GdkFontPrivateFB *private;
|
||||||
PangoFont *pango_font;
|
PangoFont *pango_font;
|
||||||
PangoContext *context;
|
PangoContext *context;
|
||||||
PangoFontMetrics metrics;
|
PangoFontMetrics *metrics;
|
||||||
PangoLanguage *lang;
|
PangoLanguage *lang;
|
||||||
|
|
||||||
g_return_val_if_fail (desc, NULL);
|
g_return_val_if_fail (desc, NULL);
|
||||||
@ -113,15 +113,14 @@ gdk_font_from_description (PangoFontDescription *desc)
|
|||||||
if (!pango_font)
|
if (!pango_font)
|
||||||
{
|
{
|
||||||
desc = pango_font_description_copy (desc);
|
desc = pango_font_description_copy (desc);
|
||||||
g_free (desc->family_name);
|
pango_font_description_set_family (desc, "sans");
|
||||||
desc->family_name = g_strdup ("sans");
|
|
||||||
pango_font = pango_context_load_font (context, desc);
|
pango_font = pango_context_load_font (context, desc);
|
||||||
if (!pango_font)
|
if (!pango_font)
|
||||||
{
|
{
|
||||||
desc->style = PANGO_STYLE_NORMAL;
|
pango_font_description_set_style (desc, PANGO_STYLE_NORMAL);
|
||||||
desc->weight = PANGO_WEIGHT_NORMAL;
|
pango_font_description_set_weight (desc, PANGO_WEIGHT_NORMAL);
|
||||||
desc->variant = PANGO_VARIANT_NORMAL;
|
pango_font_description_set_variant (desc, PANGO_VARIANT_NORMAL);
|
||||||
desc->stretch = PANGO_STRETCH_NORMAL;
|
pango_font_description_set_stretch (desc, PANGO_STRETCH_NORMAL);
|
||||||
pango_font = pango_context_load_font (context, desc);
|
pango_font = pango_context_load_font (context, desc);
|
||||||
}
|
}
|
||||||
pango_font_description_free (desc);
|
pango_font_description_free (desc);
|
||||||
@ -135,20 +134,20 @@ gdk_font_from_description (PangoFontDescription *desc)
|
|||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
metrics.ascent = 0;
|
|
||||||
metrics.descent = 0;
|
|
||||||
lang = pango_context_get_language (context);
|
lang = pango_context_get_language (context);
|
||||||
pango_font_get_metrics (pango_font, lang, &metrics);
|
metrics = pango_font_get_metrics (pango_font, lang);
|
||||||
|
|
||||||
private->pango_font = pango_font;
|
private->pango_font = pango_font;
|
||||||
|
|
||||||
g_free (lang);
|
g_free (lang);
|
||||||
g_object_unref (G_OBJECT (context));
|
g_object_unref (G_OBJECT (context));
|
||||||
|
|
||||||
font->ascent = PANGO_PIXELS (metrics.ascent);
|
font->ascent = PANGO_PIXELS (metrics->ascent);
|
||||||
font->descent = PANGO_PIXELS (metrics.descent);
|
font->descent = PANGO_PIXELS (metrics->descent);
|
||||||
|
|
||||||
g_assert ((font->ascent > 0) || (font->descent > 0));
|
g_assert ((font->ascent > 0) || (font->descent > 0));
|
||||||
|
|
||||||
|
pango_metrics_unref (metrics);
|
||||||
|
|
||||||
return font;
|
return font;
|
||||||
}
|
}
|
||||||
@ -453,7 +452,7 @@ gdk_font_from_description (PangoFontDescription *font_desc)
|
|||||||
{
|
{
|
||||||
g_return_val_if_fail (font_desc, NULL);
|
g_return_val_if_fail (font_desc, NULL);
|
||||||
|
|
||||||
return gdk_fb_bogus_font (PANGO_PIXELS (font_desc->size));
|
return gdk_fb_bogus_font (PANGO_PIXELS (pango_font_description_get_size (font_desc)));
|
||||||
}
|
}
|
||||||
|
|
||||||
GdkFont*
|
GdkFont*
|
||||||
|
Loading…
Reference in New Issue
Block a user