Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Sigil

Notices

Reply
 
Thread Tools Search this Thread
Old 09-25-2023, 06:38 PM   #1
jreckard
Member
jreckard began at the beginning.
 
Posts: 10
Karma: 10
Join Date: Apr 2023
Device: Kindle Fire
Installing woff fonts

New-to-Sigil question.
I downloaded some .woff fonts and I don't know how to install them.
.woff is not a recognized extension for my PC - Windows 11 Pro, up-to-date version.
When I try to add a .woff font to a Sigil .epub, Sigil crashes. I've successfully added .ttf fonts in Sigil.

I realize that this is probably a Windows question, rather than a Sigil one, but maybe somebody has encountered this before?

Thanks for any help.
Jon
jreckard is offline   Reply With Quote
Old 09-25-2023, 06:49 PM   #2
KevinH
Sigil Developer
KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.
 
Posts: 7,647
Karma: 5433388
Join Date: Nov 2009
Device: many
Sigil should never crash. How exactly (what sequence of steps) are you using to add a woff font to an epub that causes the crash in Sigil?

Please be as specific as possible so that we can recreate your crash on our machines.

Does this happen with only a specific woff font or all of them?
Does this happen with woff2 fonts as well?

What exact version of Sigil are you using?

Can you create a test epub with that font inside that we can use to test with.

Also please post any crash report from Sigil.

Last edited by KevinH; 09-25-2023 at 06:59 PM.
KevinH is offline   Reply With Quote
Advert
Old 09-25-2023, 09:36 PM   #3
DiapDealer
Grand Sorcerer
DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.
 
DiapDealer's Avatar
 
Posts: 27,552
Karma: 193191846
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
Didn't we specifically add some .woff support? Or am I thinking of .webp images?
DiapDealer is offline   Reply With Quote
Old 09-25-2023, 09:41 PM   #4
KevinH
Sigil Developer
KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.
 
Posts: 7,647
Karma: 5433388
Join Date: Nov 2009
Device: many
Both .woff and .woff2 fonts have long been supported in Chrome. We added those mediatypes long ago. It should just work as .woff and .woff2 fonts are basically just compressed ttf fonts with extra metadata and license info stored inside (with woff2 just using a better compression algorithm) according to a google search I just ran.

I tried a .woff font file a long time back with Sigil and no problems. Not sure if this is specific to Qt 6.5.2 or to something else that changed.

Last edited by KevinH; 09-26-2023 at 09:49 AM.
KevinH is offline   Reply With Quote
Old 09-25-2023, 09:52 PM   #5
KevinH
Sigil Developer
KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.
 
Posts: 7,647
Karma: 5433388
Join Date: Nov 2009
Device: many
Just searched all of QtBugs for woff and woff2 bug reports and there are no recent bugs that have not already been long fixed before Qt 6.5.2 and even Qt 5.8 timeline.

So it does not appear to be a Qt issue.

A corrupted font file might cause a crash in Qt code though.
KevinH is offline   Reply With Quote
Advert
Old 09-25-2023, 10:11 PM   #6
KevinH
Sigil Developer
KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.
 
Posts: 7,647
Karma: 5433388
Join Date: Nov 2009
Device: many
Okay, I searched and found my .woff epub testcase that someone (Doitsu? - I think Waste Land by TS Elliott is public domain in the US) sent me one time and fired it up and no problems at all. Font was properly displayed. Sigil had no problem with it.

So I am not sure what is going on.

If it is public domain, I would be happy to post it here if others would like to test on Windows or Linux and report back.

Last edited by KevinH; 09-26-2023 at 10:19 AM.
KevinH is offline   Reply With Quote
Old 09-26-2023, 11:31 AM   #7
jreckard
Member
jreckard began at the beginning.
 
Posts: 10
Karma: 10
Join Date: Apr 2023
Device: Kindle Fire
It's Windows

Thanks for all your replies. Sorry I wasn't more clear.
My solution, I think, will be in finding out how to get *Windows* to recognize the .woff extension. I'm sure Sigil is fine - I was pointed to these fonts by someone who had installed them in one of her .epubs.

I downloaded a .zip file from {somewhere}. Within this .zip file are several .ttf files, which Windows Explorer displays alongside its icon (an "A" inside a "page"). (Sorry, I don't know how to include a .jpg to show what it looks like)
In this same .zip file are several .woff files, but their icon is a plain, empty "page" icon.
In Control Panel\Appearance and Personalization\Fonts, I cannot see how to *add* a font. Also in that view, I am unable to show the font file's extension (in all other Explorer windows, there are no hidden extensions) so I can only assume that my existing fonts are .ttf's.

Does anyone know how to persuade Windows 11 that a .woff is, indeed, an actual font file?
jreckard is offline   Reply With Quote
Old 09-26-2023, 01:09 PM   #8
KevinH
Sigil Developer
KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.
 
Posts: 7,647
Karma: 5433388
Join Date: Nov 2009
Device: many
So no crash? You said Sigil crashed. That is not something to claim if it doesn't happen.

Does this have anything at all to do with Sigil?

Why would you care if Windows recognizes the extension as a font? You just embed the font file (and add css) inside the epub.
KevinH is offline   Reply With Quote
Old 09-26-2023, 01:45 PM   #9
jreckard
Member
jreckard began at the beginning.
 
Posts: 10
Karma: 10
Join Date: Apr 2023
Device: Kindle Fire
OK, yes, Sigil 2.0.0 crashed, Loaded Qt: 6.5.2
I guess I could understand a crash if it presumed on some underlying Windows feature; this is why I've suspected a Windows limitation. Of course, it would be nice if Sigil told me "Nope, can't do it", but ...

I right-click on the Fonts folder, select "Add Existing Files...", navigate to and select an unzipped .woff file (which is an unrecognized file extension), click on Open. My pointer turns to an hourglass for five or six seconds, then Sigil goes away. I've tried with two different .epub's.
jreckard is offline   Reply With Quote
Old 09-26-2023, 02:07 PM   #10
jreckard
Member
jreckard began at the beginning.
 
Posts: 10
Karma: 10
Join Date: Apr 2023
Device: Kindle Fire
Maybe nobody is willing to try, but ... in order to try to duplicate my scenario, maybe you could delete (?) .woff as a known file type ... but don't ask *me* how to do that! :-(

fyi, in regedit, I find .ttf in various places, including HKEY_CLASSES_ROOT\SystemFileAssociations\
but no .woff anywhere, except in a few "recent" contexts, what with all my searching and trying things.

Also, by the way, in Calibre 6.21, it looks like I can install only .ttf and .otf fonts.
jreckard is offline   Reply With Quote
Old 09-26-2023, 03:08 PM   #11
Doitsu
Grand Sorcerer
Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.
 
Doitsu's Avatar
 
Posts: 5,584
Karma: 22735033
Join Date: Dec 2010
Device: Kindle PW2
@KevinH
I extracted Noto Sans .woff and .woff2 fonts from a Noto Sans NPM package and had no problems adding .woff and woff2 fonts to new epub2 books.

@jreckard
If you took the .woff fonts from a commercial .epub file, they might be obfuscated.
If you open .woff or .woff2 files with a hex editor or Notepad++, the first 4 characters should be wOFF and wOF2.
Doitsu is offline   Reply With Quote
Old 09-26-2023, 03:48 PM   #12
KevinH
Sigil Developer
KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.
 
Posts: 7,647
Karma: 5433388
Join Date: Nov 2009
Device: many
Quote:
Originally Posted by jreckard View Post
OK, yes, Sigil 2.0.0 crashed, Loaded Qt: 6.5.2
...
I right-click on the Fonts folder, select "Add Existing Files...", navigate to and select an unzipped .woff file (which is an unrecognized file extension), click on Open. My pointer turns to an hourglass for five or six seconds, then Sigil goes away. I've tried with two different .epub's.
woff /woff2 files are not zips. They have their own compression algorithm.

I just extracted a number of non-obfuscated woff fonts from a test epub. I was able to exactly duplicate your sequence of steps and never had an issue using Add Existing to add woff font files.

So whatever is happening is something specific to your machine or setup. Or as Doitsu said, your font may be obfuscated (or it may just be corrupt) and something on your system is probably trying to preview the font file and that is what crashes.

Please verify the fonts are not obfuscated by running the test that Doitsu recommended.
KevinH is offline   Reply With Quote
Old 09-26-2023, 04:32 PM   #13
DNSB
Bibliophagist
DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.
 
DNSB's Avatar
 
Posts: 35,464
Karma: 145525534
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Forma, Clara HD, Lenovo M8 FHD, Paperwhite 4, Tolino epos
For what it's worth, AFAIK, Windows 10/11 out of the box do not—currently—recognize woff/woff2 fonts as fonts. You can use them in web browsers, applications, etc. but not in Windows itself. You can convert a woff/woff2 font to TTF/OTF for use by Windows.

For instance, I can download Noto Serif in woff2 and it works as a font to embed in Sigil but I can't use it directly in Windows.

Last edited by DNSB; 09-26-2023 at 04:35 PM. Reason: Correct Noto Sans to Noto Serif
DNSB is offline   Reply With Quote
Old 09-26-2023, 05:08 PM   #14
jreckard
Member
jreckard began at the beginning.
 
Posts: 10
Karma: 10
Join Date: Apr 2023
Device: Kindle Fire
Thanks again, all.
I tried another download - this time GentiumBookPlus.woff from https://en.bestfonts.pro/font/gentium-book-plus
(not zipped)
Crashed again.

Notepad++ shows the first four characters are "wOFF".

It appears that everyone who has (gratefully!) replied has .woff as an installed "known" file extension.
I'd like to get that nailed down. I don't know what forum would be appropriate for that. Maybe I could try Dell.

Dell Vostro 7620 x64-based, purchased new June 2023. Windows 11 Pro 10.0.22621
jreckard is offline   Reply With Quote
Old 09-26-2023, 05:21 PM   #15
DNSB
Bibliophagist
DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.
 
DNSB's Avatar
 
Posts: 35,464
Karma: 145525534
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Forma, Clara HD, Lenovo M8 FHD, Paperwhite 4, Tolino epos
Why are you insisting on installing woff fonts in Windows which is not possible when you can simply add the .woff/.woff2 font file to an epub by right clicking on Fonts in Sigil and browsing to the font file which does work and work well.
DNSB is offline   Reply With Quote
Reply


Forum Jump

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


All times are GMT -4. The time now is 02:28 PM.


MobileRead.com is a privately owned, operated and funded community.