Register Guidelines E-Books Today's Posts Search

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

Notices

Reply
 
Thread Tools Search this Thread
Old 06-22-2023, 02:39 PM   #1
nabsltd
Evangelist
nabsltd ought to be getting tired of karma fortunes by now.nabsltd ought to be getting tired of karma fortunes by now.nabsltd ought to be getting tired of karma fortunes by now.nabsltd ought to be getting tired of karma fortunes by now.nabsltd ought to be getting tired of karma fortunes by now.nabsltd ought to be getting tired of karma fortunes by now.nabsltd ought to be getting tired of karma fortunes by now.nabsltd ought to be getting tired of karma fortunes by now.nabsltd ought to be getting tired of karma fortunes by now.nabsltd ought to be getting tired of karma fortunes by now.nabsltd ought to be getting tired of karma fortunes by now.
 
Posts: 459
Karma: 7897546
Join Date: Aug 2013
Location: Hamden, CT
Device: Kindle Paperwhite (11th gen), Scribe
KFX and OpenType features

I use Adobe's Garamond Premier as my base reading font on a Kindle Paperwhite 11, and the difference between KF8 and KFX files on the device led me to do a bit of research.

First, the CSS attribute font-feature-settings is completely ignored by the Kindle renderer. It might even be completely stripped when the KFP format is created by Kindle Previewer. Since the docs don't say it is not supported, this isn't really a surprise.

What is a surprise is that Kindle readers seem to have the following (or it's equivalent) coded into their user agent stylesheet:
Code:
font-feature-settings: "liga" 1, "calt" 1;
Since Amazon is bragging about the ligature support in KFX, the first bit isn't a surprise, but the second is a huge one. You won't see it on any of the built-in fonts, but a commercial font with good support for OpenType features will make it jump out. The uppercase "Q" in Garamond Premier has a beautiful contextual alternative ("calt") with the tail running under the next letter or two. I like it a lot, but some fonts might have alternatives that aren't as nice, and there is no way to disable "calt" in Kindle, short of removing that feature from the font file.

It also exposes a bug in the OpenType features handing that only shows up every so often, where the Kindle renderer appears to iterate through the "calt" ruleset until there is no change. This is not correct behavior according the OpenType standard, and results in some really odd characters at times in Garamond Premier. For example, in the italic font, there are swashes, and the alternative for uppercase "Q" gets converted to the long tail version, which has it's own alternate that is the swash "Q", which looks like a "2".

Last, assuming a font has small capital glyphs and a "smcp" ruleset, font-variant: small-caps should do exactly the same thing as font-feature-settings: "smcp" 1, and it mostly does on Kindle. The exception is the following CSS:
Code:
font-variant: small-caps;
text-transform: lowercase;
This should result in small caps for all letters [A-Z][a-z] with the style, and no change to every other character (again, depending on the "smcp" transform rules, but that's what Adobe does). What it does on Kindle, though, is equivalent to the following:
Code:
font-variant: small-caps;
text-transform: lowercase;
font-feature-settings: "onum" 1;
This enables old-style numbers, and is the only way I can see to do this on a Kindle.
nabsltd is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
understanding ligatures in OpenType fonts arslonga Conversion 0 11-25-2022 02:58 PM
KFX to KFX to remove DRM Tomifonication Conversion 12 08-09-2018 02:32 PM
Touch HD, Future features or dead features? ElWorm PocketBook 4 02-07-2018 12:36 PM
Opentype font features DomesticExtremis ePub 7 06-29-2014 06:25 PM
Touch ePub: embedded TrueType (TTF) vs OpenType (OTF) seanos Barnes & Noble NOOK 0 07-26-2013 03:43 AM


All times are GMT -4. The time now is 12:15 AM.


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