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

Go Back   MobileRead Forums > E-Book Formats > Kindle Formats

Notices

Closed Thread
 
Thread Tools Search this Thread
Old 05-13-2013, 02:00 AM   #1
writerkit
Enthusiast
writerkit began at the beginning.
 
Posts: 27
Karma: 10
Join Date: Mar 2013
Device: none
Mobi font specifications

I understand that mobi does not support embedded fonts, but shouldn't it at least accept the directive to use sans-serif rather than serif, if my CSS directs it to?

My code is fine - all the other formats (EPUB, AZW3) are reading the embedded font without a problem. I'm converting with Calibre from an XHTML file. The CSS looks like this:

font-family: "Overlock", sans-serif;

MOBI, however, appears to ignore the whole thing and defaults to a serif font.

Any help to force a sans-serif font in MOBI would be hugely appreciated.
writerkit is offline  
Old 05-16-2013, 04:59 AM   #2
Hitch
Bookmaker & Cat Slave
Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.
 
Hitch's Avatar
 
Posts: 2,012
Karma: 10499963
Join Date: Apr 2010
Location: Phoenix, AZ
Device: Kindle2, iPad, KindleFire and NookColor
Quote:
Originally Posted by writerkit View Post
I understand that mobi does not support embedded fonts, but shouldn't it at least accept the directive to use sans-serif rather than serif, if my CSS directs it to?

My code is fine - all the other formats (EPUB, AZW3) are reading the embedded font without a problem. I'm converting with Calibre from an XHTML file. The CSS looks like this:

font-family: "Overlock", sans-serif;

MOBI, however, appears to ignore the whole thing and defaults to a serif font.

Any help to force a sans-serif font in MOBI would be hugely appreciated.

Do you mean mobi or prc? Do you mean for the K8-enabled devices or for the K7? Because K6/7 (the "old" mobi format for Kindle, Kindle2, DX, etc.) does not use CSS nor will it accept any font-face declarations via CSS. You can set a font to Courier monospaced, if you will (using html, not CSS), but that's it. If you are talking about K8, then, yes, you should be able to obtain a sans serif font, but it helps if you embed the actual fonts.

Hitch
Hitch is offline  
 
Enthusiast
Old 05-16-2013, 08:14 AM   #3
DiapDealer
Grand Sorcerer
DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.
 
DiapDealer's Avatar
 
Posts: 8,320
Karma: 36126080
Join Date: Jan 2010
Device: Kindle Fire HD, Kindle 2
When it comes to the old pre-KF8 MOBIs. I either use NO font specification, or I use "font-family: monospaced;" to provide a bit of "font-variety" for special sections. Not really worth trying to get those old MOBI6 files to do anything more than that, really.

Last edited by DiapDealer; 05-16-2013 at 02:20 PM.
DiapDealer is offline  
Old 05-16-2013, 02:04 PM   #4
susan_cassidy
Wizard
susan_cassidy ought to be getting tired of karma fortunes by now.susan_cassidy ought to be getting tired of karma fortunes by now.susan_cassidy ought to be getting tired of karma fortunes by now.susan_cassidy ought to be getting tired of karma fortunes by now.susan_cassidy ought to be getting tired of karma fortunes by now.susan_cassidy ought to be getting tired of karma fortunes by now.susan_cassidy ought to be getting tired of karma fortunes by now.susan_cassidy ought to be getting tired of karma fortunes by now.susan_cassidy ought to be getting tired of karma fortunes by now.susan_cassidy ought to be getting tired of karma fortunes by now.susan_cassidy ought to be getting tired of karma fortunes by now.
 
Posts: 1,738
Karma: 1643110
Join Date: Jan 2009
Device: Kindle, iPad (not used much for reading)
You should really let the user choose the font, if their ereader supports that. Not specify it. Readers often prefer different fonts than you might.
susan_cassidy is offline  
Old 05-16-2013, 02:47 PM   #5
Hitch
Bookmaker & Cat Slave
Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.
 
Hitch's Avatar
 
Posts: 2,012
Karma: 10499963
Join Date: Apr 2010
Location: Phoenix, AZ
Device: Kindle2, iPad, KindleFire and NookColor
Quote:
Originally Posted by susan_cassidy View Post
You should really let the user choose the font, if their ereader supports that. Not specify it. Readers often prefer different fonts than you might.
Susan:

He might have a perfectly good reason to want a slightly different font; say the hero stumbles across a road-sign, or a diary entry. Or a newspaper article, and he wants to change the headline font, so as to alert the reader that what s/he is reading now is removed from the regular narrative flow. Using a different font is an excellent way to signal that, in an environment in which many of the other routes traditionally available to book designers, like using blockquoted-style text, are no longer available to him or her.

Just an observation. I mean, sure, s/he could just use bold, or make it bigger, but...using a line or some words in Courier monospaced wouldn't ruin the whole book for someone; and in pre-KF8 mobis, the user didn't have the luxury of choosing his or her font anyway; they were "stuck" with Caecilia (TNR clone).

Best,
Hitch
Hitch is offline  
Old 05-17-2013, 04:23 AM   #6
writerkit
Enthusiast
writerkit began at the beginning.
 
Posts: 27
Karma: 10
Join Date: Mar 2013
Device: none
Thanks everyone.

@Hitch - well, what I didn't say is that I'm using Calibre to convert my XHTML file, and we get 3 choices for MOBI: "old," "new," and "both." I use "old" for my MOBI conversion because Calibre warns us that there will be display issues with the other two options in some devices. For KF8 I convert to AZW3. So my best guess, to answer your question, is that the MOBI format I'm using is for the pre-KF8 devices.

@DiapDealer - yes, I've come to that conclusion as well. Monospace fonts won't work for my book, I'm afraid.

@Susan_cassidy - thanks for your opinion, which I respect, but I've never liked the word "should."
writerkit is offline  
Old 05-17-2013, 04:44 AM   #7
Hitch
Bookmaker & Cat Slave
Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.
 
Hitch's Avatar
 
Posts: 2,012
Karma: 10499963
Join Date: Apr 2010
Location: Phoenix, AZ
Device: Kindle2, iPad, KindleFire and NookColor
Quote:
Originally Posted by writerkit View Post
Thanks everyone.

@Hitch - well, what I didn't say is that I'm using Calibre to convert my XHTML file, and we get 3 choices for MOBI: "old," "new," and "both." I use "old" for my MOBI conversion because Calibre warns us that there will be display issues with the other two options in some devices. For KF8 I convert to AZW3. So my best guess, to answer your question, is that the MOBI format I'm using is for the pre-KF8 devices.

@DiapDealer - yes, I've come to that conclusion as well. Monospace fonts won't work for my book, I'm afraid.

@Susan_cassidy - thanks for your opinion, which I respect, but I've never liked the word "should."
writerkit:

If the book is not being prepared commercially, then having two versions is perfectly fine; you can determine where they are being provided, and, no problem. If you are preparing these books for commercial distribution, you have a different issue; you cannot provide two different files to Amazon for the same book, one in KF7, one in KF8. You must create a single mobi file that contains the styling for both.

Are you preparing this book for commercial sale and distribution? If you are, firstly, you should not use Calibre, because its conversions are often rejected at the KDP, for some reason or the other. Secondly, you'll need to learn how to code "fall-back" styling so that you can use embedded fonts in the K8 "portion" of the final mobi, but also achieve some discernible styling in the K7 version that's packaged in the mastermobi style. This is a way of using CSS to essentially tell the device rendering the book "if, then," so that if the device is Kf8 enabled, it uses the CSS, and specific CSS therein; if the device is KF7, it uses specific alternative coding for that device when it's delivered to the user.

I think that the wiki may have some tutorials you can use to learn this coding, and I think that Guido Henkel discusses fallback styling in his blog. Learning this level of coding is a bit much to be explained in a forum posting, particularly if (no offense) you don't even yet know that basic (old) mobi format doesn't even use CSS.

Hope that helps, at least a little,
Hitch
Hitch is offline  
Old 05-24-2013, 05:23 PM   #8
writerkit
Enthusiast
writerkit began at the beginning.
 
Posts: 27
Karma: 10
Join Date: Mar 2013
Device: none
@Hitch - not distributing this particular book through Amazon or any of the brokers at the moment, but yes, I understand that KDE doesn't actually accept ebook files at all, as I recall - only raw text. I may be wrong about that.

Still need to know how to get the Mobi to default to a sans-serif rather than a serif font, though. Maybe this isn't possible. I'm not sure fallback styling coding will make a difference, but I very much appreciate your suggestions - I might take a look at the Wiki.

And I've read Guido's blog - he's a superhero.
writerkit is offline  
Old 05-24-2013, 10:23 PM   #9
Hitch
Bookmaker & Cat Slave
Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.
 
Hitch's Avatar
 
Posts: 2,012
Karma: 10499963
Join Date: Apr 2010
Location: Phoenix, AZ
Device: Kindle2, iPad, KindleFire and NookColor
Quote:
Originally Posted by writerkit View Post
@Hitch - not distributing this particular book through Amazon or any of the brokers at the moment, but yes, I understand that KDE doesn't actually accept ebook files at all, as I recall - only raw text. I may be wrong about that.

Still need to know how to get the Mobi to default to a sans-serif rather than a serif font, though. Maybe this isn't possible. I'm not sure fallback styling coding will make a difference, but I very much appreciate your suggestions - I might take a look at the Wiki.

And I've read Guido's blog - he's a superhero.
writerkit:

I still don't know if you're making a K7 mobi or a K8, or both. I don't know which, so I don't know what to tell you. If it's a K7, then, no, you can't do it. If it's a k8, embed a sans-serif font or try to call one of the available sans serif fonts that are already on the Fire, Paperwhite, etc., devices.

And the KDP certainly accepts ebook files, both in ePUB and MOBI format, as well as zipped html and even prc files. I hope that helps.

Hitch
Hitch is offline  
Old 05-31-2013, 04:55 PM   #10
writerkit
Enthusiast
writerkit began at the beginning.
 
Posts: 27
Karma: 10
Join Date: Mar 2013
Device: none
Quote:
Originally Posted by Hitch View Post
writerkit:

I still don't know if you're making a K7 mobi or a K8, or both. I don't know which, so I don't know what to tell you. If it's a K7, then, no, you can't do it. If it's a k8, embed a sans-serif font or try to call one of the available sans serif fonts that are already on the Fire, Paperwhite, etc., devices.

And the KDP certainly accepts ebook files, both in ePUB and MOBI format, as well as zipped html and even prc files. I hope that helps.

Hitch
Sorry - I may have been mistaken in my assumption KF8 only reads AZW3 files, and that earlier Kindles are the only ones that read MOBI. Calibre does not specify the device in its mobi output interface. It only gives us the option of "old" mobi, "new" mobi, or "both." It discourages the use of "both" or "new" so I've been using "old." I suppose I could make the guess then that I'm making a MOBI file for use on Kindles prior to KF8, but that would only be a guess.
writerkit is offline  
Old 05-31-2013, 06:03 PM   #11
Hitch
Bookmaker & Cat Slave
Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.
 
Hitch's Avatar
 
Posts: 2,012
Karma: 10499963
Join Date: Apr 2010
Location: Phoenix, AZ
Device: Kindle2, iPad, KindleFire and NookColor
Quote:
Originally Posted by writerkit View Post
Sorry - I may have been mistaken in my assumption KF8 only reads AZW3 files, and that earlier Kindles are the only ones that read MOBI. Calibre does not specify the device in its mobi output interface. It only gives us the option of "old" mobi, "new" mobi, or "both." It discourages the use of "both" or "new" so I've been using "old." I suppose I could make the guess then that I'm making a MOBI file for use on Kindles prior to KF8, but that would only be a guess.
writerkit:

Not to be snarky, but you're not helping me much here. First you post complaining that mobi should "...at least accept the directive to use sans-serif rather than serif, if my CSS directs it to?," and then I ask you if you mean MOBI or PRC, then I ask you what type of MOBI you're making, and all I keep getting from you are answers related to Calibre, which quite bluntly has nothing whatsoever to do with making ebooks; it's a library tool, not a conversion and book-making tool. If you don't understand what type of ebook you're making, then how can you possibly expect to understand what type of CSS will or won't work for it?

If your "guess" that you're making a MOBI file for use on Kindles prior to KF8 is accurate, then in short, no, you can't direct it to use a san-serif font.

I don't know what you're feeding to Calibre to "make" a mobi file, but you might consider using Kindlegen or KindlePreviewer, which are the actual tools provided by Amazon with which to genuinely make Kindle books, to work on Kindle devices. The reason that you're being "warned off" using Calibre is because Amazon routinely rejects Calibre-made books. AZW3 has nothing to do with the discussion, actually. If you're capable of making an XHTML file, you should be able to make an ePUB, and with a very small amount of additional learning, you can then feed that ePUB to KindleGen and get a perfectly-crafted MOBI file. Calibre is NOT a book-making tool; it's a library tool. Nothing against it as a library tool, but if you can write that, you should have no problems making a MOBI file correctly, that will, for the most part, do what you want it to (within Mobi's inherent limitations).

Hitch
Hitch is offline  
Old 05-31-2013, 09:23 PM   #12
RbnJrg
Addict
RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.
 
Posts: 376
Karma: 255494
Join Date: Mar 2013
Location: Rosario - Santa Fe - Argentina
Device: Kindle 4 NT
Quote:
Originally Posted by writerkit View Post
It discourages the use of "both" or "new" so I've been using "old." I suppose I could make the guess then that I'm making a MOBI file for use on Kindles prior to KF8, but that would only be a guess.
Yes, you are building a book for the old Kindle model. Here you can't use the fonts you want.
RbnJrg is offline  
Old 05-31-2013, 09:52 PM   #13
JSWolf
Suspended
JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.
 
Posts: 35,392
Karma: 16147088
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Sony Reader PRS-650, iPad, nook STR
What model Kindle are you trying to make this eBook for?
JSWolf is offline  
Old 06-07-2013, 02:16 AM   #14
writerkit
Enthusiast
writerkit began at the beginning.
 
Posts: 27
Karma: 10
Join Date: Mar 2013
Device: none
Hitch:
Quote:
Originally Posted by Hitch View Post
writerkit:

Not to be snarky, but you're not helping me much here. First you post complaining that mobi should "...at least accept the directive to use sans-serif rather than serif, if my CSS directs it to?," and then I ask you if you mean MOBI or PRC, then I ask you what type of MOBI you're making, and all I keep getting from you are answers related to Calibre, which quite bluntly has nothing whatsoever to do with making ebooks; it's a library tool, not a conversion and book-making tool. If you don't understand what type of ebook you're making, then how can you possibly expect to understand what type of CSS will or won't work for it?

If your "guess" that you're making a MOBI file for use on Kindles prior to KF8 is accurate, then in short, no, you can't direct it to use a san-serif font.

I don't know what you're feeding to Calibre to "make" a mobi file, but you might consider using Kindlegen or KindlePreviewer, which are the actual tools provided by Amazon with which to genuinely make Kindle books, to work on Kindle devices. The reason that you're being "warned off" using Calibre is because Amazon routinely rejects Calibre-made books. AZW3 has nothing to do with the discussion, actually. If you're capable of making an XHTML file, you should be able to make an ePUB, and with a very small amount of additional learning, you can then feed that ePUB to KindleGen and get a perfectly-crafted MOBI file. Calibre is NOT a book-making tool; it's a library tool. Nothing against it as a library tool, but if you can write that, you should have no problems making a MOBI file correctly, that will, for the most part, do what you want it to (within Mobi's inherent limitations).

Hitch

Hitch: not to be snarky, but you ARE being snarky, and I've been nothing but polite, while you've been totally ignoring the info in my answers to you. One more rehash of what I've already said, and then I'm done:

1) I'm not making this book for distribution on Amazon, so their specifications are of no consequence to me or of relevance to my original question. My ebook is intended to be sold elsewhere and sideloaded.

2) I am using Calibre to create my ebook. I've already created two ebooks with it, by converting my HTML docs into several different ebook formats - lots of authors have. In fact, I learned the process from Guido's blog. This is simply the first time I've converted to the "old mobi" format. If you've never used Calibre, then you don't know what you're talking about, so why not just admit that and let it go?

I've got my answer, from the other perfectly polite people on this thread, so thanks anyway. Sorry to so inconvenience you.
writerkit is offline  
Old 06-07-2013, 02:25 AM   #15
writerkit
Enthusiast
writerkit began at the beginning.
 
Posts: 27
Karma: 10
Join Date: Mar 2013
Device: none
Quote:
Originally Posted by JSWolf View Post
What model Kindle are you trying to make this eBook for?
Hi JSWolf - thanks for asking. I'm trying to create this ebook in a number of different formats to be read on as many different standard devices as I can. I will not be distributing it through Amazon, B&N, or iBooks, but I would like it to be readable on every version of their devices that a reader might have.

After some research, I assume the answer to my query is that my font specification can't be achieved when converting to Calibre's "old MOBI" format, which ignores my CSS code to use a sans-serif font. I'll have to live with that.

(Unless you have an idea of how to achieve it!)
writerkit is offline  
Closed Thread

Tags
css, sans-serif

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Font Issues Between Mobi and ePub GeckoFriend Conversion 4 04-16-2012 04:31 PM
The ePub 2.0.1 specifications and font embedding Giordano Galli ePub 8 09-24-2011 10:28 AM
0.7.58 Mobi Font Size problem Blossom Conversion 15 04-30-2011 09:27 PM
Different font sizes in mobi? veezh Kindle Formats 3 08-22-2010 04:28 AM
How about more font sizes with mobi? tselling Astak EZReader 22 11-21-2009 01:51 AM


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


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