From cafe79a607e379f6392778fffc83538ef550833e Mon Sep 17 00:00:00 2001 From: Tor Lillqvist Date: Sat, 28 Sep 2002 11:58:20 +0000 Subject: Revert change from 2002-09-21: Don't bypass the code that automatically 2002-09-28 Tor Lillqvist * pango/pangowin32-fontmap.c (pango_win32_insert_font): Revert change from 2002-09-21: Don't bypass the code that automatically adds fonts to the families "monospace", "serif" and "sans". I thought it would be unnecessary if you have a pango.aliases that sets up aliases for these family names, but apparently not. Without this code, pango_layout_line_get_empty_extents() thinks empty lines have zero height, as it tries to use a font called "sans" for instance, and no aliases get used. --- ChangeLog | 11 +++++++++++ ChangeLog.pre-1-10 | 11 +++++++++++ ChangeLog.pre-1-2 | 11 +++++++++++ ChangeLog.pre-1-4 | 11 +++++++++++ ChangeLog.pre-1-6 | 11 +++++++++++ ChangeLog.pre-1-8 | 11 +++++++++++ pango/pangowin32-fontmap.c | 6 ++++-- 7 files changed, 70 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 7e768554..38758a71 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,14 @@ +2002-09-28 Tor Lillqvist + + * pango/pangowin32-fontmap.c (pango_win32_insert_font): Revert + change from 2002-09-21: Don't bypass the code that automatically + adds fonts to the families "monospace", "serif" and "sans". I + thought it would be unnecessary if you have a pango.aliases that + sets up aliases for these family names, but apparently + not. Without this code, pango_layout_line_get_empty_extents() + thinks empty lines have zero height, as it tries to use a font + called "sans" for instance, and no aliases get used. + Fri Sep 27 17:50:51 2002 Owen Taylor (Based on GTK+ patch by J. Ali Harlow in #87774) diff --git a/ChangeLog.pre-1-10 b/ChangeLog.pre-1-10 index 7e768554..38758a71 100644 --- a/ChangeLog.pre-1-10 +++ b/ChangeLog.pre-1-10 @@ -1,3 +1,14 @@ +2002-09-28 Tor Lillqvist + + * pango/pangowin32-fontmap.c (pango_win32_insert_font): Revert + change from 2002-09-21: Don't bypass the code that automatically + adds fonts to the families "monospace", "serif" and "sans". I + thought it would be unnecessary if you have a pango.aliases that + sets up aliases for these family names, but apparently + not. Without this code, pango_layout_line_get_empty_extents() + thinks empty lines have zero height, as it tries to use a font + called "sans" for instance, and no aliases get used. + Fri Sep 27 17:50:51 2002 Owen Taylor (Based on GTK+ patch by J. Ali Harlow in #87774) diff --git a/ChangeLog.pre-1-2 b/ChangeLog.pre-1-2 index 7e768554..38758a71 100644 --- a/ChangeLog.pre-1-2 +++ b/ChangeLog.pre-1-2 @@ -1,3 +1,14 @@ +2002-09-28 Tor Lillqvist + + * pango/pangowin32-fontmap.c (pango_win32_insert_font): Revert + change from 2002-09-21: Don't bypass the code that automatically + adds fonts to the families "monospace", "serif" and "sans". I + thought it would be unnecessary if you have a pango.aliases that + sets up aliases for these family names, but apparently + not. Without this code, pango_layout_line_get_empty_extents() + thinks empty lines have zero height, as it tries to use a font + called "sans" for instance, and no aliases get used. + Fri Sep 27 17:50:51 2002 Owen Taylor (Based on GTK+ patch by J. Ali Harlow in #87774) diff --git a/ChangeLog.pre-1-4 b/ChangeLog.pre-1-4 index 7e768554..38758a71 100644 --- a/ChangeLog.pre-1-4 +++ b/ChangeLog.pre-1-4 @@ -1,3 +1,14 @@ +2002-09-28 Tor Lillqvist + + * pango/pangowin32-fontmap.c (pango_win32_insert_font): Revert + change from 2002-09-21: Don't bypass the code that automatically + adds fonts to the families "monospace", "serif" and "sans". I + thought it would be unnecessary if you have a pango.aliases that + sets up aliases for these family names, but apparently + not. Without this code, pango_layout_line_get_empty_extents() + thinks empty lines have zero height, as it tries to use a font + called "sans" for instance, and no aliases get used. + Fri Sep 27 17:50:51 2002 Owen Taylor (Based on GTK+ patch by J. Ali Harlow in #87774) diff --git a/ChangeLog.pre-1-6 b/ChangeLog.pre-1-6 index 7e768554..38758a71 100644 --- a/ChangeLog.pre-1-6 +++ b/ChangeLog.pre-1-6 @@ -1,3 +1,14 @@ +2002-09-28 Tor Lillqvist + + * pango/pangowin32-fontmap.c (pango_win32_insert_font): Revert + change from 2002-09-21: Don't bypass the code that automatically + adds fonts to the families "monospace", "serif" and "sans". I + thought it would be unnecessary if you have a pango.aliases that + sets up aliases for these family names, but apparently + not. Without this code, pango_layout_line_get_empty_extents() + thinks empty lines have zero height, as it tries to use a font + called "sans" for instance, and no aliases get used. + Fri Sep 27 17:50:51 2002 Owen Taylor (Based on GTK+ patch by J. Ali Harlow in #87774) diff --git a/ChangeLog.pre-1-8 b/ChangeLog.pre-1-8 index 7e768554..38758a71 100644 --- a/ChangeLog.pre-1-8 +++ b/ChangeLog.pre-1-8 @@ -1,3 +1,14 @@ +2002-09-28 Tor Lillqvist + + * pango/pangowin32-fontmap.c (pango_win32_insert_font): Revert + change from 2002-09-21: Don't bypass the code that automatically + adds fonts to the families "monospace", "serif" and "sans". I + thought it would be unnecessary if you have a pango.aliases that + sets up aliases for these family names, but apparently + not. Without this code, pango_layout_line_get_empty_extents() + thinks empty lines have zero height, as it tries to use a font + called "sans" for instance, and no aliases get used. + Fri Sep 27 17:50:51 2002 Owen Taylor (Based on GTK+ patch by J. Ali Harlow in #87774) diff --git a/pango/pangowin32-fontmap.c b/pango/pangowin32-fontmap.c index 5f70f5d2..f919717a 100644 --- a/pango/pangowin32-fontmap.c +++ b/pango/pangowin32-fontmap.c @@ -442,6 +442,7 @@ pango_win32_font_map_load_font (PangoFontMap *fontmap, { PangoWin32Face *best_match = NULL; + PING (("got win32family")); tmp_list = win32family->font_entries; while (tmp_list) { @@ -460,13 +461,14 @@ 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)); + PING(("got best match:%s size=%d",best_match->logfont.lfFaceName,size)); while (tmp_list) { PangoWin32Font *win32font = tmp_list->data; if (win32font->size == size) { + PING (("size matches")); result = (PangoFont *)win32font; g_object_ref (G_OBJECT (result)); @@ -771,7 +773,7 @@ pango_win32_insert_font (PangoWin32FontMap *win32fontmap, font_family->font_entries = g_slist_append (font_family->font_entries, win32face); win32fontmap->n_fonts++; -#if 0 /* Use pango.aliases instead */ +#if 1 /* Thought pango.aliases would make this code unnecessary, but no. */ /* * There are magic family names coming from the X implementation. * They can be simply mapped to lfPitchAndFamily flag of the logfont -- cgit v1.2.1