10-16-2021, 08:29 PM | #1 |
Member
Posts: 15
Karma: 48138
Join Date: Aug 2012
Device: FBReader, Cool Reader and Aldiko (Android Tablet)
|
Updating Fonts in Sigil
I appear to have run into a problem with updating fonts in Sigil!
At first I thought I was just being clumsy, but I had to update another font to include some new glyphs for a project I am working on. I deleted the previous version from the Sigil file then added an existing file (the updated font) but Sigil insists on still showing the original (erroneous) font. Can anyone tell me what I have to do to get Sigil to recognize the updated font? (And also how to get it to recognize a font which was previously unrecognized in OTF format, but now cannot be found in TTF even though other TTF fonts work happily) Thank you KB |
10-17-2021, 12:58 AM | #2 |
Well trained by Cats
Posts: 30,407
Karma: 58055234
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
|
If you deleted an Embedded font, then added a replacement, then that is what your book has access to.
unless you @font-face is having it look at your file system Wrong path CaSe is a common goof. TTF won't work for this book, it must be ttf. This book has the folder fonts not Fonts Code:
@font-face { font-family: "Great Vibes"; font-weight: normal; font-style: normal; src: url(fonts/00005.ttf); } |
Advert | |
|
10-17-2021, 05:47 AM | #3 |
Grand Sorcerer
Posts: 27,968
Karma: 198535232
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
If Sigil won't show your embedded font, it's either a faulty (incompatible) font file, or a font-embedding mistake (typo or syntax error). Sigil itself doesn't have any fonts to "update". Nor does it care about what fonts you choose to embed in an epub (provided said font is suitable for embedding).
|
10-18-2021, 07:34 AM | #4 |
Member
Posts: 15
Karma: 48138
Join Date: Aug 2012
Device: FBReader, Cool Reader and Aldiko (Android Tablet)
|
What am I missing?
You know how it is; you spend hours working on the same problem and after a while you just can't see minor differences any more.
BookStyle.css contains (among other things): Code:
@font-face { font-family: "neumes" src: url(../Fonts/neumes-Regular.ttf); } @font-face { font-family: "Tef265"; src: url(../Fonts/tef265.ttf); } @font-face { font-family: "Garamond", Garamond, courier; src: url(../Fonts/Garamond.ttf); } font-family: 300px "Garamond", 300px Garamond, courier; Code:
<html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>Micrologus</title> <link href="../Styles/BookStyle.css" rel="stylesheet" type="text/css"/> <meta name="viewport" content="width=device-width, initial-scale=1.0"/> </head> Of the fonts, I have tried both otf (changing the stylesheet to reflect the exact name, upper and lower case) and ttf (ditto) but: Garamond remains stubbornly Times New Roman and neumes-Regular remains in the original version instead of the updated version. Possibly of interest, I have not added neumes-Regular to my system fonts, so it is only accessible from the embedded fonts. Yes, it displays, but it displays an older version, before editing and revising to include further glyphs. And the glyphs that it does display do not reflect more recent changes. Last edited by Kittybriton; 10-18-2021 at 07:46 AM. |
10-18-2021, 08:30 AM | #5 |
Grand Sorcerer
Posts: 27,968
Karma: 198535232
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
"neumes" is not a valid xhtml tag (and "font-family" is not a valid css selector). That's not how you go about applying embedded css fonts to xhtml. Another relevant factor would be the manifest entries for the font files in the opf.
This is not a Sigil problem, this is a general epub problem. Last edited by DiapDealer; 10-18-2021 at 08:33 AM. |
Advert | |
|
10-18-2021, 03:31 PM | #6 |
Member
Posts: 15
Karma: 48138
Join Date: Aug 2012
Device: FBReader, Cool Reader and Aldiko (Android Tablet)
|
I'm struggling to understand. The other font - tef265.ttf is specified in the CSS exactly the same way and displays satisfactorily. Why is Garamond problematic?
Got it. Changed the body font to "Garamond Medium" and all is happy. Now to fix the neumes problem. Does the screenshot help any? Last edited by Kittybriton; 10-18-2021 at 04:03 PM. |
10-18-2021, 03:58 PM | #7 |
Well trained by Cats
Posts: 30,407
Karma: 58055234
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
|
<span class="neumesfont">a</span>
And you need to have a CSS entry: Code:
.neumesfont {font-family:"neumes";} |
10-18-2021, 06:23 PM | #8 | ||
Wizard
Posts: 2,297
Karma: 12126329
Join Date: Jul 2012
Device: Kobo Forma, Nook
|
Quote:
"Japanese characters not showing up on some devices" Look at Steps 5 + 6. I'd recommend following 5.2: using Doitsu's "CSSFromFonts" plugin. That will insert all the proper @font-face code for you. Side Note: You may also want to Tools > Restructure Epub to Sigil Norm. That will make sure any font files (OTF or TTF) that were put in odd places, like: Code:
../neumes.ttf ../font/neumes.ttf Code:
../Fonts/neumes.ttf Quote:
Before (Wrong): Code:
the “Virga” (<neumes>D</neumes>) HTML: Code:
the “Virga” (<span class="neumes">D</span>) Code:
span.neumes { font-family: "neumes", serif; } Side Note: From a quick search, it looks like this "Neumes" font is similar to the non-Unicode "Symbol" fonts... Where you type "A" or "B" or "C", but a completely different character appears on screen. This type of font is HORRIBLE in ebooks, because: 1. Searching will be broken. 2. Text-to-Speech will completely spit out gibberish. 3. If the user doesn't use your embedded fonts (which is the vast majority of people), the text will display wrong. For example, while your screenshotted example may look correct "on the surface", Text-to-Speech will read out:
These rare musical notes are in Unicode now... so you may want to switch to an actual Unicode font:
It does look like these 2 free fonts may include these musical notes:
Side Note #2: A few months ago, I even wrote how to more easily find/insert many of these rare Unicode characters into your ebooks using Calibre/Sigil/LibreOffice: https://www.mobileread.com/forums/sh...10#post4138510 Last edited by Tex2002ans; 10-18-2021 at 08:49 PM. |
||
Tags |
fonts, updating |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Sigil 0.9.8 not updating toc.ncx | mrprobert | Sigil | 9 | 07-12-2018 09:02 AM |
Internal links not updating after file split (Sigil 0.9.3, Win 10) | arthurattwell | Sigil | 12 | 03-10-2016 06:40 AM |
Using different fonts in Sigil | JamieS | Sigil | 15 | 05-17-2013 06:21 AM |
Fonts echous with Sigil ! | morad7 | Sigil | 6 | 03-06-2012 09:45 AM |
Updating Sigil (Linux) | Kino | Sigil | 3 | 01-30-2012 08:21 AM |