03-17-2024, 08:28 AM | #76 |
Sigil Developer
Posts: 8,116
Karma: 5450818
Join Date: Nov 2009
Device: many
|
It is unexpected (to me) that PageEdit did not crash. It uses the woff and woff2 fonts in *exactly* the same place and way as Sigil's Preview does. It should have crashed as well.
That is strange. Perhaps the high dpi Qt Windows code is not active with PageEdit? Can anyone else verify that PageEdit 2.0.2 does not crash when loading the test epub with woff and woff2 fonts, when fractional dpi scaling is used? Last edited by KevinH; 03-17-2024 at 08:38 AM. |
03-17-2024, 08:51 AM | #77 |
Sigil Developer
Posts: 8,116
Karma: 5450818
Join Date: Nov 2009
Device: many
|
What is even more strange is that I thought the need to set HighDPI for Windows went completely away for all Qt6.
Those setting should be meaningless unless the environment variable versions of these switches still have an impact. |
Advert | |
|
03-17-2024, 08:58 AM | #78 |
Grand Sorcerer
Posts: 27,992
Karma: 199001268
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
It has. The only thing that can be done is disabling the automatic scaling with a Qt environment variable. All highdpi code fiddling is disabled on Windows after Qt6 in Sigil and Pagedit.
|
03-17-2024, 09:54 AM | #79 | |
Junior Member
Posts: 4
Karma: 10
Join Date: Mar 2024
Device: none
|
Quote:
Thank you so much, Kevin! Here, with this version, I was able to open all epubs with the woff font. |
|
03-17-2024, 09:56 AM | #80 |
Sigil Developer
Posts: 8,116
Karma: 5450818
Join Date: Nov 2009
Device: many
|
Thank you for your bug report.
|
Advert | |
|
03-17-2024, 10:04 AM | #81 |
Sigil Developer
Posts: 8,116
Karma: 5450818
Join Date: Nov 2009
Device: many
|
After looking at the new qt environment vars that come into play with fractional scaling, could it be that the rounding policy (none, up,ceil, floor, 75% level) is causing the issue as font ascents, descents, and spacing might underfow or overflow depending on the active rounding policy?
Very strange that PageEdit is okay with woff fonts, with fractional dpi with directwrite, unless it somehow defaulted to the gdi backend? I am not sure where in the Windows font related code that the font engine to use is determined. |
03-17-2024, 11:51 AM | #82 |
Grand Sorcerer
Posts: 27,992
Karma: 199001268
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
Is it the fact that PageEdit doesn't have ResourceObjects? Specifically the FontResource object? I'm assuming that gets touched whenever Sigil launches an epub with embedded fonts, but perhaps I'm wrong. Does PageEdit have the same QRawFont/QFont calls to get font descriptions in different source code locations than Sigil?
Last edited by DiapDealer; 03-17-2024 at 11:55 AM. |
03-17-2024, 12:19 PM | #83 |
Sigil Developer
Posts: 8,116
Karma: 5450818
Join Date: Nov 2009
Device: many
|
That makes sense. There are no font resource objects at all in PageEdit. And in Sigil FontResource::GetDescription() is used to set Sigil's BookBrowser tooltip for every font. My guess is that the FontResource::GetDescription call to get font family information is what triggers the crash with woff / woff2 fonts on Windows.
The only other place calls like that happen is in the FontTab itself. I wonder if we comment out the call to GetDescription in the MainUI/OPFModel.cpp to set that tooltip for BookBrowser fonts, if the crash would go away (assuming there are no Font Tabs open in the TabManager). That would help us narrow down the problem. Maybe when you have some free time we could try that. |
03-17-2024, 12:27 PM | #84 |
Grand Sorcerer
Posts: 27,992
Karma: 199001268
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
I'll test it it out. I won''t have access to the test laptop until tomorrow, but I can get a version of Sigil ready to test the theory.
|
03-17-2024, 12:38 PM | #85 |
Sigil Developer
Posts: 8,116
Karma: 5450818
Join Date: Nov 2009
Device: many
|
Great. Thanks.
|
03-17-2024, 05:37 PM | #86 |
null operator (he/him)
Posts: 20,964
Karma: 27620690
Join Date: Mar 2012
Location: Sydney Australia
Device: none
|
Thought I was bringing good news, not another can of worms.
FTR - I dont have any QT related EnvVars. BR |
04-03-2024, 10:03 AM | #87 |
Member
Posts: 10
Karma: 10
Join Date: Apr 2023
Device: Kindle Fire
|
I'm the original poster of this thread.
I just updated my Sigil to 2.1.0 Qt 6.6.2 (because the start-up message nagged me to do so :-) And my reported issue is fixed. Sigil now successfully opens an .epub containing .woff fonts, and I'm able to add a .woff font as well. Thanks to all who responded and! who apparently reached into Sigil's guts and fixed something. Thanks, Jon PS I suppose my Windows 11 Pro, now at 10.0.22621 Build 2506 may have contributed to the solution, but I'm glad to give you guys the credit. I don't know what version I had back in September and I don't know when 10.0.22621 arrived. |
04-03-2024, 04:03 PM | #88 | |
Bibliophagist
Posts: 40,013
Karma: 154919858
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Libra Colour, Lenovo M8 FHD, Paperwhite 4, Tolino epos
|
Quote:
The Windows 22H2 build 22621.2506 build was released to GA on 2023-Oct-26. The latest 22H2 build in GA would be 22621.3374 released on 2024-mar-26. Last edited by DNSB; 04-03-2024 at 04:08 PM. Reason: Added 22H2 build information |
|
04-03-2024, 05:32 PM | #89 |
Grand Sorcerer
Posts: 27,992
Karma: 199001268
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
It was definitely a Qt bug. They quickly fixed the crash after Kevin put together a test program that clearly produced the crash.
The crash fix still won't show the font family name of woff/woff2 fonts in book browser tooltips or font tabs. If you use woff fonts a lot, you may wish to force Sigil to use our patched qt freetype font engine by setting the SIGIL_USE_FREETYPE_FONTENGINE. You can set it to any value. After restarting Sigil (and maybe your machine depending on how the environment variable was set), you should see the font family names of woff/woff2 fonts show up where they should. We didn't want to force a non-default qt font backend on everyone (on Windows) for such a piddly issue that won't affect many people. |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Libra 2 Installing Custom Fonts | BookCat | Kobo Reader | 41 | 04-05-2022 09:01 AM |
Installing fonts | Pajamaman | KOReader | 6 | 09-05-2020 02:06 PM |
Installing Tamil Fonts on SnPRS - T2 | Raman | Sony Reader | 3 | 01-12-2013 11:54 AM |
Installing Tamil Fonts on Kindle 4.1.0 | sriramvenkatesan | Amazon Kindle | 14 | 10-22-2012 10:45 AM |
PRS-T1 Still have a problem with installing fonts in my device | hamedavatar | Sony Reader | 5 | 06-21-2012 05:46 PM |