epub footnote popup not good for vertical writing mode

Bug #1938448 reported by Abel Cheung
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Fix Released

Bug Description

Calibre: 5.23.0 portable
OS: Windows 7 (I doubt the OS is relevant to this issue at all)

Attached image demonstrates how a vertical running footnote is shown in Calibre e-book viewer (with "html {writing-mode: vertical-rl;}" in CSS). The footnote text is broken into small vertical fragments, and the dialog height doesn't change to cope with the text.

I have experimented enforcing height in the enclosing footnote element (say "height: 500px"), but it's not ideal because dialog width still never changes, resulting in an almost empty big dialog covering up large part of viewer window, with vertical footnote right aligned inside the large dialog box.

Wonder if it is possible to autodetect writing mode and set default dialog size accordingly, or if there is any workaround?

Revision history for this message
Abel Cheung (abelcheung) wrote :
Revision history for this message
Kovid Goyal (kovid) wrote : Re: calibre bug 1938448

So for vertical text you'd want a popup that's tall and aligned to the
left or right edge? And attach a sample book demonstrating the issue, so
I dont have to spend time finding/creating one.

 status incomplete

Changed in calibre:
status: New → Incomplete
Revision history for this message
Abel Cheung (abelcheung) wrote :

As requested, a sample epub3 attached here. There is only one link, located in the first paragraph. Clicking on the link should show footnote dialog as described. Oh yes, CJK font is also needed, which is not included in e-book (file size may become unnecessarily huge). I'm using Noto Serif CJK JP [1] in image attachments, but any fonts supporting Japanese would do.

[1] https://www.google.com/get/noto/#serif-jpan

Revision history for this message
Abel Cheung (abelcheung) wrote :

Also attaching a mockup image of what I'm expecting from the epub just attached before, showing a tall and narrow dialog with vertically running text (same applies to dialog title). Although the dialog controls are shown as rotated, actually I don't know if it can be done at all.

About the left/right alignment, perhaps it is best to go with the natural alignment specified in writing mode.
vertical-rl: Japanese and Traditional Chinese novels and books.
vertical-lr: Rare. Only used by traditional Mongolian script, and I have zero knowledge about it.

Revision history for this message
Abel Cheung (abelcheung) wrote :

(Required test file provided)

Changed in calibre:
status: Incomplete → New
Revision history for this message
Kovid Goyal (kovid) wrote : Fixed in master

Fixed in branch master. The fix will be in the next release. calibre is usually released every alternate Friday.

 status fixreleased

Changed in calibre:
status: New → Fix Released
Revision history for this message
James Romero (turapter) wrote :

Thanks for the solution, I now feel more comfortable reading my books on economics from the original in Japanese. I was doing research for my essay once and came across a bunch of papers on Asia and its rise during the post wars. The work came out great, I saw it recently on https://writix.com/essay-examples/economics as an example. And since there's text vertically, I had to learn how to read and that's how I got used to it.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.