Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Sigil

Notices

Reply
 
Thread Tools Search this Thread
Old Yesterday, 11:16 AM   #1
Vanguard3000
Groupie
Vanguard3000 ought to be getting tired of karma fortunes by now.Vanguard3000 ought to be getting tired of karma fortunes by now.Vanguard3000 ought to be getting tired of karma fortunes by now.Vanguard3000 ought to be getting tired of karma fortunes by now.Vanguard3000 ought to be getting tired of karma fortunes by now.Vanguard3000 ought to be getting tired of karma fortunes by now.Vanguard3000 ought to be getting tired of karma fortunes by now.Vanguard3000 ought to be getting tired of karma fortunes by now.Vanguard3000 ought to be getting tired of karma fortunes by now.Vanguard3000 ought to be getting tired of karma fortunes by now.Vanguard3000 ought to be getting tired of karma fortunes by now.
 
Posts: 176
Karma: 474196
Join Date: Jan 2011
Location: Canada
Device: Kobo Libra 2
Some fonts failing silently

I have two fonts in my book, both ttf files, and both show properly in Windows 11's font previewer, but one (minbari2.ttf) does not show in Sigil's font viewer, nor does it work when invoked within an xhtml.

So, the font is in the Fonts folder, added via Sigil's new drag-drop box (I use this a lot more than I thought I would!); I have another font with the same usage that works correctly; neither font is being obfuscated, per the Font Obfuscation context menu; my css is:

Code:
@font-face {
  font-family: "minbari2";
  font-style: normal;
  font-weight: normal;
  src: url(../Fonts/minbari2.ttf);
}

@font-face {
  font-family: "narn";
  font-style: normal;
  font-weight: normal;
  src: url(../Fonts/narn.ttf);
}

.f-min {
  font-family: "minbari2";
}

.f-nar {
  font-family: "narn";
}
and my xhtml is:

Code:
  <h1 class="f-min">There is a hole in your mind.</h1>

  <h1 class="f-nar">You do not make history. You can only hope to survive it.</h1>
In this example, the Minbari font does not work, but the Narn one does.

I've seen this before with previous Sigil (and Windows)versions, but I was usually able to just find another font; this time I figured I'd bring it up here on point of principle.

The font itself is about thirty years old, so I suspect the issue is due to some depleted dilithium or somesuch, but it strikes me as odd that Windows can render it but not Sigil.

So, given that the issue is with the font and not Sigil, I guess my question is twofold:

1) Is there a way to "repair" the font, or get it working properly in my book, and

2) Could I suggest that Sigil be able to throw an error if it can detect an imported font, but not be able to render it for whatever reason?

Bonus: This is maybe an unrelated nice-to-have, but would it be possible to allow copying selected text within Sigil's font viewer? With an alien or symbolic font, it'd be nice to copy the line displaying the file size somewhere to read it, so I don't have to learn Minbari or Narn.

edit: I checked with the css validator and nothing seems specifically untoward regarding the Minbari font.

Code:
2 		Value Error : font-family Property font-family doesn't exist in CSS level 2.1 but exists in [css1, css2, css3] : "minbari2"
3 		Value Error : font-style Property font-style doesn't exist in CSS level 2.1 but exists in [css1, css2, css3] : normal
4 		Value Error : font-weight Property font-weight doesn't exist in CSS level 2.1 but exists in [css1, css2, css3] : normal
5 		Property src doesn't exist : url(../Fonts/minbari2.ttf)
9 		Value Error : font-family Property font-family doesn't exist in CSS level 2.1 but exists in [css1, css2, css3] : "narn"
10 		Value Error : font-style Property font-style doesn't exist in CSS level 2.1 but exists in [css1, css2, css3] : normal
11 		Value Error : font-weight Property font-weight doesn't exist in CSS level 2.1 but exists in [css1, css2, css3] : normal
12 		Property src doesn't exist : url(../Fonts/narn.ttf)
Attached Thumbnails
Click image for larger version

Name:	Screenshot 2026-06-06 103037.png
Views:	17
Size:	14.6 KB
ID:	223741   Click image for larger version

Name:	Screenshot 2026-06-06 111216.png
Views:	11
Size:	35.8 KB
ID:	223744  
Attached Files
File Type: epub fonts.epub (18.3 KB, 1 views)

Last edited by Vanguard3000; Yesterday at 11:24 AM.
Vanguard3000 is offline   Reply With Quote
Old Yesterday, 12:41 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: 9,686
Karma: 6774048
Join Date: Nov 2009
Device: many
FWIW, I use the free open source font editor, FontForge to validate and repair fonts.

Font handling is internal to Qt and unless Qt somehow indicates a font is bad, Sigil really has nothing it can do.

So on Linux use FontForge, on Mac use FontBook, but since I have no idea about Windows, someone else will have to pipe in here what to use on that platform.
KevinH is offline   Reply With Quote
Old Yesterday, 01:25 PM   #3
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: 9,686
Karma: 6774048
Join Date: Nov 2009
Device: many
And when you start up sigil in a terminal on Linux with your fonts.epub file you get the following error messages:

Code:
sigil ./fonts.epub
Debug: Javascript error:  QWebEnginePage::WarningMessageLevel "Failed to decode downloaded font: sigil:///home/kbhend/.local/share/sigil-ebook/sigil/workspace/Sigil-CvxzMY/OEBPS/Fonts/minbari2.ttf on line:0 Source:sigil:///home/kbhend/.local/share/sigil-ebook/sigil/workspace/Sigil-CvxzMY/OEBPS/Text/Section0001.xhtml"

Debug: Javascript error:  QWebEnginePage::WarningMessageLevel "OTS parsing error: maxp: Bad maxZones: 3\ncmap: bad glyph id offset (24998 > 412)\ncmap: Failed to parse table on line:0 Source:sigil:///home/kbhend/.local/share/sigil-ebook/sigil/workspace/Sigil-CvxzMY/OEBPS/Text/Section0001.xhtml"

Debug: Javascript error:  QWebEnginePage::WarningMessageLevel "Failed to decode downloaded font: sigil:///home/kbhend/.local/share/sigil-ebook/sigil/workspace/Sigil-CvxzMY/OEBPS/Fonts/minbari2.ttf on line:0 Source:sigil:///home/kbhend/.local/share/sigil-ebook/sigil/workspace/Sigil-CvxzMY/OEBPS/Text/Section0001.xhtml"

Debug: Javascript error:  QWebEnginePage::WarningMessageLevel "OTS parsing error: maxp: Bad maxZones: 3\ncmap: bad glyph id offset (24998 > 412)\ncmap: Failed to parse table on line:0 Source:sigil:///home/kbhend/.local/share/sigil-ebook/sigil/workspace/Sigil-CvxzMY/OEBPS/Text/Section0001.xhtml"
So it appears your minbari font is as you expected bad.

And here are the warnings about the font from fontforge:

Code:
Glyph index out of bounds. Was 12415, must be less than 122.
  In attempt to associate a glyph with encoding ffff in segment 18
  with platform=3, specific=1 (in 'cmap')
Windows will reject fonts with an OS/2 version number of 0

Last edited by KevinH; Yesterday at 01:29 PM.
KevinH is offline   Reply With Quote
Old Yesterday, 01:39 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: 9,686
Karma: 6774048
Join Date: Nov 2009
Device: many
And attached is the font after generating it again using fontforge. This version seems to work well in Sigil at least under Linux/KDE (after tweaking the css url to match the new name).

It is many times useful on Windows and MacOS to set the env variable to create a debug log file in your home directory and launch sigil and then after closing sigil, look at the debug output generated by Sigil or Qt. Just do not forget to unset that env var.

Ps: just use Sigil GetInfo to get file size info for any file in Sigil.

PPs: given the number of broken free fonts out there, validating a font before embedding it with a good font utility is probably a good idea.
Attached Files
File Type: zip minbari2_fixed.ttf.zip (9.9 KB, 1 views)

Last edited by KevinH; Yesterday at 01:53 PM.
KevinH is offline   Reply With Quote
Old Yesterday, 04:24 PM   #5
Vanguard3000
Groupie
Vanguard3000 ought to be getting tired of karma fortunes by now.Vanguard3000 ought to be getting tired of karma fortunes by now.Vanguard3000 ought to be getting tired of karma fortunes by now.Vanguard3000 ought to be getting tired of karma fortunes by now.Vanguard3000 ought to be getting tired of karma fortunes by now.Vanguard3000 ought to be getting tired of karma fortunes by now.Vanguard3000 ought to be getting tired of karma fortunes by now.Vanguard3000 ought to be getting tired of karma fortunes by now.Vanguard3000 ought to be getting tired of karma fortunes by now.Vanguard3000 ought to be getting tired of karma fortunes by now.Vanguard3000 ought to be getting tired of karma fortunes by now.
 
Posts: 176
Karma: 474196
Join Date: Jan 2011
Location: Canada
Device: Kobo Libra 2
That's perfect, thanks for the advice, and for repairing the font for me.

I'll check out FontForge for future issues.
Attached Thumbnails
Click image for larger version

Name:	Screenshot 2026-06-06 161935.png
Views:	5
Size:	17.8 KB
ID:	223747  
Vanguard3000 is offline   Reply With Quote
Old Yesterday, 06:31 PM   #6
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: 52,199
Karma: 180576670
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Libra Colour, Lenovo M8 FHD, Paperwhite 4, Tolino epos
Quote:
Originally Posted by KevinH View Post
FWIW, I use the free open source font editor, FontForge to validate and repair fonts.

Font handling is internal to Qt and unless Qt somehow indicates a font is bad, Sigil really has nothing it can do.

So on Linux use FontForge, on Mac use FontBook, but since I have no idea about Windows, someone else will have to pipe in here what to use on that platform.
I use FontForge under Windows for quick and dirty font checking though lately, I've been using fonttools for modifying fonts by editing it's ttx files and then converting ttx back to ttf.

I will agree that verifying a font before making use of it is a good idea. Especially some of the older free fonts which played fast and loose with the TrueType standard

Last edited by DNSB; Yesterday at 06:33 PM.
DNSB is offline   Reply With Quote
Reply

Tags
font, fonts


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Building from source silently fails ownedbycats Development 8 07-11-2021 02:23 AM
2 post silently deleted linereader Feedback 1 01-18-2015 07:08 AM
How Do I? Fail silently when no articles to DL tBunnyMan Recipes 3 05-14-2012 11:11 PM
Installing ReaderLibrary 3.1 Silently NexenInc Sony Reader Dev Corner 1 04-27-2010 10:22 AM
Help! I'm silently freaking out. Ea Reading Recommendations 11 12-01-2009 09:54 AM


All times are GMT -4. The time now is 11:09 AM.


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