Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Readers > Apple Devices

Notices

Reply
 
Thread Tools Search this Thread
Old 03-26-2026, 04:15 AM   #31
rfog
Guru
rfog ought to be getting tired of karma fortunes by now.rfog ought to be getting tired of karma fortunes by now.rfog ought to be getting tired of karma fortunes by now.rfog ought to be getting tired of karma fortunes by now.rfog ought to be getting tired of karma fortunes by now.rfog ought to be getting tired of karma fortunes by now.rfog ought to be getting tired of karma fortunes by now.rfog ought to be getting tired of karma fortunes by now.rfog ought to be getting tired of karma fortunes by now.rfog ought to be getting tired of karma fortunes by now.rfog ought to be getting tired of karma fortunes by now.
 
Posts: 709
Karma: 2383546
Join Date: Aug 2007
Location: Schiedam (The Netherlands)
Device: Lots of eInk devices and iOS stuff
I don't know how you are building the definitive CSS for each book, @QuietShelfLife, but as developer myself, I will start with an empty CSS. First step should be importing the ones in the ePub itself (yes, some ebooks have multiple CSS), skipping conflicts or starting with the biggest one and importing the others item by item, and finally import your own to complete the holes in the CSS ebook. Last step will be overwrite the customizations made by the reader in the app options.

That way I think you don't need to stay with custom optimizations. The only thing you need is a strong piece of code that will review and incorporate or overwrite the added sub-CSS options.
rfog is offline   Reply With Quote
Old 03-26-2026, 05:53 PM   #32
QuietShelfLife
Enthusiast
QuietShelfLife began at the beginning.
 
Posts: 45
Karma: 10
Join Date: Feb 2026
Device: iPad
@rfog That's essentially the approach — book CSS loads first, then app defaults fill in anything unspecified, and user settings override last. The issue JSWolf found is that our defaults were too aggressive in a couple of places (widows/orphans and line-height), overriding values the book already set. Fixing that now along with user-adjustable margins and line height. Should be in the next release.
QuietShelfLife is offline   Reply With Quote
Advert
Old Yesterday, 03:14 PM   #33
JSWolf
Resident Curmudgeon
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.
 
JSWolf's Avatar
 
Posts: 82,643
Karma: 151278869
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
Quote:
Originally Posted by QuietShelfLife View Post
@rfog That's essentially the approach — book CSS loads first, then app defaults fill in anything unspecified, and user settings override last. The issue JSWolf found is that our defaults were too aggressive in a couple of places (widows/orphans and line-height), overriding values the book already set. Fixing that now along with user-adjustable margins and line height. Should be in the next release.
I just installed a new release. It's still unreadable. I reported it again.

When you have no line height, YOU DO NOT SPECIFY ONE! You let the font do the work. Also, when there are no paragraph gaps specified, again the font does the work at going from one paragraph to another. When windows and orphans are specified to a value of 1, you don't have your own defaults override that because those defaults don't work.

As for the line height, this is what you do when you don't have a line height setting or it's turned off.

Last edited by JSWolf; Yesterday at 03:17 PM.
JSWolf is offline   Reply With Quote
Old Yesterday, 03:31 PM   #34
rfog
Guru
rfog ought to be getting tired of karma fortunes by now.rfog ought to be getting tired of karma fortunes by now.rfog ought to be getting tired of karma fortunes by now.rfog ought to be getting tired of karma fortunes by now.rfog ought to be getting tired of karma fortunes by now.rfog ought to be getting tired of karma fortunes by now.rfog ought to be getting tired of karma fortunes by now.rfog ought to be getting tired of karma fortunes by now.rfog ought to be getting tired of karma fortunes by now.rfog ought to be getting tired of karma fortunes by now.rfog ought to be getting tired of karma fortunes by now.
 
Posts: 709
Karma: 2383546
Join Date: Aug 2007
Location: Schiedam (The Netherlands)
Device: Lots of eInk devices and iOS stuff
Quote:
Originally Posted by QuietShelfLife View Post
@rfog That's essentially the approach — book CSS loads first, then app defaults fill in anything unspecified, and user settings override last. The issue JSWolf found is that our defaults were too aggressive in a couple of places (widows/orphans and line-height), overriding values the book already set. Fixing that now along with user-adjustable margins and line height. Should be in the next release.
Then you have a bug in your code. If a later import/mix CSS overwrites some settings, it is doing it wrong except if you want that overwritten.

A working algorithm could be as easy as start with an empty dictionary data structure with a list in each node and then fill it with each CSS. Then you start with your full master CSS as dictionary with the selector as key, and the declaration block as a list of pairs. And then follow the reverse: starting with your full dictionary, go across low-to-high priority ebook and UI customizations, and for each selector in the other CSS, evaluate the declaration block and for each pair, if they are valid ones, replace or add it in the master CSS. No error can happen. If an ebook CSS contains widows and orphans, they will overwrite your own master CSS, and if not, it will respect master ones. And same with any other declaration pair for each selector.
rfog is offline   Reply With Quote
Old Yesterday, 03:35 PM   #35
QuietShelfLife
Enthusiast
QuietShelfLife began at the beginning.
 
Posts: 45
Karma: 10
Join Date: Feb 2026
Device: iPad
@JSWolf The fix for widows/orphans and line-height isn't in the current App Store version yet — that's why it still looks the same. When I said "next release" in my last post I meant the one I'm still building. I'll post here the moment it's on the App Store so you know which version to grab. My plan is to wrap the default in :where(), so the publisher CSS "wins". For line-height I'm still undecided, it will be user configurable.

@rfog Appreciate the suggestion — that's roughly the direction. The tricky part is knowing when a property is "missing" vs intentionally unset by the book, but a dictionary merge with priority levels is a clean way to handle it.

Last edited by QuietShelfLife; Yesterday at 03:40 PM.
QuietShelfLife is offline   Reply With Quote
Advert
Old Yesterday, 03:59 PM   #36
JSWolf
Resident Curmudgeon
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.
 
JSWolf's Avatar
 
Posts: 82,643
Karma: 151278869
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
Quote:
Originally Posted by QuietShelfLife View Post
@JSWolf The fix for widows/orphans and line-height isn't in the current App Store version yet — that's why it still looks the same. When I said "next release" in my last post I meant the one I'm still building. I'll post here the moment it's on the App Store so you know which version to grab. My plan is to wrap the default in :where(), so the publisher CSS "wins". For line-height I'm still undecided, it will be user configurable.

@rfog Appreciate the suggestion — that's roughly the direction. The tricky part is knowing when a property is "missing" vs intentionally unset by the book, but a dictionary merge with priority levels is a clean way to handle it.
Thank you. I'll wait for the new version. I'll install the new version on my iPad Pro 13" and try it from there as well.
JSWolf is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
justRead.app – Native iOS EPUB Reader (Built for Power Readers) petrjahoda Apple Devices 163 03-12-2026 01:16 PM
‘Assistive Reader’ (text-to-speech) comes to Kindle apps for Android and iOS/macOS tomsem Amazon Kindle 4 06-13-2024 04:53 AM
EPUB thumbnails in macOS Ventura/iOS Pargeo ePub 1 01-06-2023 08:11 AM
Can I build Calibre 4.0 on a native macOS machine running OS X El Capitan 10.11.6? vaboro Development 23 10-16-2019 04:37 PM
Idea of Bookshelves - How to organize books by drag and drop to bookshelves duytrung Library Management 5 09-04-2015 06:28 PM


All times are GMT -4. The time now is 06:40 PM.


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