![]() |
#1 |
Junior Member
![]() Posts: 3
Karma: 10
Join Date: Oct 2020
Device: kindle
|
Sigil does not find my embedded font
from css=
@font-face { font-family: “Mekorot-Rashi”; font-weight: normal; font-style: normal; src: url(“../Fonts/Mekorot-Rashi.ttf”); } .cs_Times-Rashi{ text-decoration-line:none; font-weight:487; font-size:0.92em; font-family:"Mekorot-Rashi", serif; letter-spacing:0em; vertical-align:0px; color:black; text-transform:inherit; font-style:normal; font-variant:inherit; font-stretch:normal; background-color:inherit; } from xhtml= <p class='ps_chapter' dir='rtl'><span class='cs_Times-Rashi'>תנא לישנא דעלמא נקט - אי לא הדר תנא כולה שלי הוה אמינא, מאי מצאתיה דקתני תנא, לשון בני אדם אחז במשנתנו, ולא לשון מקרא, והרבה בני אדם קורין לה מציאה משעת ראיה.</span></p> the font file was added to the Fonts folder in Sigil when the font is installed on the computer it shows correctly in the preview but it doesn't show correctly when not installed screen shots are included |
![]() |
![]() |
![]() |
#2 |
Guru
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 839
Karma: 2657572
Join Date: Jan 2017
Location: Poland
Device: Various
|
I did a test and the font (without installing it on the system) is visible in the preview window.
Windows 10, Sigil 1.8.0 + current master (two separate tests). EDIT: I see problem in your styles – use normal (not qurly) quotes: Code:
font-family: "Mekorot-Rashi"; font-weight: normal; font-style: normal; src: url("../Fonts/Mekorot-Rashi.ttf"); Last edited by BeckyEbook; 01-18-2022 at 04:20 AM. |
![]() |
![]() |
Advert | |
|
![]() |
#3 |
Sigil Developer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 8,745
Karma: 5703586
Join Date: Nov 2009
Device: many
|
Yes, quote chars in css are " and ', any other chars will be treated as normal chars for that url or name. That is correct behaviour according to the css spec.
In many cases with no special chars in the string, the quotes themselves are optional, too. |
![]() |
![]() |
![]() |
#4 |
Junior Member
![]() Posts: 3
Karma: 10
Join Date: Oct 2020
Device: kindle
|
sigil still does not find fonts
Thank you for mentioning about the quote marks. I did not notice that. I changed the quote marks and Sigil still does not find the embedded fonts and uses the default serif instead. I am attaching a sample and screen shots of how it looks and how it should look.
|
![]() |
![]() |
![]() |
#5 |
Guru
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 839
Karma: 2657572
Join Date: Jan 2017
Location: Poland
Device: Various
|
If css styles are in root, fonts in "Fonts", you can fix paths to font files:
Code:
@font-face { font-family: "Mekorot-Rashi"; font-weight: normal; font-style: normal; src: url("Fonts/Mekorot-Rashi.ttf"); } @font-face { font-family: "David CLM"; font-weight: normal; font-style: normal; src: url("Fonts/DavidCLM-Medium.otf"); } @font-face { font-family: "David CLM"; font-weight: bold; font-style: normal; src: url("Fonts/DavidCLM-Bold.otf"); } |
![]() |
![]() |
Advert | |
|
![]() |
#6 |
Sigil Developer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 8,745
Karma: 5703586
Join Date: Nov 2009
Device: many
|
Forgive my ignorance here.
This is an example of RTL language, correct. Assuming that the first screenshot is "how it looks" and the second screenshot is "how it should look": I loaded your sampleembed.epub and I see the second picture based on the far right first word on the top line. Is that correct behaviour or broken behaviour? What version of Sigil are you using and on what platform? |
![]() |
![]() |
![]() |
#7 | |
Sigil Developer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 8,745
Karma: 5703586
Join Date: Nov 2009
Device: many
|
Good catch. I did not think to even look at the full paths. So the first screenshot is the correct one, right?
Quote:
Last edited by KevinH; 01-18-2022 at 11:20 AM. |
|
![]() |
![]() |
![]() |
#8 |
Sigil Developer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 8,745
Karma: 5703586
Join Date: Nov 2009
Device: many
|
Sometimes, I really think we should change the Sigil default settings to show full epub root relative paths in BookBrowser so that people do not need to use tool-tips to see the path.
|
![]() |
![]() |
![]() |
#9 |
Junior Member
![]() Posts: 3
Karma: 10
Join Date: Oct 2020
Device: kindle
|
It worked! Sorry I wasn't clear about which was the correct screen shot. It is the one with the "fancier" font which is called Rashi script (on the left). This is mostly in Aramaic which is written with Hebrew letters (unicode) but the letters are shaped differently. This book is mostly in English but the Rashi script must be embedded or else it comes out looking like Hebrew. I do not know if the readers in the US even have Hebrew fonts. Will using the fonts as you showed work on all ebook readers not just Sigil on my computer? I have Sigil 1.8 and Mac OS Montery, but I also tried it on Windows 10 with the same results.
Thank you so much! |
![]() |
![]() |
![]() |
#10 |
Sigil Developer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 8,745
Karma: 5703586
Join Date: Nov 2009
Device: many
|
It shoud. You should go to Sigil Preferences and enable showing full book paths in BookBrowser.
Once you do that, you can more easily see where the css was located, and where the font files are located within the epub, so you can create the proper relative links. FYI, I think there is a Sigil plugin that makes adding embedded fonts easier. Do not forget to either obfuscate or subset (or both) that font depending on its licence if need be. |
![]() |
![]() |
![]() |
#11 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 28,550
Karma: 204127028
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
|
![]() |
![]() |
![]() |
#12 |
Sigil Developer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 8,745
Karma: 5703586
Join Date: Nov 2009
Device: many
|
So do I now. But should we make it the default for new installs?
|
![]() |
![]() |
![]() |
#13 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 28,550
Karma: 204127028
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
It might help new users stop making the assumption that the virtual Book Browser groupings are also (always) indicative of the epub's actual file structure.
|
![]() |
![]() |
![]() |
#14 |
Well trained by Cats
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 31,023
Karma: 60358908
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
|
|
![]() |
![]() |
![]() |
#15 |
null operator (he/him)
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 21,708
Karma: 29711016
Join Date: Mar 2012
Location: Sydney Australia
Device: none
|
FWIW - I'd like to be able to toggle show/hide full-path via a menu option or keyboard shortcut. I don't need it most of the time, it just adds clutter. But when I need it I don't like having to change Preferences - which I regard as 'set and forget'.
|
![]() |
![]() |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Embedded Style and Embedded Font labels truncated in KA1 | sladflob | KOReader | 2 | 06-25-2020 08:43 PM |
Preventing Sigil embedded font files from user access | bobcdy | Sigil | 34 | 02-22-2015 09:13 AM |
Mini advanced font settings ignored in one book - embedded font? | lordofazeroth | Kobo Reader | 4 | 09-20-2013 02:15 PM |
Sigil + embedded font variants | troymc | Sigil | 6 | 10-17-2012 11:00 AM |
embedded font - now line with embedded font not re-flowing | Kaylee Skylyn | ePub | 23 | 08-09-2012 07:30 PM |