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

Go Back   MobileRead Forums > E-Book Software > Calibre

Notices

Closed Thread
 
Thread Tools Search this Thread
Old 09-15-2019, 12:37 PM   #166
rashkae
Wizard
rashkae ought to be getting tired of karma fortunes by now.rashkae ought to be getting tired of karma fortunes by now.rashkae ought to be getting tired of karma fortunes by now.rashkae ought to be getting tired of karma fortunes by now.rashkae ought to be getting tired of karma fortunes by now.rashkae ought to be getting tired of karma fortunes by now.rashkae ought to be getting tired of karma fortunes by now.rashkae ought to be getting tired of karma fortunes by now.rashkae ought to be getting tired of karma fortunes by now.rashkae ought to be getting tired of karma fortunes by now.rashkae ought to be getting tired of karma fortunes by now.
 
rashkae's Avatar
 
Posts: 1,140
Karma: 5061953
Join Date: Jun 2011
Location: Ontario, Canada
Device: Kobo Aura HD
Quote:
Originally Posted by kovidgoyal View Post
Or just use the recommended SVG markup that calibre uses, it works everywhere, including the new reader.
I'll have to do a bit of testing with inline images to make sure I'm not missing a painfully obvious gotchya, but I think, at least for images, wrapping all <img> in a div with max-height: 100vh, max-width: 100vw would be a good option. This could be an option added to the Viewer to "Automatically resize images larger than the screen." Most browsers so something to that effect automatically, and I think Kindles do as well.

Unlike the svg code, this will not zoom the images on higher resolution displays.
rashkae is offline  
Old 09-15-2019, 09:02 PM   #167
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 43,776
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
Why would one need to wrap images in a div? A simple img { max-height: 100vh } would do the trick to prevent images being split over multiple pages. As for max-width: 100vw not usre would need to check how well it plays with columns.
kovidgoyal is online now  
Old 09-15-2019, 09:03 PM   #168
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 43,776
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
Quote:
Originally Posted by theducks View Post
Nope
The guide still has the bogus entry that was flagged after I clicked remove all references (and then fix all after that did not work and I had re run the check)
I doubt this has anything to do with the beta as there were no changes to check book, so open a ticket and attach an epub to reproduce the issue and I will take a look when I have a moment.
kovidgoyal is online now  
Old 09-15-2019, 09:10 PM   #169
rashkae
Wizard
rashkae ought to be getting tired of karma fortunes by now.rashkae ought to be getting tired of karma fortunes by now.rashkae ought to be getting tired of karma fortunes by now.rashkae ought to be getting tired of karma fortunes by now.rashkae ought to be getting tired of karma fortunes by now.rashkae ought to be getting tired of karma fortunes by now.rashkae ought to be getting tired of karma fortunes by now.rashkae ought to be getting tired of karma fortunes by now.rashkae ought to be getting tired of karma fortunes by now.rashkae ought to be getting tired of karma fortunes by now.rashkae ought to be getting tired of karma fortunes by now.
 
rashkae's Avatar
 
Posts: 1,140
Karma: 5061953
Join Date: Jun 2011
Location: Ontario, Canada
Device: Kobo Aura HD
Quote:
Originally Posted by kovidgoyal View Post
Why would one need to wrap images in a div? A simple img { max-height: 100vh } would do the trick to prevent images being split over multiple pages. As for max-width: 100vw not usre would need to check how well it plays with columns.
Because the e-book viewer as it is now does not play well with how many, many ebooks are formatted, most of which assume that height % is the size of the screen. (and vh is not compatible with the epub spec.) I was tossing an idea as a work around to improve the book e-book viewer app and keep it consistent.

In any case, a new bug with the Viewer for you.

The font size of a <p> overrides the font size of the <body>, rather than adjust relative to it. (I haven't tried nesting a p in a <div> to see if all cascading font sizes are ignored.)

For example, if your body has font-size: 3em and the paragraph font-size: 1em, the e-book reader displays the font as though it were 1em. This works correctly in the editor preview. (Maybe related to the same bug that prevents the inspector from working?)
rashkae is offline  
Old 09-15-2019, 10:06 PM   #170
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 43,776
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
Quote:
Originally Posted by rashkae View Post
Because the e-book viewer as it is now does not play well with how many, many ebooks are formatted, most of which assume that height % is the size of the screen. (and vh is not compatible with the epub spec.) I was tossing an idea as a work around to improve the book e-book viewer app and keep it consistent.
The viewer already detects and fixes 100% height for the common form of fullscreen image markup. If you have some books where the detection does not work, let me know and I can fix it.
kovidgoyal is online now  
Old 09-15-2019, 10:10 PM   #171
rashkae
Wizard
rashkae ought to be getting tired of karma fortunes by now.rashkae ought to be getting tired of karma fortunes by now.rashkae ought to be getting tired of karma fortunes by now.rashkae ought to be getting tired of karma fortunes by now.rashkae ought to be getting tired of karma fortunes by now.rashkae ought to be getting tired of karma fortunes by now.rashkae ought to be getting tired of karma fortunes by now.rashkae ought to be getting tired of karma fortunes by now.rashkae ought to be getting tired of karma fortunes by now.rashkae ought to be getting tired of karma fortunes by now.rashkae ought to be getting tired of karma fortunes by now.
 
rashkae's Avatar
 
Posts: 1,140
Karma: 5061953
Join Date: Jun 2011
Location: Ontario, Canada
Device: Kobo Aura HD
Quote:
Originally Posted by kovidgoyal View Post
The viewer already detects and fixes 100% height for the common form of fullscreen image markup. If you have some books where the detection does not work, let me know and I can fix it.
Common fullscreen image markup? So far, calibre is the *only* place I've seen that used.. And fullscreen image is not the only use case.

In any case, that can be debated at a better time, (if anyone else cares).. I don't mean to get hung up on it in the Beta thread for v4.
rashkae is offline  
Old 09-15-2019, 10:43 PM   #172
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 43,776
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
Using a single HTML file with an svg containing the image to be fullscreened has long been the recommended practice for full screen images, not just in calibre.

Last edited by kovidgoyal; 09-15-2019 at 10:52 PM.
kovidgoyal is online now  
Old 09-15-2019, 10:56 PM   #173
rashkae
Wizard
rashkae ought to be getting tired of karma fortunes by now.rashkae ought to be getting tired of karma fortunes by now.rashkae ought to be getting tired of karma fortunes by now.rashkae ought to be getting tired of karma fortunes by now.rashkae ought to be getting tired of karma fortunes by now.rashkae ought to be getting tired of karma fortunes by now.rashkae ought to be getting tired of karma fortunes by now.rashkae ought to be getting tired of karma fortunes by now.rashkae ought to be getting tired of karma fortunes by now.rashkae ought to be getting tired of karma fortunes by now.rashkae ought to be getting tired of karma fortunes by now.
 
rashkae's Avatar
 
Posts: 1,140
Karma: 5061953
Join Date: Jun 2011
Location: Ontario, Canada
Device: Kobo Aura HD
Quote:
Originally Posted by kovidgoyal View Post
Using a single HTML file with an svg containing the image to be fullscreened has long been the recommended practice for full screen images, not just in calibre.

Recommended by who? Not that I doubt you, but I've just *never* seen it used.. If you want, I cant start feeding you a dozen examples from different publishers,, but again, I did not intend this to derail the current work.

I think the font issue I described earlier will be more of a problem for people.
rashkae is offline  
Old 09-15-2019, 11:11 PM   #174
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 43,776
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
Quote:
Originally Posted by rashkae View Post
For example, if your body has font-size: 3em and the paragraph font-size: 1em, the e-book reader displays the font as though it were 1em. This works correctly in the editor preview. (Maybe related to the same bug that prevents the inspector from working?)
No not quite, the viewer currently sets the users font size preference to the body font. So font sizes set on the body have no effect. I could change this to instead only set the font size on the root (<html>) element. This gives the user less control at the benefit of being closer to the publishers intent.
kovidgoyal is online now  
Old 09-15-2019, 11:12 PM   #175
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 43,776
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
Quote:
Originally Posted by rashkae View Post
Recommended by who? Not that I doubt you, but I've just *never* seen it used.. If you want, I cant start feeding you a dozen examples from different publishers,, but again, I did not intend this to derail the current work.
I would be most interested in examples that use non svg markup for fullscreen images, I can add workarounds for them to the viewer.
kovidgoyal is online now  
Old 09-15-2019, 11:41 PM   #176
rashkae
Wizard
rashkae ought to be getting tired of karma fortunes by now.rashkae ought to be getting tired of karma fortunes by now.rashkae ought to be getting tired of karma fortunes by now.rashkae ought to be getting tired of karma fortunes by now.rashkae ought to be getting tired of karma fortunes by now.rashkae ought to be getting tired of karma fortunes by now.rashkae ought to be getting tired of karma fortunes by now.rashkae ought to be getting tired of karma fortunes by now.rashkae ought to be getting tired of karma fortunes by now.rashkae ought to be getting tired of karma fortunes by now.rashkae ought to be getting tired of karma fortunes by now.
 
rashkae's Avatar
 
Posts: 1,140
Karma: 5061953
Join Date: Jun 2011
Location: Ontario, Canada
Device: Kobo Aura HD
Quote:
Originally Posted by kovidgoyal View Post
No not quite, the viewer currently sets the users font size preference to the body font. So font sizes set on the body have no effect. I could change this to instead only set the font size on the root (<html>) element. This gives the user less control at the benefit of being closer to the publishers intent.
I dont' quite follow what you mean. The users's chosen font size preference should correspond to 1 em.. that way, the different font sizes in the book scale with the the user preference.

The way it is now, there is no consistency in how books are displayed in the viewer, depending on how the publisher configured their book appearance.

Edit: This problem is worsend by Calibre's font scaling if a book is converted in Calibre. The Publisher might have set a font size in the body, calibre will re-scale it in the paragraph/div, and the resulting book will be further from what the user intended when viewed in the viewer.

Last edited by rashkae; 09-16-2019 at 12:01 AM.
rashkae is offline  
Old 09-16-2019, 12:02 AM   #177
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 43,776
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
Quote:
Originally Posted by rashkae View Post
I dont' quite follow what you mean. The users's chosen font size preference should correspond to 1 em.. that way, the different font sizes in the book scale with the the user preference.

The way it is now, there is no consistency in how books are displayed in the viewer, depending on how the publisher configured their book appearance.
The books HTML is displayed in a sandboxed iframe. This means that it is not possible to directly setup the correspondence that users font size == 1em. Instead the users font size in px is set on the body and html tags. So all other em font sizes work with respect to it. In any case your particular example is fixed in the next beta.
kovidgoyal is online now  
Old 09-16-2019, 12:11 AM   #178
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 43,776
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
Quote:
Originally Posted by rashkae View Post
Edit: This problem is worsend by Calibre's font scaling if a book is converted in Calibre. The Publisher might have set a font size in the body, calibre will re-scale it in the paragraph/div, and the resulting book will be further from what the user intended when viewed in the viewer.
I thin k you meant to write what the publisher intended. And font scaling is explicitly there to override what the publisher intended.
kovidgoyal is online now  
Old 09-16-2019, 12:15 AM   #179
rashkae
Wizard
rashkae ought to be getting tired of karma fortunes by now.rashkae ought to be getting tired of karma fortunes by now.rashkae ought to be getting tired of karma fortunes by now.rashkae ought to be getting tired of karma fortunes by now.rashkae ought to be getting tired of karma fortunes by now.rashkae ought to be getting tired of karma fortunes by now.rashkae ought to be getting tired of karma fortunes by now.rashkae ought to be getting tired of karma fortunes by now.rashkae ought to be getting tired of karma fortunes by now.rashkae ought to be getting tired of karma fortunes by now.rashkae ought to be getting tired of karma fortunes by now.
 
rashkae's Avatar
 
Posts: 1,140
Karma: 5061953
Join Date: Jun 2011
Location: Ontario, Canada
Device: Kobo Aura HD
Quote:
Originally Posted by kovidgoyal View Post
I thin k you meant to write what the publisher intended. And font scaling is explicitly there to override what the publisher intended.

No, I meant what they user intended.

Tradtionally, in calibre, with the default font scalling key and 12pt font size, when you convert in calibre, the size of regular text is adusted to 1 em. That gives all your books a consistent font size.

Now, if you have a book that has body font size=1.125em , and you convert in Calibre, the paragraph font size is adjusted to .88889 (or some such.).

In the new viewer, that font will now be super tiny...

Edit: I'll keep an eye out for the next beta to re-examine

Last edited by rashkae; 09-16-2019 at 12:17 AM.
rashkae is offline  
Old 09-16-2019, 12:24 AM   #180
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 43,776
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
Quote:
Originally Posted by rashkae View Post

Edit: I'll keep an eye out for the next beta to re-examine
Yeah this fixed since the viewer no longer overrides body font suize only <html> font size
kovidgoyal is online now  
Closed Thread

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
[Android App] Calibre Companion 1.7 Beta testing Adoby Devices 31 09-07-2012 10:13 PM
Kobo Wifi beta testing mdclements Kobo Reader 0 10-15-2011 03:49 PM
Beta testing libprs500's new GUI kovidgoyal Calibre 409 01-07-2009 12:33 PM


All times are GMT -4. The time now is 12:30 PM.


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