[=PATCH v5 1/2] gdi32: In AddFaceToList allow fonts with long names and add tests
Fabian Maurer
dark.shadow4 at web.de
Sun Nov 26 06:28:01 CST 2017
> > diff --git a/dlls/gdi32/freetype.c b/dlls/gdi32/freetype.c
> > index 346e21dc21..8be1bfe22e 100644
> > --- a/dlls/gdi32/freetype.c
> > +++ b/dlls/gdi32/freetype.c
> > @@ -1571,6 +1571,9 @@ static BOOL insert_face_in_family_list( Face *face,
> > Family *family )>
> > face->family = family;
> > family->refcount++;
> > face->refcount++;
> >
> > + /* GDI32 can't deal with long names, truncate them */
> > + if (face->FullName && lstrlenW(face->FullName) > LF_FACESIZE - 1)
> > + face->FullName[LF_FACESIZE - 1] = 0;
>
> Shouldn't this be LF_FULLFACESIZE ?
No,
because later in gdi32/freetye.c/freetype_SelectFont:
"strcmpiW(face->FullName, FaceName)"
where "LOGFONTW lf;" and "LPWSTR FaceName = lf.lfFaceName;"
So it's actually limited by LF_FACESIZE.
Regards,
Fabian Maurer
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.winehq.org/pipermail/wine-devel/attachments/20171126/a7fe6dc1/attachment.html>
More information about the wine-devel
mailing list