[PATCH] GDI32: accept TTF-fonts without OS2 table

Wolfgang Walter wine at stwm.de
Tue Nov 13 07:41:23 CST 2018


Am Sonntag, 11. November 2018, 21:49:33 schrieben Sie:
> On 11/9/18 4:24 PM, Wolfgang Walter wrote:
> > Signed-off-by: Wolfgang Walter <wine at stwm.de>
> > ---
> > 
> > fonst partially embedded in PDFs often do not contain an OS2 table.
> > Wine did not accept these fonts and uses another fonts as replacement
> > This leads often to completely unreadable documents as the glyp index does
> > not match the one of the choosen replacement font.
> > 
> > This patch accepts such fonts and inserts checks where wine assumed
> > that the OS2 table does exist.
> 
> I tested with a randomly selected font with OS/2 table removed. Windows
> font utility installs it just fine, I sent a fix for directwrite side of
> this [1].
> 
> For gdi32 I think we'll need something similar, to fill metrics using
> available tables.
> 

I'm not sure what you mean by that.

Do you think that in dlls/gdi32/freetype.c the function 
get_outline_text_metrics should handle the missing OS2 table?

I'm afraid I do not have enough knowledge of truetype fonts to change 
get_outline_text_metrics() in such a way.

With my patch get_outline_text_metrics() fails, but GetEnumStructs() could 
already handle that and seems get all needed values from somewhere else. Maybe 
the freetype library already extracts everythings it can from the other table.

All other places calling get_outline_text_metrics() also already handle that 
case.

Regards,
-- 
Wolfgang Walter
Studentenwerk München
Anstalt des öffentlichen Rechts



More information about the wine-devel mailing list