Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > KOReader

Notices

Reply
 
Thread Tools Search this Thread
Old 04-01-2021, 06:15 AM   #1
maraskan_user
Member
maraskan_user began at the beginning.
 
Posts: 12
Karma: 10
Join Date: Dec 2020
Location: Germany
Device: Boox Nova 3, Galaxy Tab S6, Samsung M21
Canceling-out font size definitions in many epubs

I noticed that there are many epubs which show a pattern similar to this:

1. They specify a font size in their <html> element:
Code:
<html xmlns="http://www.w3.org/1999/xhtml" style="font-size:1.136rem;">
2. but then go and exactly cancel it out by using an inverse value like "font-size: 88%" either in their body definition or in virtually every single css-class.

I mean... why?
And it's clear from the values that they are supposed to cancel out. But why do this, instead of leaving these things out and only specify sizes for classes that actually deviate from the default font size?

Also, when I say cancel out, they do so in Calibre. KOreader seems to not react to the font-size definition in the html element which leads to wildly varying main font sizes for different books which use this cancel-out strategy...
maraskan_user is offline   Reply With Quote
Old 04-02-2021, 01:21 PM   #2
Frenzie
Wizard
Frenzie ought to be getting tired of karma fortunes by now.Frenzie ought to be getting tired of karma fortunes by now.Frenzie ought to be getting tired of karma fortunes by now.Frenzie ought to be getting tired of karma fortunes by now.Frenzie ought to be getting tired of karma fortunes by now.Frenzie ought to be getting tired of karma fortunes by now.Frenzie ought to be getting tired of karma fortunes by now.Frenzie ought to be getting tired of karma fortunes by now.Frenzie ought to be getting tired of karma fortunes by now.Frenzie ought to be getting tired of karma fortunes by now.Frenzie ought to be getting tired of karma fortunes by now.
 
Posts: 1,617
Karma: 724945
Join Date: Oct 2014
Location: Antwerp
Device: Kobo Aura H2O
I think I've seen people do that because the default tends to be 16px and they find it easier to calculate from something else.

So then you get something like

16*1.25 = 20

0.6*20=12

As opposed to 0.75*16=12.

Or something like that.

I already find that rationale most peculiar, but it almost certainly can't apply to 1.136… so beats me.

---

Incidentally, there is a style tweak to ignore publisher font sizes (albeit all of them).
Attached Thumbnails
Click image for larger version

Name:	Screenshot_2021-04-02_19-22-16.png
Views:	106
Size:	152.4 KB
ID:	186341  

Last edited by Frenzie; 04-02-2021 at 01:23 PM.
Frenzie is offline   Reply With Quote
Advert
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Aura H2O Font size mismatch (downloaded epubs via Calibre vs. Kobo epubs & articles) Oolong Kobo Reader 36 01-25-2019 06:00 AM
Problem changing font size using font size key Waylander Conversion 0 10-02-2013 03:30 PM
When displaying ePubs, what is the best way to display user font-size, color, etc.? mattcurtis ePub 7 05-24-2013 10:37 AM
font familiy definitions - kindle conversions cybmole Conversion 0 03-07-2011 03:01 AM


All times are GMT -4. The time now is 09:21 PM.


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