I am trying to use or create and event listener when the user changes the font size of the EPUB in an ereader with Javascript but I haven't find the way.
What I have tried without success:
* A `resize` event listener.
* A timing event that measures the font size.
* A listener that measures the scale of the `viewport`.
In `ebook-viewer` (aka Calibre viewer) I can see in the inspector that every time I change the font size the console prints `Viewport cfi: /2/4/2/2/1:1`. I see that when `1:1` changes, it's some sort of scale in int numbers.
That is why I tried to detect the viewport scale with [this](
https://tombigel.github.io/detect-zoom/) or [this](
http://menacingcloud.com/source/js/F...ewportScale.js).
So I suppose it is possible only because I can see trough the inspector of `ebook-viewer`...
All the tries didn't work on iOS either.