Skip to content

Conversation

@btsimonh
Copy link
Contributor

Create a real ruby with real characters, but ensure it has no width and is not visible.
Add it before other content on the line. For 'both' add two, one for above, and one for below.
This works for Chrome and Firefox.
Note: the browser detection has been disabled but not removed. -webkit should no longer be required, and firefox and chrome seem to have similar behaviour now.

I spent a lot of time examining position of text with and without rubies. The addition of 'fake' rubies may not be the best way to go - using margin/padding may be better? I think the browser implementations are still young...

Create a real ruby with real characters, but ensure it has no width and is not visible.
Add it before other content on the line.  For 'both' add two.
This works for Chrome and Firefox.
Copy link
Contributor

@palemieux palemieux left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you provide a test file and open an issue?

@btsimonh
Copy link
Contributor Author

please compare existing tests in Chrome and Firefox.
You can compare here:
https://imsc-rosetta.github.io/imsc-rosetta-qualify/
with 'legacy' and 'patched' renderer.
I'm not saying it's perfect, but it does need to work.

@btsimonh
Copy link
Contributor Author

also addresses #236

@palemieux
Copy link
Contributor

@btsimonh I think this is a Chrome bug

@btsimonh
Copy link
Contributor Author

irrespective, the proposed scheme works in both Chrome and Firefox. I'm not sure if the browsers even considered such things as reserving space for rubies.... :).
It may be more efficient to pre-create rubyover and rubyunder ahead of time, and clone them for the lines.

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

Successfully merging this pull request may close these issues.

2 participants