![]() |
#16 |
本の虫
![]() ![]() ![]() ![]() Posts: 242
Karma: 344
Join Date: May 2008
Location: USA
Device: Kindle3, DXG, Fire · iPad, iPod
|
For the benefit of curious bystanders, the calibre2 TNR removal fixed text display in my iRex, but not in my Cybook Gen3. Removing all references in the CSS to Times New Roman does solve it.
You know, I definitely know a lot less about this stuff than I thought I did. Dumber every day, that's my motto. ![]() Last edited by Dellaster; 04-09-2010 at 01:12 AM. Reason: Decided not to include the photo for now |
![]() |
![]() |
![]() |
#17 |
Junior Member
![]() Posts: 5
Karma: 10
Join Date: Aug 2010
Device: iphone/ipad
|
Fonts in sigil
Hi guys
I have been trying to add fonts to my epub file in sigil, however with no programming background I have no idea how to do this, and when I right click on the font file and select add file, go to select the font, nothing happens. Can someone please feel sorry for me and help me out. Please!! Thanking you ahead Pixie Last edited by pixiesteps; 08-19-2010 at 11:55 PM. |
![]() |
![]() |
Advert | |
|
![]() |
#18 |
Zealot
![]() ![]() ![]() ![]() ![]() Posts: 123
Karma: 496
Join Date: Feb 2009
Location: Spokane, Washington
Device: Kindle2
|
Full sympathy!
Basically, you'll have to take a quick course in programming to do it, but only in the code for fonts. It's not hard...just be aware that every letter, comma and colon is significant. Are you dealing with an epub file with a separate style.CSS file? (In Sigil, this will appear in the folder "style" right under the "html" folder and above the "fonts" folder.) Personally, I take a really clean html file, complete with fonts, into Calibre and let it make the epub file. It creates a nice style.css file with all the font calls identified. Once you have that, open it in Sigil and find those "calls" in the style.css file. When you put your code into the very top of the Style.css file, you'll have to use exactly the same language (font name and generic name) as appears in those "calls". You might have to copy your fonts into a folder other than your windows "fonts" folder, then add those fonts to the epub font folder by right clicking on the folder. Check out the code in my post #11 of this thread. That @font code (modified for your fonts natch) goes right at the top of the style.css file, just under that first line as shows in the post...or something very similar, and just before the first style code (in the case of a Calibre-generated epub, that will be the .calibre paragraph) You need to make sure to give a "generic" font type (serif, sans-serif) along with the special font in case the reader doesn't support the embedded fonts. (Note: The .calibre# numbers are generated by calibre as it encounters new stylistic forms. The cleaner and more consistent your html file, the fewer of these .calibre# codes and so the shorter your style.css file. Basically what you're doing with that @font command is telling the files where to find the font in question when the .calibre# style code calls for it.) Make sure you spell the name of the font exactly as it appears in the .calibre code and the font file exactly as it appears in the fonts folder, caps matter. Oh...and take out any spaces in the file name, as I recall. Hope this helps. It can be very futsy and until you get it just right, it won't show in the file. Oh...and if you're making files to sell, you've got to be very careful about what fonts you use. Fonts can't be copyrighted, but the digitalization of them can be. You need to search around for fonts that allow for distribution. Good luck! Last edited by JaneFancher; 08-20-2010 at 01:57 AM. |
![]() |
![]() |
![]() |
#19 |
Connoisseur
![]() Posts: 55
Karma: 54
Join Date: Apr 2011
Location: NYC
Device: Many
|
Then I'm doing something wrong, and I CAN'T FIGURE OUT WHAT!
I added fonts (Old Standard), declared them in template.css (correctly, I hope), and (1) everything's still rendering in generic serif, and (2) I don't see anything about Old Standard in the manifest. Do I need to unzip the .opf, open in Text Wrangler, and declare Old Standard in the manifest that way? Thanks for any advice. I've been searching and experimenting for a couple of hours like a responsible newbie, and I just can't get it working. ![]() |
![]() |
![]() |
![]() |
#20 |
Connoisseur
![]() Posts: 55
Karma: 54
Join Date: Apr 2011
Location: NYC
Device: Many
|
Well, this is embarrassing, but apparently quitting and reopening Sigil did it. I'm going to blame some oddness in my system.
<gildaradner>Never mind...</gildaradner> |
![]() |
![]() |
Advert | |
|
![]() |
#21 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 3,720
Karma: 1759970
Join Date: Sep 2010
Device: none
|
i though that e-readers each had their own proprietary font sets ( unless hacked) and would substitute their own fonts for any explicit assignments that you make - so why do this embedded fonts trick at all ?
I am sure that is how my Sony PRS650 works. Also, I have taken to adding the line font-family: "Times New Roman", serif; to CSS, to improve how sigil's book view looks. Adding that line has no effect on what i see on Sony - it certainly does not cause my reader to "freak out"! |
![]() |
![]() |
![]() |
#22 | |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 4,520
Karma: 121692313
Join Date: Oct 2009
Location: Heemskerk, NL
Device: PRS-T1, Kobo Touch, Kobo Aura
|
Quote:
For some readers the fonts cannot be hacked and this is the only way. Also, sometimes you only want a part in a different font (chaptertitles, notes, letters, etc). When possible, I avoid using fonts. On much readers is it more of a hit-and-miss. |
|
![]() |
![]() |
![]() |
#23 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 3,720
Karma: 1759970
Join Date: Sep 2010
Device: none
|
interesting. so in theory, the device firmware is able to work with ANY font so long as it is correctly specified AND embedded, & the firmware will still know how to justify, reflow etc.
the font has to be .ttf though, yes? and if you go crazy & want dozens of fonts ( which all have to be in reader RAM ?) then you'll hit memory limitations ? & if you specify, but do not embed, then the reader will decide what to use ? the reader must still make some arbitrary decisions though e.g. sony has 6 size settings, XS, S, M , L XL & XXL, so it has to overlay an interpretation of what those will mean ? |
![]() |
![]() |
![]() |
#24 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 4,520
Karma: 121692313
Join Date: Oct 2009
Location: Heemskerk, NL
Device: PRS-T1, Kobo Touch, Kobo Aura
|
If the supplied font is in the right format and embedded correctly then yes. It depends on the implementation of the reader of course what the correct method of embedding is and whether it supports it at all.
However, if your reader has enough memory you could use as much fonts as you would like (separate from legal issues of course). I doubt that reading the book is pleasurable or fast though. Since the font is embedded in the epub, it will only be read/used when the book is openend. I think it will open the font only when used, but I am not sure. If you specify a font family or type which the reader does not have and is not included in the epub, the reader will decide. Usually readers will use 2 fonts for that, serif and non-serif. However, the epub must still validate of course. The font size depends on the reader. Some have only 3 sizes (like my PRS-300). That is the reason why a lot of epub-creators use em as size measure instead of pt. In this case 1 em is the default font size of the reader. In the PRS-300 case that is the setting on S and the letters are about 3-4 mm I think. It could happen that if you specify the font in pt or px that sizing the font will no longer work. Could be nice for chapter headings (stress could), but in general I think that is a pain in the a*s. |
![]() |
![]() |
![]() |
#25 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 3,720
Karma: 1759970
Join Date: Sep 2010
Device: none
|
its handy to know that sony default size (S) is that same as font-size 1em
assuming it's the same for all sony readers. that's a useful reference point. pretty much all CSS that have inspected use ems for font size sizing. |
![]() |
![]() |
![]() |
#26 | |
frumious Bandersnatch
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 7,522
Karma: 19000001
Join Date: Jan 2008
Location: Spaniard in Sweden
Device: Cybook Orizon, Kobo Aura
|
Quote:
If you set a relative font size like "font-size: 1.5em" or "font-size: 150%", it will grow or sink as you change the font size in your reader. If you set an absolute font size like "font-size: 12pt", it will stay fixed (unless the reader has some way of overriding this) |
|
![]() |
![]() |
![]() |
#27 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 4,520
Karma: 121692313
Join Date: Oct 2009
Location: Heemskerk, NL
Device: PRS-T1, Kobo Touch, Kobo Aura
|
Thanks for the update Jellby, that is better info than I had. Since my reader usually starts at size S I assumed that this was the same as 1em. Always great to learn.
|
![]() |
![]() |
![]() |
#28 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 3,720
Karma: 1759970
Join Date: Sep 2010
Device: none
|
does line -height also default to 1em?
i oftern see 1.2 em in CSS but have not messed with that to date I also see font sizes with about 6 decimal places - suspect that is a side effect of conversions from word or from PDF e.g. font-size: 1.29167em; font-size: 1.41667em; |
![]() |
![]() |
![]() |
#29 | ||
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 6,212
Karma: 16534894
Join Date: Sep 2009
Location: UK
Device: Kobo: KA1, ClaraHD, Forma, Libra2, Clara2E. PocketBook: TouchHD3
|
Quote:
Quote:
I've probably made that clear as mud ![]() |
||
![]() |
![]() |
![]() |
#30 | |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 3,720
Karma: 1759970
Join Date: Sep 2010
Device: none
|
Quote:
|
|
![]() |
![]() |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Embedding fonts with Sigil? | MacEachaidh | Sigil | 4 | 08-20-2010 07:16 AM |
Embedding fonts | JaneFancher | Calibre | 14 | 04-10-2010 09:28 PM |
Embedding fonts with Sigil and Calibre | JaneFancher | Calibre | 1 | 04-09-2010 12:35 AM |
Embedding fonts | AprilHare | ePub | 6 | 01-02-2010 11:42 AM |
Embedding fonts | jash | Calibre | 2 | 09-09-2008 05:05 PM |