![]() |
#1 |
Junior Member
![]() Posts: 1
Karma: 10
Join Date: Mar 2020
Device: none
|
To Embed Fonts or Not to Embed Fonts
I've seen articles cautioning against embedding fonts -- articles eight years old. I'm trying to get a feel for what the current wisdom is. I was excited to learn that epub simply uses HTML and CSS. I've been writing both pretty much on a daily basis since 1999. I have a novel written in ms word. I used Kindle to make an ebook, but now I want to use epub. It seems to be offering much better creative control of my material.
I converted the .docx to HTML and then spent FAR too much time taking out all that crappy ms word code. I'll look at a better converter in the future. Any suggestions? I want everything gone except all italics, bolding, links, etc. All those things I'd have to read the whole thing word-for-word to rebuild. The print version of the book is using two fonts I really like. They're both from Google fonts (TTF fonts). I did all the embedding. It looks great in Sigil and Chrome epub reader. I even got some drop caps to display perfectly with just a minimum of CSS styling. Then I tried viewing it in Adobe Digital Editions. I'm very disappointed. It's rendering fonts in funky ways. I have a slight variant for the first paragraph in a chapter. It just has no initial indent. And there's a span styling a Drop Cap. In Adobe, that whole paragraph is rendered as bold. No drop cap is displayed. I thought maybe it was getting the 'bold' idea from the drop cap, but that doesn't use a bold, so it makes no sense. It seems Adobe can't handle a simple 'span.' I don't get it. I'm using very basic, solid CSS tags. All weird MS Word stuff is gone. Why can't Adobe read basic CSS? |
![]() |
![]() |
![]() |
#2 |
Sigil Developer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 8,478
Karma: 5703586
Join Date: Nov 2009
Device: many
|
I am assuming you have permission to post that novel, it is in the public domain, or you are the author. If not, please remove it as posting copyrighted material is against the rules.
|
![]() |
![]() |
![]() |
#3 |
Running with scissors
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,582
Karma: 14328510
Join Date: Nov 2019
Device: none
|
One generic problem that jumped out to me is that you're using physical dimensions; inches (in), points (pt), and pixels (px). That's a bad smell. Stick to em and percentages since different ereaders have different screen dimensions, and the user can change the font size.
Last edited by hobnail; 03-03-2020 at 07:27 PM. |
![]() |
![]() |
![]() |
#4 |
null operator (he/him)
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 21,629
Karma: 29710510
Join Date: Mar 2012
Location: Sydney Australia
Device: none
|
The Workshop forum has threads that discuss getting from DOCX to ePub.
The simplest way is to convert the DOCX with calibre, or use Toxaris' addin for Word which can be found in the Workshop forum to create the ePub, or use Sigil's DOCX Input plugin. BR |
![]() |
![]() |
![]() |
#5 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 28,358
Karma: 203720150
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
Based on an Amazon search, I'm assuming the OP is the author of this attached work. But I'm also moving it since it's not really a Sigil issue/topic/question.
Last edited by DiapDealer; 03-03-2020 at 07:23 PM. |
![]() |
![]() |
![]() |
#6 |
Bibliophagist
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 44,828
Karma: 168802811
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Libra Colour, Lenovo M8 FHD, Paperwhite 4, Tolino epos
|
I took a quick look at the epub styling. Blecchh... Not the worst I've seen but not good.
One issue with the font-face portion of the stylesheet is the use of curly quotes. Check the Gentium Book Basic normal compared to the Gentium Book Basic bold. This may be the source of your font display issue. Code:
@font-face { font-family: "Gentium Book Basic"; font-weight: normal; font-style: normal; src: url(“../Fonts/GenBkBasR.ttf”); <== } @font-face { font-family: "Gentium Book Basic"; font-weight: bold; font-style: normal; src: url("../Fonts/GenBkBasB.ttf"); <== } ![]() Then there is the use of naked text -- the line below is not valid code, it needs to be wrapped. ____________________________________ Then we have the naked img tags. I'd suggest wrapping them in a <p> tag with appropriate class. And this one where some colons were left out or replaced by other characters (I'm assuming the -12px was intended to be 12px): Code:
<img alt="image013" src="../Images/image013.jpg" style="margin-right;12px;margin-left-12px;margin-top:12px;margin-bottom:12px;width:100%;"/> Code:
<img alt="image013" src="../Images/image013.jpg" style="margin-right:12px; margin-left:12px; margin-top:12px; margin-bottom:12px; width:100%;"/> And ';!important;' which is used after four maxwidth:s is incorrect. You need to use ' !important;'. Though, IMNSHO, your epub with a single stylesheet should not need to use any !important. I did a quick clean up on the file to clean up epubcheck's errors and prettified it to remove those unneeded EOLs in the paragraphs. I also deleted several of the Comorant font files that were not being used to reduce the file size. Last edited by DNSB; 03-04-2020 at 12:23 AM. Reason: Added not requiring !important in a single stylesheet |
![]() |
![]() |
![]() |
#7 | |||
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 2,306
Karma: 13057279
Join Date: Jul 2012
Device: Kobo Forma, Nook
|
Quote:
There are serious issues with semicolons in the wrong place, causing the entire CSS file to not be parsed properly. If you run your CSS through W3C's CSS Validator, you can see all the issues: https://jigsaw.w3.org/css-validator/validator You could also run it through Calibre Editor's Tools > Check Book. * * * One example, Code:
@font-face { font-family: "Cormorant Infant"; font-weight: normal; font-style: bold; <---- This line invalid src: url("../Fonts/CormorantInfant-Bold.ttf"); } Code:
font-weight: bold; font-style: normal; Quote:
1. For font-size, best to not use rem. Change it to em. rem isn't well supported across devices. It's also a poor idea to use px/pt in ebooks (because of DPI issues). Best to change those to em too. 2. You have many forced color (black + gray fonts). This will lead to:
Remove the forced color. 3. Why are you using max-width on paragraphs? Code:
p.Ghosts, li.Ghosts, div.Ghosts { margin:0 auto 12px; max-width: 700px; <--- This line 4. Paragraphs with margins above/below AND indentation is extremely poor typography. Go with either: A. Text-indent + no margins (what I recommend). B. No indentation + margin above (this is called "Block Paragraphs"). (Websites usually use this type of spacing, but books aren't typeset this way.) It's best just to leave this stuff up to user preferences. Question: ... you said you already "created a Kindle version". I'm assuming you did DOCX->Kindle Previewer? The reading experience of that ebook is going to be extremely subpar. * * * Other Errors I Noticed 1. You still have many apostrophe as dumb quotes. Turn those into RIGHT SINGLE QUOTES. ' -> ’ You may want to run your book through another Smarten Punctuation pass... 2. There are quite a few stray non-breaking spaces: Code:
<p class="Ghosts"> “<i>Srće moje</i>,” Jovanka continued. [...]</p> [...] <p class="Ghosts"> “Yes, my girl!” said Srđa with great excitement suddenly appearing before her. [...]</p> 3. There's also a few stray leftovers from Word's HTML: Code:
<i><span style='font-size:9.5pt;line-height:115%; font-family:"Arimo",sans-serif;letter-spacing:.4pt'> </span></i> [...] <span style='font-size:9.5pt;line-height:115%;font-family: "Arimo",sans-serif'>.</span> 4. You accidentally have a ─ (U+2500 BOX DRAWINGS LIGHT HORIZONTAL) instead of an EM DASH — (U+2014). You can use Sigil's Tools > Reports > Characters in HTML to find all the characters used in your book. Investigate/Remove any of the funky ones. Also, your book is plagued with soft hyphens. These are a very poor idea in ebooks, plus they break things like Search + Sigil's spellchecking. Eliminate these. Quote:
Also, with images, it's best to use helpful alt attributes. Code:
<img alt="image003" src="../Images/image003.jpg" class="full-image"/> Code:
alt="A man down by the river." Last edited by Tex2002ans; 03-04-2020 at 02:57 AM. |
|||
![]() |
![]() |
![]() |
#8 |
Bibliophagist
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 44,828
Karma: 168802811
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Libra Colour, Lenovo M8 FHD, Paperwhite 4, Tolino epos
|
This is a snippet from the Kindle edition sample which shows the effect of the inconsistent paragraph styling.
|
![]() |
![]() |
![]() |
#9 | |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 2,306
Karma: 13057279
Join Date: Jul 2012
Device: Kobo Forma, Nook
|
Quote:
Embedded Fonts, if used, should be used very sparingly (I always mention Maths + Accented Greek as examples). Maybe for chapter headings and decorative things (scene breaks)... But embedding them as the body font? Bad idea. What typically happens is "Print Fonts" are used (because "the ebook has to look exactly like the print book!"). These fonts may look okay on paper, but come out very poorly on the various types of devices + font sizes + DPIs. For example, the fonts are usually too thin on e-ink (JSWolf always comments about this). The font may have also been designed for ideal reading at "12pt" in mind... but on cellphones, with small font size, the font may be too hard to read. On many ereaders, embedded fonts will forcefully override the user's chosen fonts... (this leads to pissed off readers!). Also, Amazon's workflow just makes certain fonts completely disappear... or break in the Look Inside. That's just a few pain points with embedded fonts. The rest has been discussed thoroughly on MobileRead throughout the years. Just do a search for: Code:
embedded fonts site:mobileread.com Last edited by Tex2002ans; 03-04-2020 at 02:51 AM. |
|
![]() |
![]() |
![]() |
#10 |
Klak
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 174
Karma: 150374
Join Date: Sep 2011
Location: Belgrade, Serbia
Device: many
|
Go to tipometar download page and get Areal RNIDS font. It is made for internet/web and it's free to use.
Gentium is OK, but IMHO it's not for ebooks. If you are new epub designer better download some epub template and modify it for your book. Word or Indesign exported css and html are not very good. |
![]() |
![]() |
![]() |
#11 | |
Resident Curmudgeon
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 79,136
Karma: 144284184
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
Quote:
|
|
![]() |
![]() |
![]() |
#12 | |
Resident Curmudgeon
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 79,136
Karma: 144284184
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
Quote:
|
|
![]() |
![]() |
![]() |
#13 |
Klak
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 174
Karma: 150374
Join Date: Sep 2011
Location: Belgrade, Serbia
Device: many
|
Yeah, right, reinvent that css wheel.
|
![]() |
![]() |
![]() |
#14 |
Resident Curmudgeon
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 79,136
Karma: 144284184
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
You have it all wrong. A template like you are suggesting is not going to help. You need to create the CSS based on what you need it to be, not what some template has for CSS. Sigil and Calibre are very good programs that can help you create your ePub and they are free.
If you are going to be creating eBooks, it's bets to know how to code them yourself. Programs that do the coding for you come out with really poor code. The idea is to keep it clean and simple and that requires doing ithe coding by hand. Also, clean and simple means better compatibility across a range of devices and programs. Last edited by JSWolf; 03-05-2020 at 11:35 AM. |
![]() |
![]() |
![]() |
#15 |
Klak
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 174
Karma: 150374
Join Date: Sep 2011
Location: Belgrade, Serbia
Device: many
|
We could badminton our opinions all day.
I think it is better to start somewhere (blitz or paul salvette css framework) and learn by editing existing code. You think it is better to start with empty sheet of paper and stumble upon every device glitches and nuances. Well, good luck with that. I will here rest my case. |
![]() |
![]() |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Calibre will only embed certain fonts and not others. Why? | hidden.platypus | Editor | 61 | 07-08-2017 05:53 PM |
Can it embed fonts? | chalimac | Kobo Reader | 1 | 06-27-2017 05:46 PM |
Embed multiple fonts? | writerkit | Conversion | 1 | 05-08-2013 01:45 AM |
Is it possible to really embed fonts yet? | LaurelRusswurm | ePub | 25 | 11-17-2011 10:25 PM |
Is it possible to UN embed fonts? | lmronan | Sigil | 14 | 06-04-2010 09:26 AM |