![]() |
#1 |
Guru
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 817
Karma: 6528026
Join Date: Sep 2012
Device: Kobo Elipsa
|
Font trouble
I am having trouble adding a monospace font to my Kobo Aura HD without embedding a monospace font in every epub that calls for it. I know this has been explained over and over, but I am not understanding, obviously. Here is what I have done:
First, I created a fonts directory in the root of my Kobo Aura HD. I copied the otf files for a font called FreeFontMono into this directory. The font filenames are called: FreeMono.otf, FreeMonoBold.otf, FreeMonoOblique.otf, and FreeMonoBoldOblique.otf (I then powered off the Aura HD and turned it back on.) Second, in the internal CSS of the epub, I added the statement: font-family: monospace to the class called Para, which is the class used for all paragraphs in the epub. Third, I made sure the Modify CSS feature in the Calibre KOBOTOUCH driver was enabled. In my custom kobo_extra.css file, I included the following: @font-face { font-family: monospace; src: url("res:///fonts/FreeFontMono") } Lastly, I deleted the book off the Aura HD, and re-loaded it from Calibre. No monospace font. ![]() I know the font has to be named exactly right for Kobo to recognize it, but I'm not sure what the "internal" font name is. Is it the "FreeFontMono"? Or "FreeMono"? Or "FreeMono.otf"? In Jackie_W's instructions, the src: url instruction includes a subdirectory called "normal" under the "fonts" directory. I tried that too, but it didn't seem to work. If someone could just point me to where I have gone wrong, I'd appreciate it. Thanks. |
![]() |
![]() |
![]() |
#2 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 6,251
Karma: 16539642
Join Date: Sep 2009
Location: UK
Device: ClaraHD, Forma, Libra2, Clara2E, LibraCol, PBTouchHD3
|
1. Are you a Windows user? If so, to get the internal font name double-click on an otf file and look in the top left corner for Font name: Check all 4 to make sure the name is exactly the same in each. How does that name compare with the actual otf filenames you've copied to the fonts dir. If the internal name for all 4 is FreeMono then you'll have to rename them to
FreeMono.otf (or FreeMono-Regular.otf) FreeMono-Italic.otf FreeMono-Bold.otf FreeMono-BoldItalic.otf 2. Does FreeMono appear as an option in the standard font menu after the PowerOff/On? 3. That normal subdir from my earlier notes definitely needs to be there (at least on fw up to and including 3.1.1) In the meantime I'm going to try loading FreeMono myself (looks a bit spindly to me) and see what happens. I have had problems in the past with some otf fonts. Lets hope that's not the case here. Last edited by jackie_w; 02-25-2014 at 10:00 PM. Reason: typo |
![]() |
![]() |
Advert | |
|
![]() |
#3 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 6,251
Karma: 16539642
Join Date: Sep 2009
Location: UK
Device: ClaraHD, Forma, Libra2, Clara2E, LibraCol, PBTouchHD3
|
It works for me. This is what I added to kobo_extra.css
Code:
@font-face {font-family: monospace; font-weight: normal; font-style: normal; src: url("res:///fonts/normal/FreeMono")} @font-face {font-family: monospace; font-weight: bold; font-style: normal; src: url("res:///fonts/bold/FreeMono")} @font-face {font-family: monospace; font-weight: normal; font-style: italic; src: url("res:///fonts/italic/FreeMono")} @font-face {font-family: monospace; font-weight: bold; font-style: italic; src: url("res:///fonts/bolditalic/FreeMono")} Last edited by jackie_w; 02-25-2014 at 10:03 PM. Reason: missed a bit |
![]() |
![]() |
![]() |
#4 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 5,814
Karma: 68407974
Join Date: Dec 2011
Location: Australia
Device: Kobo Libra 2, iPadMini4, iPad4, MBP; support other Kobo/Kindles
|
As well as the correct naming, you're also going to have to completely reboot your device (not just sleep/unsleep) before any added fonts will work.
|
![]() |
![]() |
![]() |
#5 |
Guru
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 817
Karma: 6528026
Join Date: Sep 2012
Device: Kobo Elipsa
|
Thank you, Jackie. I am trying it now. One quick question:
1. Does each otf file go in its own subdir under the /fonts directory? Everything I read says the all the font files should go into the /fonts directory (with no mention of any subdirectories), but the paths you reference shows separate subdirs as follows: fonts/normal, fonts/bold, fonts/italic and fonts/bolditalic. Thanks so much. I am close. |
![]() |
![]() |
Advert | |
|
![]() |
#6 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 6,251
Karma: 16539642
Join Date: Sep 2009
Location: UK
Device: ClaraHD, Forma, Libra2, Clara2E, LibraCol, PBTouchHD3
|
Don't try to overthink it
![]() |
![]() |
![]() |
![]() |
#7 |
Guru
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 817
Karma: 6528026
Join Date: Sep 2012
Device: Kobo Elipsa
|
Success! Thank you so much. I renamed the fonts, dumped them all into /fonts, rebooted the device, and voila, my device recognizes them. Thanks for being patient with me.
Does this whole renaming thing have to be done with embedded fonts as well? Usually I strip all embedded fonts from my epubs, but there are a few with a "handwriting" font that I left in (but I can't remember which books they were, so I can't check). If I need to rename the embedded fonts too, that will be a major pain. Does Kobo respect the standard method of embedding fonts into an individual epub? Thanks again, very much. |
![]() |
![]() |
![]() |
#8 | |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 6,251
Karma: 16539642
Join Date: Sep 2009
Location: UK
Device: ClaraHD, Forma, Libra2, Clara2E, LibraCol, PBTouchHD3
|
Quote:
You're welcome ![]() |
|
![]() |
![]() |
![]() |
#9 | |
Bibliophagist
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 46,149
Karma: 168983734
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Libra Colour, Lenovo M8 FHD, Paperwhite 4, Tolino epos
|
Quote:
Regards, David |
|
![]() |
![]() |
![]() |
#10 | |
Guru
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 817
Karma: 6528026
Join Date: Sep 2012
Device: Kobo Elipsa
|
Quote:
|
|
![]() |
![]() |
![]() |
#11 | |
Bibliophagist
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 46,149
Karma: 168983734
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Libra Colour, Lenovo M8 FHD, Paperwhite 4, Tolino epos
|
Quote:
Regards, David |
|
![]() |
![]() |
![]() |
#12 |
Zealot
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 144
Karma: 155110
Join Date: Nov 2010
Location: Ashford, Kent, England
Device: Kobo Clara, Kobo Touch, Kindle, Nook Touch
|
I'm Not Having Any Luck Embedding Fonts!!
Hello, all:
I have just run into the problem of using embedded fonts with the Kobo Touch. It would seem from the conversation in this thread that the problem has been solved but I sure can't figure it out! Over the past couple of weeks I have tried many different fonts to no avail! I need to embed fonts because I want to use Serif, Sans Serif, Monotype, and Narrow fonts in the same EPub. I am converting a large HTML file using Sigil to produce the EPub and Calibre to put it on my Kobo. I get different results in Sigil, the reader in Calibre, and on the Kobo. Anything that anyone can suggest would be most helpful!! Thanks in advance. Regards, Sparky |
![]() |
![]() |
![]() |
#13 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 24,905
Karma: 47303824
Join Date: Jul 2011
Location: Sydney, Australia
Device: Kobo:Touch,Glo, AuraH2O, GloHD,AuraONE, ClaraHD, Libra H2O; tolinoepos
|
Can we see some sample code? If you can post the non-working epub, someone can pull it apart. If there are copyright issues, post an epub which uses the same code and a either a small part of the text or where you have changed to text to something else. Just make sure it has all the parts needed: fonts, OPF, NCX, CSS and a html file.
|
![]() |
![]() |
![]() |
#14 |
Zealot
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 144
Karma: 155110
Join Date: Nov 2010
Location: Ashford, Kent, England
Device: Kobo Clara, Kobo Touch, Kindle, Nook Touch
|
![]()
Hello, David, et al:
Thanks for offering to take a look at my efforts. I must admit this is my first effort at "building" an EPub, so I have had a steep learning curve, but I have tried to follow as many sources as I could find. Finally, I was just about to pack it in when I found this thread! Thanks in advance for any help you can offer! Regards, Sparky |
![]() |
![]() |
![]() |
#15 |
Zealot
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 105
Karma: 5885446
Join Date: Feb 2014
Device: Kobo Glo
|
I just took a quick look at your test file.
It seems that you were commenting the font styles. Anything between /* and */ is considered as comment in .css files (thus, ignored). |
![]() |
![]() |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Mini advanced font settings ignored in one book - embedded font? | lordofazeroth | Kobo Reader | 4 | 09-20-2013 02:15 PM |
Determine font and font size on incoming epub? | peaceridge | Calibre | 4 | 01-30-2012 03:35 PM |
Trouble making my own font set - help please. | bruck | Kindle Developer's Corner | 2 | 08-14-2011 11:41 AM |
ttc font file can't be put into font folder | droople | Sigil | 2 | 08-21-2010 10:05 AM |
feed to lrf, how do I change font (or have default font) | lovemov | Calibre | 3 | 03-16-2009 10:57 PM |