Skip to content

[Bug] iOS TestApp fails to display vertical writing mode EPUB files #514

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
Huxiuqi opened this issue Nov 28, 2024 · 1 comment
Open

Comments

@Huxiuqi
Copy link

Huxiuqi commented Nov 28, 2024

Describe the bug

The iOS TestApp fails to properly display EPUB files with vertical writing modes (vertical-rl and vertical-lr). No specific error logs are generated.
Uploading WechatIMG152.jpg…

How to reproduce?

  1. Download test EPUB files:
  2. Open these EPUB files in iOS TestApp
  3. Observe the content display

Readium version

3.0.0

OS version

18.1.1

Testing device

iPhone 15 Pro (emulator) and iPhone 15

Environment

No response

Additional context

No response

@mickael-menu
Copy link
Member

It looks like the <html> element already contains a style attribute, which breaks when injecting the Readium CSS properties:

error on line 9 at column 222: Attribute style redefined 
<html style="--USER__colCount: auto !important;
--USER__fontSize: 100.00000% !important;
--USER__pageMargins: 1.00000 !important;
--USER__view: readium-paged-on !important;
font-weight:  !important;
" xmlns="http://www.w3.org/1999/xhtml" xmlns:epub="http://www.idpf.org/2007/ops" xml:lang="ja" style="-ms-writing-mode: tb-rl; -moz-writing-mode: vertical-rl; -webkit-writing-mode: vertical-rl; writing-mode: vertical-rl;">

The injection algorithm needs to be improved to allow for the style attribute to be extended.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants