gdi32: Search the child font list first.
Dmitry Timoshkov
dmitry at codeweavers.com
Mon Oct 27 02:59:53 CDT 2008
This patch should fix the regression reported in the bug 15692.
---
dlls/gdi32/freetype.c | 14 ++++++++++++++
1 files changed, 14 insertions(+), 0 deletions(-)
diff --git a/dlls/gdi32/freetype.c b/dlls/gdi32/freetype.c
index 9692450..313e625 100644
--- a/dlls/gdi32/freetype.c
+++ b/dlls/gdi32/freetype.c
@@ -3114,6 +3114,19 @@ static GdiFont *find_in_cache(HFONT hfont, const LOGFONTW *plf, const FMAT2 *pma
fd.can_use_bitmap = can_use_bitmap;
calc_hash(&fd);
+ /* try the child list */
+ LIST_FOR_EACH(font_elem_ptr, &child_font_list) {
+ ret = LIST_ENTRY(font_elem_ptr, struct tagGdiFont, entry);
+ if(!fontcmp(ret, &fd)) {
+ if(!can_use_bitmap && !FT_IS_SCALABLE(ret->ft_face)) continue;
+ LIST_FOR_EACH(hfontlist_elem_ptr, &ret->hfontlist) {
+ hflist = LIST_ENTRY(hfontlist_elem_ptr, struct tagHFONTLIST, entry);
+ if(hflist->hfont == hfont)
+ return ret;
+ }
+ }
+ }
+
/* try the in-use list */
LIST_FOR_EACH(font_elem_ptr, &gdi_font_list) {
ret = LIST_ENTRY(font_elem_ptr, struct tagGdiFont, entry);
@@ -5340,6 +5353,7 @@ static BOOL load_child_font(GdiFont *font, CHILD_FONT *child)
return FALSE;
}
+ child->font->font_desc = font->font_desc;
child->font->ntmFlags = child->face->ntmFlags;
child->font->orientation = font->orientation;
child->font->scale_y = font->scale_y;
--
1.6.0.2
More information about the wine-patches
mailing list