Signed-off-by: Wolfgang Walter wine@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.
Regards,
On 11/9/18 4:24 PM, Wolfgang Walter wrote:
Signed-off-by: Wolfgang Walter wine@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.
Regards,
Hi, Wolfgang.
Thanks for the patch. Could you also open a bug report with a sample PDF and viewer application that you're fixing?
I'm interested in adding some tests for that case, for directwrite too.
Hello Nikolay!
On Friday, 9 November 2018 18:45:50 CET you wrote:
On 11/9/18 4:24 PM, Wolfgang Walter wrote:
Signed-off-by: Wolfgang Walter wine@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.
Regards,
Hi, Wolfgang.
Thanks for the patch. Could you also open a bug report with a sample PDF and viewer application that you're fixing?
I'm interested in adding some tests for that case, for directwrite too.
Sorry, I can't do that: the software is proprietary and I therefor cannot upload it. It is an ERP-software with an integrated PDF-viewer. This software is used by most of Germany's Studentenwerke.
I also can't provide the PDFs though I have > 100000 of them. They all contain personal data as they are confirmations of enrollment of the Technical University of Munich. I'll see if I can get one from the University generated from fake data but I don't know if they will do that for me.
Regards,
On 11/10/18 2:11 AM, Wolfgang Walter wrote:
Hello Nikolay!
On Friday, 9 November 2018 18:45:50 CET you wrote:
On 11/9/18 4:24 PM, Wolfgang Walter wrote:
Signed-off-by: Wolfgang Walter wine@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.
Regards,
Hi, Wolfgang.
Thanks for the patch. Could you also open a bug report with a sample PDF and viewer application that you're fixing?
I'm interested in adding some tests for that case, for directwrite too.
Sorry, I can't do that: the software is proprietary and I therefor cannot upload it. It is an ERP-software with an integrated PDF-viewer. This software is used by most of Germany's Studentenwerke.
I also can't provide the PDFs though I have > 100000 of them. They all contain personal data as they are confirmations of enrollment of the Technical University of Munich. I'll see if I can get one from the University generated from fake data but I don't know if they will do that for me.
Ok, I understand. Do you know if it's using AddFontMemResourceEx()? (should be visible with +font log).
Regarding documents, if fonts they are using are freely to distribute, it would be enough if you extracted font blob from one of them.
If it's not possible, do you know which tables are still there in embedded font?
Regards,
Am Samstag, 10. November 2018, 08:13:40 schrieb Nikolay Sivov:
On 11/10/18 2:11 AM, Wolfgang Walter wrote:
Hello Nikolay!
On Friday, 9 November 2018 18:45:50 CET you wrote:
On 11/9/18 4:24 PM, Wolfgang Walter wrote:
Signed-off-by: Wolfgang Walter wine@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.
Regards,
Hi, Wolfgang.
Thanks for the patch. Could you also open a bug report with a sample PDF and viewer application that you're fixing?
I'm interested in adding some tests for that case, for directwrite too.
Sorry, I can't do that: the software is proprietary and I therefor cannot upload it. It is an ERP-software with an integrated PDF-viewer. This software is used by most of Germany's Studentenwerke.
I also can't provide the PDFs though I have > 100000 of them. They all contain personal data as they are confirmations of enrollment of the Technical University of Munich. I'll see if I can get one from the University generated from fake data but I don't know if they will do that for me.
Ok, I understand. Do you know if it's using AddFontMemResourceEx()? (should be visible with +font log).
I'll look at that.
Regarding documents, if fonts they are using are freely to distribute, it would be enough if you extracted font blob from one of them.
It is not a free font.
The font in the PDF contains only those characters used in the document, so I suppose it is created on the fly when the PDF is created.
If it's not possible, do you know which tables are still there in embedded font?
As they pass (in function new_ft_face of dlls/gdi32/freetype.c) this code:
if (!pFT_Get_Sfnt_Table( ft_face, ft_sfnt_hhea ) || !pFT_Get_Sfnt_Table( ft_face, ft_sfnt_head )) { TRACE("Font %s/%p lacks either an HHEA or HEAD table.\n" "Skipping this font.\n", debugstr_a(file), font_data_ptr); goto fail; }
They must have
ft_sfnt_hhea ft_sfnt_head
Regards,
On 11/9/18 4:24 PM, Wolfgang Walter wrote:
Signed-off-by: Wolfgang Walter wine@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.
Regards,
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@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,