12-22-2022, 01:21 AM | #16 | ||
A Hairy Wizard
Posts: 3,225
Karma: 19000635
Join Date: Dec 2012
Location: Charleston, SC today
Device: iPhone 15/11/X/6/iPad 1,2,Air & Air Pro/Surface Pro/Kindle PW & Fire
|
Quote:
Code:
em {font-style:italic} em em {font-style:normal} div.telepath {font-style:italic} div.telepath em {font-style:normal; color:blue} Code:
<div class="telepath"> <p>I expect this question to <em>again</em> open up the em vs i argument - even though it has nothing to do with the point!</p> <p>Another sentence he said telepathically.</p> </div> Quote:
|
||
12-28-2022, 04:01 PM | #17 |
Member
Posts: 16
Karma: 9714
Join Date: Dec 2022
Location: Pretoria, South Africa
Device: Android Mobile (Moon Reader+, PocketBook), Kindle 3
|
I am also struggling to get Sigil to load my embedded font, I've gone through numerous forums but do not find my fault. I bet its something simple:
content.opf Code:
<item id="stylesheet.css" href="Styles/stylesheet.css" media-type="text/css"/> <item id="PCSB-Hebrew.otf" href="Fonts/PCSB-Hebrew.otf" media-type="font/otf"/> Code:
@font-face { font-family: "PCSB Hebrew"; font-style: normal; font-weight: normal; src: url(../Fonts/PCSB-Hebrew.otf); } span.hebrew { font-family: "PCSB Hebrew"; font-style: normal; font-weight: normal; } Code:
<?xml version="1.0" encoding="utf-8"?> <!DOCTYPE html> <html xmlns="http://www.w3.org/1999/xhtml" xmlns:epub="http://www.idpf.org/2007/ops"> <head> <title>The Book</title> <link href="stylesheet.css" rel="stylesheet" type="text/css"/> </head> <body> <h1>The Book</h1> <p>The first word "<span class="hebrew">Hyfgt</span>" in the book...</p> </body> </html> Last edited by butterfly68za; 12-28-2022 at 04:04 PM. |
12-28-2022, 04:42 PM | #18 |
Sigil Developer
Posts: 8,160
Karma: 5450818
Join Date: Nov 2009
Device: many
|
Your link href to your stylesheet is probably wrong unless your xhtml file is located inside the Styles folder. You can use Sigil to properly link the stylesheet. hrefs/urls are case sensitive.
To verify urls, either enable full paths for BookBrowser in Sigil Preferences (see https://github.com/Sigil-Ebook/sigil...nce-mainUI.png ) or just hover over a file in BookBrowser to see the exact file path from epub root. Last edited by KevinH; 12-28-2022 at 05:15 PM. |
12-28-2022, 05:11 PM | #19 |
Guru
Posts: 783
Karma: 2298438
Join Date: Jan 2017
Location: Poland
Device: Various
|
In addition to the obvious problem described above by KevinH, I suggest checking additionally:
a) run the EpubCheck plugin and check your Epub file b) I see that you have only given Moon Reader as the reader. Are you sure you have enabled the option to use additional fonts in the Moon Reader options? Perhaps the problem has little to do with Sigil. |
12-28-2022, 06:06 PM | #20 |
Member
Posts: 16
Karma: 9714
Join Date: Dec 2022
Location: Pretoria, South Africa
Device: Android Mobile (Moon Reader+, PocketBook), Kindle 3
|
I looked at your example and did the following to my book.
Created a new stylesheet, left the name and entries Sigil gave, copied the CSS from the old to the new file, and updated with this line in the file <head> Code:
<link href="../Styles/Style0001.css" rel="stylesheet" type="text/css"/> I was using the Sigil built-viewer and Calibre Book Viewer. I hadn't yet copied to Moon Reader on the phone, did that now, and the fonts are showing. Thank you both Kevin and Becky Last edited by butterfly68za; 12-28-2022 at 06:10 PM. |
12-28-2022, 08:49 PM | #21 |
Sigil Developer
Posts: 8,160
Karma: 5450818
Join Date: Nov 2009
Device: many
|
No. Sigil will quite happily work with files in root or in arbitrary folders. It just requires that url links be relative and match the physical file paths.
If you had stylesheet.css in the root of the epub alongside your xhtml file then your link to your font files from the css is wrong because you can not legally proceed up one directory out of the root directory and back in, and also that would then be inconsistent with the manifest href for the stylesheet.css file from your content.opf. All relative links must actually follow the physical folders and paths in the epub and match the layout as defined by the content.opf manifest. Turning on full file paths in Sigil's BookBrowser will enable you to see actual epub root relative file paths so you can make proper relative links if you choose to do so manually but it is probably easier to use Sigil generate the correct links/hrefs/urls for you. |
12-29-2022, 08:00 AM | #22 |
Member
Posts: 16
Karma: 9714
Join Date: Dec 2022
Location: Pretoria, South Africa
Device: Android Mobile (Moon Reader+, PocketBook), Kindle 3
|
|
12-29-2022, 09:00 AM | #23 |
Grand Sorcerer
Posts: 28,040
Karma: 199464182
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
You'll find much more that doesn't "work" in Moon Reader. Its developers have no real interest in accurately rendering things as the content creator intended. They are more focused on users being able to override any and all publisher settings. To the point where an actual "Publisher View" doesn't really exist any more. There's nothing wrong with it, if that's what people like. But because of it, Moon Reader's probably not the best choice for accurately previewing your book's css.
|
12-29-2022, 08:15 PM | #24 |
Member
Posts: 16
Karma: 9714
Join Date: Dec 2022
Location: Pretoria, South Africa
Device: Android Mobile (Moon Reader+, PocketBook), Kindle 3
|
Was not aware of this of Moon Reader+, I bought it a couple of years ago, was then highly recommended by many sites of the day. Maybe time to move on, do you have a preference for a reader on Android?
|
12-29-2022, 09:41 PM | #25 |
Grand Sorcerer
Posts: 28,040
Karma: 199464182
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
I didn't mean to suggest there was anything wrong with it as a reading app. Lots of people swear by it. It's just not a very good indicator of how epubs will look on devices or other epub reading apps.
I don't read many epubs on Android anymore. When I do, I usually use the app associated with the bookstore where I bought it: Kobo or Google Play Books (or one of the library apps if I've borrowed it). I used to swear by Mantano/Bookari until they broke and abandoned it. Perhaps others will have better suggestions. |
12-29-2022, 09:44 PM | #26 | |
Well trained by Cats
Posts: 30,448
Karma: 58055868
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
|
Quote:
It is not so good for those who want As Delivered (Use only the CSS) I am not sure if any one make a viewer that the controls ONLY algebraic add to the CSS values (fudge them 1 hay or the other) and has a 'fast zero' button to reset any fudge settings. |
|
12-29-2022, 10:58 PM | #27 | |
Bibliophagist
Posts: 40,573
Karma: 157444380
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Libra Colour, Lenovo M8 FHD, Paperwhite 4, Tolino epos
|
Quote:
I gave up on Moon+ when I found that an epub with no stylesheet rendered almost identically on Moon+ as the original epub with it's simple stylesheet. |
|
12-31-2022, 07:19 PM | #28 |
Member
Posts: 16
Karma: 9714
Join Date: Dec 2022
Location: Pretoria, South Africa
Device: Android Mobile (Moon Reader+, PocketBook), Kindle 3
|
I am liking PocketBook
|
01-15-2023, 08:59 AM | #29 |
Connoisseur
Posts: 58
Karma: 438844
Join Date: Aug 2019
Device: PC, Linux Mint, Tablet, and Telephone
|
If you want to test which CSS commands your EPUB reader or application supports, you can use the enclosed EPUB. The CSS commands shown in red text are not supported.
|
Tags |
embed, font, image quality |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Changing embeded font in ebook using Sigil 1.9.20 | aknight2015 | Sigil | 1 | 12-20-2022 01:39 AM |
Embedded Style and Embedded Font labels truncated in KA1 | sladflob | KOReader | 2 | 06-25-2020 09:43 PM |
Embeded Italic font not rendered | theducks | Sigil | 6 | 11-07-2012 08:25 AM |
embedded font - now line with embedded font not re-flowing | Kaylee Skylyn | ePub | 23 | 08-09-2012 08:30 PM |
How can we embeded font in Fetch news? | attapol | Calibre | 0 | 01-03-2010 11:40 AM |