View Single Post
Old 10-20-2019, 01:03 PM   #42
KevinH
Sigil Developer
KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.
 
Posts: 8,888
Karma: 6120478
Join Date: Nov 2009
Device: many
@Kovid,

Okay I took a shot at doing this in gumbo directly just before the Preview is loaded. Seems to work but the code is a bit messy.

One question:

I think I followed your general logic although I am not sure after checking for a single div child of body why you would ever see ("svg", "image") and not always ("div", "svg", "image") when building the path from the body. I built my path backwards from the image tag itself back to the body tag but I think it amounts to the same thing.

Am I missing something?

https://github.com/Sigil-Ebook/Sigil...2e178bb226bc5f

Quote:
Originally Posted by kovidgoyal View Post
See fs_images.pyj in the calibre source code for the logic I use to detect when to convert 100% too 100vh
KevinH is online now   Reply With Quote