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

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

Notices

Reply
 
Thread Tools Search this Thread
Old 10-19-2021, 06:24 AM   #1
emdashery
Member
emdashery began at the beginning.
 
Posts: 12
Karma: 10
Join Date: Oct 2021
Device: All
@media queries for older kindles?

Hi everyone!

I'm currently working on formatting a book that has numerous fonts central to the design. I've gotten everything to look good on Kindle and newer readers, but I'm wondering about changing specs for older Kindles?

I've been trying to do @media queries targeting mobi, but so far I'm not having any luck.

Can anyone offer some insight on how this works? What fonts and properties are supported? It's a day devotional so each day has:

h1 - The day - "January 1"
h2 - The topic of the day "Universal Law of Attraction"

A bible verse (using body font italic is fine here)
A quote (looking for a condensed sans-serif)
A reflection paragraph (regular body font is fine here with a drop cap)
A daily affirmation (also sans-serif, slightly bigger than the quote)

I think I can do all this with the limited fonts and stylings in mobi, but right now I can't get anything to work! Any help is appreciated!
emdashery is offline   Reply With Quote
Old 10-19-2021, 07:13 AM   #2
Quoth
the rook, bossing Never.
Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.
 
Quoth's Avatar
 
Posts: 3,983
Karma: 36000598
Join Date: Jun 2017
Location: Ireland
Device: Both Kinds: epub based makes and Kindle
Mobi, aka KF7 doesn't do much in the way of fonts. Serif, Sans, Monospace. Each in normal, italic, bold and bold italic. Also option of underline. The exact version of each these depends on the model. I've not had a problem using any arbitrary fonts in epu2 from docx and then the Amazon conversion to KF7 except with Monospace. It needs Monospace in the name.

Forget media queries. Do a decent epub2 with embedded fonts and upload that to Amazon KDP. They know what Kindle people have. Check mobi KF7 on a KK2, DX, DXG or earlier. A KK3 does also do KF8 if it was ever upgraded, if you pick Publisher Fonts.

Only Smashwords needs a dual mobi as well as epub2 (convert in Calibre).

Any ebook should still be readable just with basic Serif, Sans, Monospace. Each in normal, italic, bold and bold italic.

Use docx import to Calibre (or Sigil) but odt for edit/save if using LO Writer (never edit the docx only an extra save as).

Last edited by Quoth; 10-19-2021 at 07:16 AM.
Quoth is offline   Reply With Quote
Advert
Old 10-19-2021, 07:40 AM   #3
emdashery
Member
emdashery began at the beginning.
 
Posts: 12
Karma: 10
Join Date: Oct 2021
Device: All
Hi Quoth, thanks for the quick reply! I made the book in InDesign, exported to ePUB and have been editing the code in Calibre.

My issue is that in order for the embedded fonts to look normal in KDP, Ive had to increase their size dramatically (like up to 1.9em from 1.2) so when they get downconverted back to mobi, they look HUGE. Hence why I'm trying to target the older devices specifically.

Is there any other way around this other than to give up on my beautiful fonts? Or am I doing something wrong? All of my special fonts are targeted with ems, should I be using % instead?
emdashery is offline   Reply With Quote
Old 10-19-2021, 09:37 AM   #4
jhowell
Wizard
jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.
 
jhowell's Avatar
 
Posts: 4,847
Karma: 47934589
Join Date: Nov 2011
Location: Tampa Bay, Florida
Device: Oasis 2, Fire, iPad Air 2, Nexus 7
As Quoth indicated font support in MOBI7 format is extremely limited. I suggest using bold, italic, and underline to distinguish different content in your case.

The Kindle Formatting Guidelines has a section on Media Queries. You can target MOBI7 format using "@media amzn-mobi" and KF8 (and newer) using "@media amzn-kf8".

Note that MOBI7 does not truly support media queries. They are processed by kindlegen as part of the creation of that format from the source document.


(Also, the Kindle Formats subforum is a better place to ask this sort of question in the future.)
jhowell is online now   Reply With Quote
Old 10-19-2021, 09:53 AM   #5
emdashery
Member
emdashery began at the beginning.
 
Posts: 12
Karma: 10
Join Date: Oct 2021
Device: All
Third time replying....

Hi...I'm not sure why my replies aren't posting? I'll try again!

My issue is that I've needed to enlarge the specialty fonts way above normal to render normally in Kindle Previewer (like 1.8em instead of 1.2) so when it gets converted down to mobi....these particular styles are gigantic!

I was hoping to be able to target them directly just in mobi, but if I can't use the media query to do that...then I'm just SOL? Or I have to find a balance between too small in Kf8 and too big in KF7?

For reference I built the book in InDesign, exported to ePub and I've been editing all the code in Calibre.

I did try the very basic media query suggested by Amazon, but I haven't been able to get it to work after exporting the mobi file from Kindle Previewer and sideloading it onto my old kindle:

@media amzn-mobi {

.affirmation {
font-family: "Arial", sans-serif;
font-size: 1.3em;
line-height: 1;
}
}

Sorry for asking in the wrong place! Should I move it over?
emdashery is offline   Reply With Quote
Advert
Old 10-19-2021, 09:59 AM   #6
pdurrant
The Grand Mouse 高貴的老鼠
pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.
 
pdurrant's Avatar
 
Posts: 68,403
Karma: 293856656
Join Date: Jul 2007
Location: Norfolk, England
Device: Kindle Voyage
Quote:
Originally Posted by emdashery View Post
Hi...I'm not sure why my replies aren't posting? I'll try again!
Messages from new members often go into auto-moderation.
pdurrant is offline   Reply With Quote
Old 10-19-2021, 10:09 AM   #7
jhowell
Wizard
jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.
 
jhowell's Avatar
 
Posts: 4,847
Karma: 47934589
Join Date: Nov 2011
Location: Tampa Bay, Florida
Device: Oasis 2, Fire, iPad Air 2, Nexus 7
Getting embedded fonts to work can be difficult on the Kindle platform and even when it does work those fonts will only appear if the user explicitly selects Publisher Font as their font choice.
jhowell is online now   Reply With Quote
Old 10-19-2021, 10:33 AM   #8
emdashery
Member
emdashery began at the beginning.
 
Posts: 12
Karma: 10
Join Date: Oct 2021
Device: All
Quote:
Originally Posted by jhowell View Post
Getting embedded fonts to work can be difficult on the Kindle platform and even when it does work those fonts will only appear if the user explicitly selects Publisher Font as their font choice.
Sooo JHowell...are you suggesting I give up on embedding fonts altogether? They appear to be working great in Kindle Previewer and ADE and it's not just a normal novel where I don't think it matters much. I've also already paid a buttload of money for the epub licensing so I'd sure like to use them!

Here is an example page from the book for reference:


OK now this is weird...I just sideloaded the latest mobi file onto my decade-old Kindle 4...and the embedded fonts are working (with some very jacked-up line-heights)??? But not working on the newer Kindle 5? Color me confused!

emdashery is offline   Reply With Quote
Old 10-19-2021, 11:31 AM   #9
jhowell
Wizard
jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.
 
jhowell's Avatar
 
Posts: 4,847
Karma: 47934589
Join Date: Nov 2011
Location: Tampa Bay, Florida
Device: Oasis 2, Fire, iPad Air 2, Nexus 7
Quote:
Originally Posted by emdashery View Post
Sorry for asking in the wrong place! Should I move it over?
You will probably get more relevant responses from members experienced in publishing on Amazon if you have the thread moved. If you want that to happen you can request a moderator to do it by reporting (!) the first post in the thread.

Quote:
Originally Posted by emdashery View Post
Sooo JHowell...are you suggesting I give up on embedding fonts altogether?
That is for you to decide. I am just trying to inform you regarding the potential pitfalls of embedding fonts.

Quote:
Originally Posted by emdashery View Post
Here is an example page from the book for reference:
...
OK now this is weird...I just sideloaded the latest mobi file onto my decade-old Kindle 4...and the embedded fonts are working (with some very jacked-up line-heights)??? But not working on the newer Kindle 5? Color me confused!
The Kindle Previewer will show you how the book will appear in KFX format (Enhanced Typesetting). That will be how most users of newer Kindle apps and devices should see it.

Kindle 4th and 5th generation devices both use KF8 format and support embedded fonts. The difference in your results is most likely due to one device being configured to show the Publisher's Font and the other to show one of Amazon's fonts. Check in the Aa menu.
jhowell is online now   Reply With Quote
Old 10-19-2021, 12:56 PM   #10
emdashery
Member
emdashery began at the beginning.
 
Posts: 12
Karma: 10
Join Date: Oct 2021
Device: All
Quote:
Originally Posted by jhowell View Post
The difference in your results is most likely due to one device being configured to show the Publisher's Font and the other to show one of Amazon's fonts. Check in the Aa menu.
Thanks! Asked the thread to be moved, and you're absolutely right about the two kindles.

I guess my big question now is how do I get the ginormous line height to adjust in the older-gen kindles??? And what is telling it to be so big in the first place??
emdashery is offline   Reply With Quote
Old 10-19-2021, 01:12 PM   #11
issybird
o saeclum infacetum
issybird ought to be getting tired of karma fortunes by now.issybird ought to be getting tired of karma fortunes by now.issybird ought to be getting tired of karma fortunes by now.issybird ought to be getting tired of karma fortunes by now.issybird ought to be getting tired of karma fortunes by now.issybird ought to be getting tired of karma fortunes by now.issybird ought to be getting tired of karma fortunes by now.issybird ought to be getting tired of karma fortunes by now.issybird ought to be getting tired of karma fortunes by now.issybird ought to be getting tired of karma fortunes by now.issybird ought to be getting tired of karma fortunes by now.
 
issybird's Avatar
 
Posts: 17,238
Karma: 196588247
Join Date: Oct 2010
Location: New England
Device: H2O, GloHD, Aura One
Thread moved. Obviously.
issybird is online now   Reply With Quote
Old 10-19-2021, 04:42 PM   #12
Quoth
the rook, bossing Never.
Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.
 
Quoth's Avatar
 
Posts: 3,983
Karma: 36000598
Join Date: Jun 2017
Location: Ireland
Device: Both Kinds: epub based makes and Kindle
Quote:
Originally Posted by emdashery View Post
My issue is that in order for the embedded fonts to look normal in KDP, Ive had to increase their size dramatically (like up to 1.9em from 1.2) so when they get downconverted back to mobi, they look HUGE. Hence why I'm trying to target the older devices specifically.
I use 1 em (= 12pt) for body fonts unless its a font naturally very small or large (best avoided for body text).

NEVER set a line height in the Paragraph style, or else users can't set the line spacing and if you do "pick" a fixed line height per style it will be wrong, locked and vary by model.

In LO Writer for ebooks I leave LH for a paragraph style as "Single" and the size is either empty or greyed out. I do set the line heights for a PDF for a POD paper edition.
No issues.

InDesign is really for paper. Using LO Writer, Styles, edit in ODT and save as docx (never edit that in LO except once for a Word import) for Calibre.

Also I forgot to mention the KF8 "publisher font" issue with Kindle. AFAIK it's never automatically selected. The user has to pick it. But the Amazon fall back fonts vary with app and model of Kindle. A Fire isn't really a Kindle, it's really an Android tablet with an app, but not quite the same as iOS or Android, which are not quite the same and all the apps can manage "Kindle" material that doesn't work at all on an eink Kindle.

Last edited by Quoth; 10-19-2021 at 04:46 PM.
Quoth is offline   Reply With Quote
Old 10-19-2021, 05:41 PM   #13
emdashery
Member
emdashery began at the beginning.
 
Posts: 12
Karma: 10
Join Date: Oct 2021
Device: All
Quote:
Originally Posted by Quoth View Post
NEVER set a line height in the Paragraph style, or else users can't set the line spacing and if you do "pick" a fixed line height per style it will be wrong, locked and vary by model.
Interesting! I definitely have line heights set in all my paragraph styles! My body size is 1em(and defaults to system font, whatever that is on whatever reader), the issue is that the affirmations and scriptures need to stand out against the body and against each other, and just using bold, italic, etc is a LOT for the eyes to discern in a small space. The embedded fonts (when spaced properly) make it a lot easier on the eyes, imo.

I'm aware of the publisher fonts issue for KF8, nothing really to be done about that except try to make sure it still looks acceptable with any of the other fonts selected. Bummer more ppl don't know about that though!

I'll try tomorrow to remove the line height entirely and see what happens. Time for bed here in Espana...Thanks for taking the time!
emdashery is offline   Reply With Quote
Old 10-19-2021, 06:40 PM   #14
phillipgessert
Groupie
phillipgessert ought to be getting tired of karma fortunes by now.phillipgessert ought to be getting tired of karma fortunes by now.phillipgessert ought to be getting tired of karma fortunes by now.phillipgessert ought to be getting tired of karma fortunes by now.phillipgessert ought to be getting tired of karma fortunes by now.phillipgessert ought to be getting tired of karma fortunes by now.phillipgessert ought to be getting tired of karma fortunes by now.phillipgessert ought to be getting tired of karma fortunes by now.phillipgessert ought to be getting tired of karma fortunes by now.phillipgessert ought to be getting tired of karma fortunes by now.phillipgessert ought to be getting tired of karma fortunes by now.
 
phillipgessert's Avatar
 
Posts: 188
Karma: 1641512
Join Date: Oct 2015
Location: Madison, WI
Device: Kindle 5th Gen
Quote:
Originally Posted by emdashery View Post
the issue is that the affirmations and scriptures need to stand out against the body and against each other, and just using bold, italic, etc is a LOT for the eyes to discern in a small space. The embedded fonts (when spaced properly) make it a lot easier on the eyes, imo.
Counterpoint, if you're open to it: I think all the font changes are a little fatiguing, personally. It's really just a heading, two opening quotations, body text, and a sort of aside. I think you could sufficiently keep everything distinct via e.g. a small symbol between the scripture passage and the quote, and perhaps a simple box around the affirmation. You could probably even do away with the symbol if you moved the scripture citation to the end of it instead of the beginning.

I'm not saying that's precisely what you should do, just saying that sometimes it can be useful to figure out the absolute bottom in terms of presentation and then build up a little from there rather than tackling it from the top and trying to navigate all the font stuff. Also context in the text itself can make things a lot clearer than we sometimes give it credit for. "Todays Affirmation:" alone tells me I'm about to read today's affirmation, font shift or no.
phillipgessert is offline   Reply With Quote
Old 10-19-2021, 10:09 PM   #15
hobnail
Running with scissors
hobnail ought to be getting tired of karma fortunes by now.hobnail ought to be getting tired of karma fortunes by now.hobnail ought to be getting tired of karma fortunes by now.hobnail ought to be getting tired of karma fortunes by now.hobnail ought to be getting tired of karma fortunes by now.hobnail ought to be getting tired of karma fortunes by now.hobnail ought to be getting tired of karma fortunes by now.hobnail ought to be getting tired of karma fortunes by now.hobnail ought to be getting tired of karma fortunes by now.hobnail ought to be getting tired of karma fortunes by now.hobnail ought to be getting tired of karma fortunes by now.
 
Posts: 1,299
Karma: 13808266
Join Date: Nov 2019
Device: none
Quote:
Originally Posted by phillipgessert View Post
...
Agreed. The "simplified" one on the Kindle 5 on the right looks better to me (ignoring the wonky line spacing on the left image). I'd also get rid of the initial drop cap; those are often troublesome.
hobnail 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
Media Queries for images as dropcaps in Kindle DX verydeepwater Kindle Formats 3 03-22-2014 06:35 PM
Media Queries eggheadbooks1 Kindle Formats 4 12-16-2013 03:32 AM
Epub to mobi not recognizing media queries srascal Conversion 2 03-25-2013 06:19 PM
Calibre and Media Queries chrlsdrwn12 Calibre 0 12-05-2012 12:16 PM
Media Queries on Kindle Previewer AIR-WIZZ Kindle Developer's Corner 26 10-15-2012 11:10 AM


All times are GMT -4. The time now is 11:35 AM.


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