mobile icon indicating copy to clipboard operation
mobile copied to clipboard

[EPUB] Use native solution to change the font size instead of Readium CSS

Open mickael-menu opened this issue 4 years ago • 4 comments

Changing the font size with Readium CSS is limited because if the publication has absolute font sizes then enabling advanced options is necessary: basically disabling publisher's defaults.

A possible workaround would be to use native solutions when available since Readium CSS is platform-agnostic.

text-size-adjust is promising and seems to be available on both iOS and Android: https://caniuse.com/?search=text-size-adjust

Related issue: https://github.com/readium/readium-css/issues/34

mickael-menu avatar Nov 25 '20 17:11 mickael-menu

On Android, this could be an option:

  • https://developer.android.com/reference/android/webkit/WebSettings#setTextZoom(int)
  • https://stackoverflow.com/questions/29115332/change-textsize-in-android-webview/29115409#29115409

mickael-menu avatar Nov 26 '20 17:11 mickael-menu

@mickael-menu do we have a solution for this issue? It breaks the font size change for a lot of books on Android.

johanpoirier avatar Feb 03 '22 10:02 johanpoirier

Not yet, I don't see myself implementing it before tackling the Presentation Settings for EPUB. But if you want you can try out the techniques I put in the other comment and see if it helps: https://github.com/readium/mobile/issues/5#issuecomment-734408745

mickael-menu avatar Feb 03 '22 11:02 mickael-menu

Yes I'm trying those techniques.

johanpoirier avatar Feb 03 '22 11:02 johanpoirier