calibre-web icon indicating copy to clipboard operation
calibre-web copied to clipboard

Feature Request: Adjust font size in reader

Open GAumala opened this issue 6 years ago • 5 comments

Hi I've been using calibre-web for a few days on my VPS and I'm super impressed with it, thank you for putting the time to build this.

One issue that I have, is that on different devices the text can get too small, so it would be nice if there was an option to adjust the font size. I'd be willing to try to implement this and send a PR if you agree.

I've been thinking about this for a while, but I'm not sure about a few things regarding an implementation for this.

A quick easy way to increase the font size is to call setStyle on the object returned by epub.js like this:

  reader.book.setStyle("font-size", "1.5em")

This can work pretty well with many ebooks. However it doesn't work with ebooks containing tags that override the body tag's font-size property, using values like small or large. I think that in this case the server should parse the css and replace all the font-size values before serving it. That could add a bit of complexity, and even if that extra step was added, it's still not done.

If I wanted the text to be bigger, how should the css be processed? Multiply every font-size by a factor like "1.5"? If so what does it mean to multiply a value like "small" by a factor?

If anyone has suggestions or opinions about this, please let me know!

GAumala avatar Apr 10 '18 03:04 GAumala

Has there been any update on this? Loving calibre-web so far, but some of my eBooks default to smaller text, making it near impossible to use the built-in reader without a way to change the font size.

gabrielstackhouse avatar May 25 '19 18:05 gabrielstackhouse

I have the same issue. Some epub files are too small to be read

TheNomad11 avatar Aug 24 '19 08:08 TheNomad11

Any news? This makes calibre-web quite useless to me.

TheNomad11 avatar Nov 28 '20 12:11 TheNomad11

A quick easy way to increase the font size is to call setStyle on the object returned by epub.js like this:

  reader.book.setStyle("font-size", "1.5em")

In which file did you add that? And where can I find it? Thanks!

TheNomad11 avatar Nov 28 '20 12:11 TheNomad11

i have the same question, where to add this?

xinmans avatar Aug 18 '22 02:08 xinmans