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

[font-metrics-api] Clarification on internal leadings #307

Open
kojiishi opened this issue Sep 17, 2016 · 5 comments
Open

[font-metrics-api] Clarification on internal leadings #307

kojiishi opened this issue Sep 17, 2016 · 5 comments

Comments

@kojiishi
Copy link

There once was confusion about handling of internal leading in font metrics. Microsoft published a few good kb articles 32667 or 74299 to clarify this, but I think some web developers still have different understanding on this, especially when their native scripts do not use accents.

I wish this new spec clearly defines whether the ascent includes the internal leading or not (I believe it should but I'm ok either way), and hopefully the naming clarifies this point to let web developers think about it, or provide both methods for convenience.

It may make the method names long and redundant though. Thoughts?

cc @astearns @eaenet

@kojiishi
Copy link
Author

After re-reading the current draft, it reads to me that height and emHeightAscent do not include the internal leadings. Is that correct?

I'm fine with that, but maybe we want to add methods that includes internal leadings?

@eaenet
Copy link
Contributor

eaenet commented Sep 17, 2016

That's a good idea. I'll clarify it. What would you suggest as a name for metrics that include internal leadings?

@kojiishi
Copy link
Author

Not particular, but what about:

  • cellHeightAscent, borrowed the terminology from MS kb articles kb32667 or kb74299.
  • Looks like Gecko has internalLeading in their native font metrics. We could expose this, and assume emHeightAscent is clear enough to understand emHeightAscent + internalLeading is OpenType ascent?
  • I thought I once saw ascentWithInternalLeading or ascentIncludingInternalLeading in Gecko code, but can't find any longer, maybe my memory is wrong.

@eaenet
Copy link
Contributor

eaenet commented Sep 22, 2016

Thanks, I'll update the doc to clarify it and to add internal leading.

@kojiishi
Copy link
Author

Regarding whether to return internalLeading or ascent with internalLeading, I started to mildly prefer ascent with internal leading, since it's a max value of possibly multiple fonts, and having the max of ascent + internal leading seems to help better than having the max of ascent and the max of internal leading to me.

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

No branches or pull requests

2 participants