Yey! Because you are using the resize event I thought it was the same approach. But not, the trick is the iframe! Well, IT DOESN'T works with iOS, but it works in Calibre, I will test in ADE. And not only that, you helped me to simplify the code when I have to detect the font or window change, thanks!
If one day you need to display spanish poetry in spanish in a correct way, you can use the script
UPDATE
It works on Calibre, ADE, iBooks for Mac and iOS. It is a very good solution, thanks, Rubén. I left the sample.
Chingón, Rubén, gracias!