Skip to content
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

Add support for subscripts and superscripts #585

Open
wants to merge 1 commit into
base: issues/bump-imsc-1-3
Choose a base branch
from

Conversation

palemieux
Copy link
Contributor

Closes #583

Copy link
Contributor

@nigelmegitt nigelmegitt left a comment

Choose a reason for hiding this comment

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

This looks fine to me, but in researching it I discovered that the semantic basis for this is not as stable as we would like, and we need to think about what we do to make this feature properly usable.

TTML2 lists the derivation of tts:fontVariant as CSS Fonts Level 3 §6.11, but no such section exists. I raised w3c/ttml2#1277 fpr this.

MDN claims that the specification of the font-variant-position property is in CSS Fonts Level 4, currently a Working Draft that lists font-variant-position as an at-risk feature - there's a more recent ED too that still includes it.

MDN shows browser support for the CSS property in Firefox and Safari but not Edge or Chrome, so I guess that makes it unlikely to be pulled.

I think the key semantic that we are relying on here, aside from just positioning, is the synthesis of simulated glyphs where the super or sub glyphs are not available in the font. That's not mentioned in TTML2 but is in the CSS Fonts level 4 ED text.

Secondarily, and just as importantly, that spec also defines a fallback mechanism that uses the font-size and vertical-align properties, and recommends using them based on conditional rules. From a TTML/IMSC perspective this is arguably an implementation detail.

However, I think we should think about and discuss:

  1. Whether introducing this is dependent on a fix in TTML2 for the derivation - see Derivation of tts:fontVariant points to a non-existent section ttml2#1277
  2. Whether we need to describe the fallback approaches if the glyphs are absent from the font, or if the CSS property is not supported at all, and if we do, whether that text belongs in TTML2 or IMSC.

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