Register Guidelines E-Books Search Today's Posts Mark Forums Read

Go Back   MobileRead Forums > E-Book Readers > Kobo Reader

Notices

Reply
 
Thread Tools Search this Thread
Old 02-25-2014, 08:03 PM   #1
icallaci
Addict
icallaci ought to be getting tired of karma fortunes by now.icallaci ought to be getting tired of karma fortunes by now.icallaci ought to be getting tired of karma fortunes by now.icallaci ought to be getting tired of karma fortunes by now.icallaci ought to be getting tired of karma fortunes by now.icallaci ought to be getting tired of karma fortunes by now.icallaci ought to be getting tired of karma fortunes by now.icallaci ought to be getting tired of karma fortunes by now.icallaci ought to be getting tired of karma fortunes by now.icallaci ought to be getting tired of karma fortunes by now.icallaci ought to be getting tired of karma fortunes by now.
 
Posts: 255
Karma: 636268
Join Date: Sep 2012
Device: Kobo Aura H20, Kobo Aura HD, Samsung Galaxy Note 2, iPad 3
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.
icallaci is offline   Reply With Quote
Old 02-25-2014, 10:26 PM   #2
jackie_w
Wizard
jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.
 
Posts: 2,884
Karma: 4200035
Join Date: Sep 2009
Location: UK
Device: Sony PRS-350, PB360, Kobo Glo/AuraHD/Aura6"/AuraH2O
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 11:00 PM. Reason: typo
jackie_w is offline   Reply With Quote
Old 02-25-2014, 11:00 PM   #3
jackie_w
Wizard
jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.
 
Posts: 2,884
Karma: 4200035
Join Date: Sep 2009
Location: UK
Device: Sony PRS-350, PB360, Kobo Glo/AuraHD/Aura6"/AuraH2O
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")}
Here's a screencap. I had one of my serif fonts selected in the Kobo font menu and font-family:monospace assigned to the classes for these few paragraphs.
Attached Thumbnails
Click image for larger version

Name:	FreeMono.jpg
Views:	130
Size:	37.5 KB
ID:	119588  

Last edited by jackie_w; 02-25-2014 at 11:03 PM. Reason: missed a bit
jackie_w is offline   Reply With Quote
Old 02-25-2014, 11:11 PM   #4
meeera
Wizard
meeera ought to be getting tired of karma fortunes by now.meeera ought to be getting tired of karma fortunes by now.meeera ought to be getting tired of karma fortunes by now.meeera ought to be getting tired of karma fortunes by now.meeera ought to be getting tired of karma fortunes by now.meeera ought to be getting tired of karma fortunes by now.meeera ought to be getting tired of karma fortunes by now.meeera ought to be getting tired of karma fortunes by now.meeera ought to be getting tired of karma fortunes by now.meeera ought to be getting tired of karma fortunes by now.meeera ought to be getting tired of karma fortunes by now.
 
meeera's Avatar
 
Posts: 2,254
Karma: 7560000
Join Date: Dec 2011
Location: Australia
Device: Kobo Aura, iPad MiniRet, MBP;support AuraHD,Kindle,2xKobo Glos
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.
meeera is offline   Reply With Quote
Old 02-26-2014, 02:41 AM   #5
icallaci
Addict
icallaci ought to be getting tired of karma fortunes by now.icallaci ought to be getting tired of karma fortunes by now.icallaci ought to be getting tired of karma fortunes by now.icallaci ought to be getting tired of karma fortunes by now.icallaci ought to be getting tired of karma fortunes by now.icallaci ought to be getting tired of karma fortunes by now.icallaci ought to be getting tired of karma fortunes by now.icallaci ought to be getting tired of karma fortunes by now.icallaci ought to be getting tired of karma fortunes by now.icallaci ought to be getting tired of karma fortunes by now.icallaci ought to be getting tired of karma fortunes by now.
 
Posts: 255
Karma: 636268
Join Date: Sep 2012
Device: Kobo Aura H20, Kobo Aura HD, Samsung Galaxy Note 2, iPad 3
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.
icallaci is offline   Reply With Quote
Old 02-26-2014, 07:30 AM   #6
jackie_w
Wizard
jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.
 
Posts: 2,884
Karma: 4200035
Join Date: Sep 2009
Location: UK
Device: Sony PRS-350, PB360, Kobo Glo/AuraHD/Aura6"/AuraH2O
Don't try to overthink it You put them all in directory fonts but I think the Kobo must do its own internal "something" with them. The code should work just as I've shown above.
jackie_w is offline   Reply With Quote
Old 02-26-2014, 10:07 AM   #7
icallaci
Addict
icallaci ought to be getting tired of karma fortunes by now.icallaci ought to be getting tired of karma fortunes by now.icallaci ought to be getting tired of karma fortunes by now.icallaci ought to be getting tired of karma fortunes by now.icallaci ought to be getting tired of karma fortunes by now.icallaci ought to be getting tired of karma fortunes by now.icallaci ought to be getting tired of karma fortunes by now.icallaci ought to be getting tired of karma fortunes by now.icallaci ought to be getting tired of karma fortunes by now.icallaci ought to be getting tired of karma fortunes by now.icallaci ought to be getting tired of karma fortunes by now.
 
Posts: 255
Karma: 636268
Join Date: Sep 2012
Device: Kobo Aura H20, Kobo Aura HD, Samsung Galaxy Note 2, iPad 3
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.
icallaci is offline   Reply With Quote
Old 02-26-2014, 11:51 AM   #8
jackie_w
Wizard
jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.
 
Posts: 2,884
Karma: 4200035
Join Date: Sep 2009
Location: UK
Device: Sony PRS-350, PB360, Kobo Glo/AuraHD/Aura6"/AuraH2O
Quote:
Originally Posted by icallaci View Post
Does this whole renaming thing have to be done with embedded fonts as well?
I don't think so, but like you, I normally strip out embedded fonts so it's difficult to check. I think we'd be seeing it raised in the forum if everyone was having to rename the embedded fonts in their old books to get them to work properly on a Kobo.

Quote:
Originally Posted by icallaci View Post
Thanks again, very much.
You're welcome
jackie_w is offline   Reply With Quote
Old 02-26-2014, 06:37 PM   #9
DNSB
Bibliophagist
DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.
 
DNSB's Avatar
 
Posts: 2,324
Karma: 6142827
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Aura HD, Glo, Nexus 7 HD, iPad Air
Quote:
Originally Posted by icallaci View Post
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.
I have one book that uses an embedded handwriting font and it works despite the font name not even being close to the embedded font name. From other books with embedded fonts, it would appear that an embedded font does not have the same need for a name matching the internal font name as a font stored on the Kobo.

Regards,
David
DNSB is offline   Reply With Quote
Old 02-26-2014, 11:20 PM   #10
icallaci
Addict
icallaci ought to be getting tired of karma fortunes by now.icallaci ought to be getting tired of karma fortunes by now.icallaci ought to be getting tired of karma fortunes by now.icallaci ought to be getting tired of karma fortunes by now.icallaci ought to be getting tired of karma fortunes by now.icallaci ought to be getting tired of karma fortunes by now.icallaci ought to be getting tired of karma fortunes by now.icallaci ought to be getting tired of karma fortunes by now.icallaci ought to be getting tired of karma fortunes by now.icallaci ought to be getting tired of karma fortunes by now.icallaci ought to be getting tired of karma fortunes by now.
 
Posts: 255
Karma: 636268
Join Date: Sep 2012
Device: Kobo Aura H20, Kobo Aura HD, Samsung Galaxy Note 2, iPad 3
Quote:
Originally Posted by DNSB View Post
I have one book that uses an embedded handwriting font and it works despite the font name not even being close to the embedded font name. From other books with embedded fonts, it would appear that an embedded font does not have the same need for a name matching the internal font name as a font stored on the Kobo.

Regards,
David
Ah, thank you for that information, David. I won't worry about it then. I am happily reading my book with the simulated computer screens rendered in a monospace font, a much-improved experience.
icallaci is offline   Reply With Quote
Old 02-27-2014, 02:09 AM   #11
DNSB
Bibliophagist
DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.
 
DNSB's Avatar
 
Posts: 2,324
Karma: 6142827
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Aura HD, Glo, Nexus 7 HD, iPad Air
Quote:
Originally Posted by icallaci View Post
Ah, thank you for that information, David. I won't worry about it then. I am happily reading my book with the simulated computer screens rendered in a monospace font, a much-improved experience.
I've stuffed the font definitions and set the <code> tag to use the monospaced font in my standard stylesheet. Once you've done it once, it's a lot easier.

Regards,
David
DNSB is offline   Reply With Quote
Old 03-25-2014, 03:50 PM   #12
TheArtfulDodger
Connoisseur
TheArtfulDodger can grok the meaning of the universe.TheArtfulDodger can grok the meaning of the universe.TheArtfulDodger can grok the meaning of the universe.TheArtfulDodger can grok the meaning of the universe.TheArtfulDodger can grok the meaning of the universe.TheArtfulDodger can grok the meaning of the universe.TheArtfulDodger can grok the meaning of the universe.TheArtfulDodger can grok the meaning of the universe.TheArtfulDodger can grok the meaning of the universe.TheArtfulDodger can grok the meaning of the universe.TheArtfulDodger can grok the meaning of the universe.
 
TheArtfulDodger's Avatar
 
Posts: 59
Karma: 155110
Join Date: Nov 2010
Location: Ashford, Kent, England
Device: 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
TheArtfulDodger is offline   Reply With Quote
Old 03-25-2014, 11:44 PM   #13
davidfor
Grand Sorcerer
davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.
 
Posts: 5,897
Karma: 5704423
Join Date: Jul 2011
Location: Sydney, Australia
Device: Kobo Touch, Kobo Glo
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.
davidfor is offline   Reply With Quote
Old 03-26-2014, 09:04 AM   #14
TheArtfulDodger
Connoisseur
TheArtfulDodger can grok the meaning of the universe.TheArtfulDodger can grok the meaning of the universe.TheArtfulDodger can grok the meaning of the universe.TheArtfulDodger can grok the meaning of the universe.TheArtfulDodger can grok the meaning of the universe.TheArtfulDodger can grok the meaning of the universe.TheArtfulDodger can grok the meaning of the universe.TheArtfulDodger can grok the meaning of the universe.TheArtfulDodger can grok the meaning of the universe.TheArtfulDodger can grok the meaning of the universe.TheArtfulDodger can grok the meaning of the universe.
 
TheArtfulDodger's Avatar
 
Posts: 59
Karma: 155110
Join Date: Nov 2010
Location: Ashford, Kent, England
Device: Kobo Touch, Kindle, Nook Touch
Question My Horribly-Failing EPub Example!

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
Attached Files
File Type: epub Test Items - 6.epub (132.4 KB, 15 views)
TheArtfulDodger is offline   Reply With Quote
Old 03-26-2014, 09:39 AM   #15
arasyi
Connoisseur
arasyi ought to be getting tired of karma fortunes by now.arasyi ought to be getting tired of karma fortunes by now.arasyi ought to be getting tired of karma fortunes by now.arasyi ought to be getting tired of karma fortunes by now.arasyi ought to be getting tired of karma fortunes by now.arasyi ought to be getting tired of karma fortunes by now.arasyi ought to be getting tired of karma fortunes by now.arasyi ought to be getting tired of karma fortunes by now.arasyi ought to be getting tired of karma fortunes by now.arasyi ought to be getting tired of karma fortunes by now.arasyi ought to be getting tired of karma fortunes by now.
 
Posts: 84
Karma: 2096682
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).
arasyi is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Mini advanced font settings ignored in one book - embedded font? lordofazeroth Kobo Reader 4 09-20-2013 03:15 PM
Determine font and font size on incoming epub? peaceridge Calibre 4 01-30-2012 04:35 PM
Trouble making my own font set - help please. bruck Kindle Developer's Corner 2 08-14-2011 12:41 PM
ttc font file can't be put into font folder droople Sigil 2 08-21-2010 11:05 AM
feed to lrf, how do I change font (or have default font) lovemov Calibre 3 03-16-2009 11:57 PM


All times are GMT -4. The time now is 03:32 AM.


MobileRead.com is a privately owned, operated and funded community.