summaryrefslogtreecommitdiff
path: root/pango
diff options
context:
space:
mode:
authorTor Lillqvist <tml@iki.fi>2002-01-01 23:54:42 +0000
committerTor Lillqvist <tml@src.gnome.org>2002-01-01 23:54:42 +0000
commitd8b05c154f40f332785239fb292ea09caa4dfb1b (patch)
tree346ae38a344aac33ac14d3a3f40fdb4d65c836e6 /pango
parent2210a8aa8286f7af2e1a17354e9b027a1f669867 (diff)
downloadpango-d8b05c154f40f332785239fb292ea09caa4dfb1b.tar.gz
Silence gcc -Wall, initialise a couple of variables.
2002-01-02 Tor Lillqvist <tml@iki.fi> * pango/pangowin32.c (pango_win32_render_layout_line): Silence gcc -Wall, initialise a couple of variables. * pango/pangowin32-fontmap.c: (pango_win32_insert_font): Store "courier new" also under the name "courier", as that is what gtk-demo (and presumably often other applications, too?) looks for.
Diffstat (limited to 'pango')
-rw-r--r--pango/pangowin32-fontcache.c2
-rw-r--r--pango/pangowin32-fontmap.c14
-rw-r--r--pango/pangowin32.c4
3 files changed, 17 insertions, 3 deletions
diff --git a/pango/pangowin32-fontcache.c b/pango/pangowin32-fontcache.c
index 2986a33b..9d71d738 100644
--- a/pango/pangowin32-fontcache.c
+++ b/pango/pangowin32-fontcache.c
@@ -206,7 +206,7 @@ pango_win32_font_cache_load (PangoWin32FontCache *cache,
if (hfont != NULL)
{
- PING (("Success!\n"));
+ PING (("Success!"));
break;
}
diff --git a/pango/pangowin32-fontmap.c b/pango/pangowin32-fontmap.c
index 4488f87f..31a945d6 100644
--- a/pango/pangowin32-fontmap.c
+++ b/pango/pangowin32-fontmap.c
@@ -444,6 +444,8 @@ pango_win32_font_map_load_font (PangoFontMap *fontmap,
name = g_ascii_strdown (pango_font_description_get_family (description), -1);
+ PING(("name=%s", name));
+
win32family = g_hash_table_lookup (win32fontmap->families, name);
if (win32family)
{
@@ -467,6 +469,8 @@ pango_win32_font_map_load_font (PangoFontMap *fontmap,
GSList *tmp_list = best_match->cached_fonts;
gint size = pango_font_description_get_size (description);
+ PING(("got best match:%s",best_match->logfont.lfFaceName));
+
while (tmp_list)
{
PangoWin32Font *win32font = tmp_list->data;
@@ -487,6 +491,7 @@ pango_win32_font_map_load_font (PangoFontMap *fontmap,
{
PangoWin32Font *win32font;
+ PING((""));
win32font = pango_win32_font_new (fontmap, &best_match->logfont, size);
win32font->fontmap = fontmap;
win32font->entry = best_match;
@@ -842,6 +847,15 @@ pango_win32_insert_font (PangoWin32FontMap *win32fontmap,
break;
}
+ /* Some other magic names */
+
+ /* Recognize just "courier" for "courier new" */
+ if (g_ascii_strcasecmp (win32face->logfont.lfFaceName, "courier new") == 0)
+ {
+ font_family = pango_win32_get_font_family (win32fontmap, "courier");
+ font_family->font_entries = g_slist_append (font_family->font_entries, win32face);
+ win32fontmap->n_fonts++;
+ }
}
/* Given a LOGFONT and size, make a matching LOGFONT corresponding to
diff --git a/pango/pangowin32.c b/pango/pangowin32.c
index e444e179..2ed7d555 100644
--- a/pango/pangowin32.c
+++ b/pango/pangowin32.c
@@ -543,8 +543,8 @@ pango_win32_render_layout_line (HDC hdc,
while (tmp_list)
{
- HBRUSH oldfg;
- HBRUSH brush;
+ HBRUSH oldfg = NULL;
+ HBRUSH brush = NULL;
POINT points[2];
PangoUnderline uline = PANGO_UNDERLINE_NONE;
PangoLayoutRun *run = tmp_list->data;