(try 2) gdi32: if a font substitution is given then only match tothat substitution not to the original family name.
Dmitry Timoshkov
dmitry at codeweavers.com
Wed Oct 8 20:08:16 CDT 2008
"Aric Stewart" <aric at codeweavers.com> wrote:
> diff --git a/dlls/gdi32/freetype.c b/dlls/gdi32/freetype.c
> index 145be9b..c427694 100644
> --- a/dlls/gdi32/freetype.c
> +++ b/dlls/gdi32/freetype.c
> @@ -3408,8 +3408,8 @@ GdiFont *WineEngCreateFontInstance(DC *dc, HFONT hfont)
> */
> LIST_FOR_EACH(family_elem_ptr, &font_list) {
> family = LIST_ENTRY(family_elem_ptr, Family, entry);
> - if (!strcmpiW(family->FamilyName, FaceName) ||
> - (psub && !strcmpiW(family->FamilyName, psub->to.name)))
> + if (( psub && !strcmpiW(family->FamilyName, psub->to.name)) ||
> + (!psub && !strcmpiW(family->FamilyName, FaceName)))
> {
> LIST_FOR_EACH(face_elem_ptr, &family->faces) {
> face = LIST_ENTRY(face_elem_ptr, Face, entry);
After loking at this change once more I think it's not correct. It will
lead to failures to find a font if there is a substitution but a face
specified by substitution doesn't exist. I'd suggest to test what Windows
does in that case, and if Windows allows to substitute existing faces
at all. Do you have a test cases which passes with your patch but doesn't
without it?
--
Dmitry.
More information about the wine-devel
mailing list