View Single Post
Old 02-11-2024, 05:55 PM   #103
Turtle91
A Hairy Wizard
Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.
 
Turtle91's Avatar
 
Posts: 3,361
Karma: 20212223
Join Date: Dec 2012
Location: Charleston, SC today
Device: iPhone 15/11/X/6/iPad 1,2,Air & Air Pro/Surface Pro/Kindle PW & Fire
Quote:
Originally Posted by JSWolf View Post
The font size instead of small-caps is a fallback for ePub2. The version of RMSDK used on Kobo does not support small-caps. So anyone reading Discworld with ePub would not have the correct smallcaps. This was a major blunder (IMHO) by the ePub standards to make font-variant optional in ePub2.

Sony Readers cannot render small-caps and there are other old Readers that also cannot.

There is no fallback for small-caps except not to use it.
Saying "there is no fallback" is not quite accurate. It might not look exactly the same, but that doesn't mean it doesn't work. Using media queries allows you to change the way things are displayed.

for example - and this is a simplification Jon not a proper MQ:

Code:
HTML:
<p>Death said "<span class="death">They could hear me roar in Middengard!</span>"</p>

CSS:
Media query - Does it support small-caps:
    death {font-variant:small-caps}

Media query - Does it support text-transform but NOT small-caps:
    death {text-transform:uppercase; font-size:.9em}

Media query - Does device support color but NOT small-caps:
    death {color:blue}

Media query - is it Jon's e-ink device and doesn't support anything??
    death {}
Click image for larger version

Name:	Screenshot 2024-02-11 174443.png
Views:	639
Size:	39.9 KB
ID:	206317

The most basic styling (none) is still readable and makes perfect sense. The user will not complain because they aren't expecting any styling on their ancient device.

That is a basic Media Query concept example. That doesn't take into account the possibilities of basic Cascading principles of CSS where the most recent style (lowest on the list) has priority. eg. Put your more capable css last in the list...if the device doesn't support it, then it will ignore it and go with what is earlier in the list.
Turtle91 is offline   Reply With Quote