[Bug 43956] New: GDI+ is unable to load some truetype fonts
https://bugs.winehq.org/show_bug.cgi?id=43956 Bug ID: 43956 Summary: GDI+ is unable to load some truetype fonts Product: Wine Version: 2.19 Hardware: x86-64 OS: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: gdiplus Assignee: wine-bugs(a)winehq.org Reporter: jp-dev(a)inbox.ru Distribution: --- My GDI+ program is unable to load a certain font when it runs under Wine. I have written a smaller test program, and the font which fails under Wine was able to load under Windows XP. The test program uses the GdipPrivateAddFontFile API, whereas my program where I first met the bug used GdipPrivateAddMemoryFont. In both cases, it is the same error, a GpStatus 3 is returned, the enumeration value OutOfMemory. I attach the problematic font file to this bug report. I an using wine-staging 2.19. -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=43956 --- Comment #1 from JP Cimalando <jp-dev(a)inbox.ru> --- Created attachment 59599 --> https://bugs.winehq.org/attachment.cgi?id=59599 A test program -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=43956 --- Comment #2 from JP Cimalando <jp-dev(a)inbox.ru> --- Created attachment 59600 --> https://bugs.winehq.org/attachment.cgi?id=59600 font file not loadable by GDI+ (OFL license) -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=43956 JP Cimalando <jp-dev(a)inbox.ru> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jp-dev(a)inbox.ru -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=43956 --- Comment #3 from JP Cimalando <jp-dev(a)inbox.ru> --- The root of the problem seems to be ERROR_INSUFFICIENT_BUFFER (122) returned by MultiByteToWideChar. It's located in copy_name_table_string in gdiplus/font.c line 1415, under the TT_PLATFORM_MACINTOSH case. -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=43956 Fabian Maurer <dark.shadow4(a)web.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |download, source, testcase CC| |dark.shadow4(a)web.de Ever confirmed|0 |1 Status|UNCONFIRMED |NEW --- Comment #4 from Fabian Maurer <dark.shadow4(a)web.de> --- You're right, this is very odd. Thanks for the detailed bug report, always appreciate test cases like this. Is there other fonts with the same problem, or was this the only one you found? -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=43956 --- Comment #5 from JP Cimalando <jp-dev(a)inbox.ru> --- I don't have another font which fails like this one. Running file on it reveals it's a "macintosh" font, I have no idea myself what this means but it seems relevant. This font is an output of fontforge and you can find the source at this address. https://github.com/jpcima/lcd-font -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=43956 --- Comment #6 from JP Cimalando <jp-dev(a)inbox.ru> --- Increasing the size of the buffer WCHAR[32] in GdipPrivateAddMemoryFont apparently fixes the problem. I doubled it to 64. -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=43956 --- Comment #7 from Nikolay Sivov <bunglehead(a)gmail.com> --- The issue is likely because we rely on gdi32 too much in font handling, especially for private fonts. 32 stands for LF_FACESIZE, which is a name length limit for LOGFONT structure. We probably should make it dynamic. -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=43956 --- Comment #8 from Fabian Maurer <dark.shadow4(a)web.de> --- Created attachment 59606 --> https://bugs.winehq.org/attachment.cgi?id=59606 Edited font with insanely long name Definitely need to make it dynamic. Attached a font with really long name, it needs a buffer of ~3300 to work. On windows it works fine though. -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=43956 --- Comment #9 from Fabian Maurer <dark.shadow4(a)web.de> --- Created attachment 59614 --> https://bugs.winehq.org/attachment.cgi?id=59614 Patch to allow fonts with long names Attached a patch to address this issue. Still needs a bit more testing though. -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=43956 --- Comment #10 from Fabian Maurer <dark.shadow4(a)web.de> --- Sent in a patch: https://source.winehq.org/patches/data/138506 -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=43956 --- Comment #11 from Fabian Maurer <dark.shadow4(a)web.de> --- Sent in another round of patches. The issue lies also with gdi32, that can't deal with those long names. The current patchset has one patch to deal with those gdi32 issues and the other for the gdiplus problem. -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=43956 Fabian Maurer <dark.shadow4(a)web.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Fixed by SHA1| |89366f740f1e3629a58711057af | |ba39681a07ad6 Resolution|--- |FIXED Status|NEW |RESOLVED --- Comment #12 from Fabian Maurer <dark.shadow4(a)web.de> --- Fixed with 89366f740f1e3629a58711057afba39681a07ad6. -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=43956 Alexandre Julliard <julliard(a)winehq.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED --- Comment #13 from Alexandre Julliard <julliard(a)winehq.org> --- Closing bugs fixed in 3.0-rc1. -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=43956 Michael Stefaniuc <mstefani(a)winehq.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Target Milestone|--- |2.0.x -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=43956 Michael Stefaniuc <mstefani(a)winehq.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Target Milestone|2.0.x |--- --- Comment #14 from Michael Stefaniuc <mstefani(a)winehq.org> --- Removing the 2.0.x milestone from bugs included in 2.0.5. -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
participants (1)
-
wine-bugs@winehq.org