Open btsimonh opened 2 years ago
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.
also addresses https://github.com/sandflow/imscJS/issues/236
@btsimonh I think this is a Chrome bug
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.
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...