Libertinus: ā‚˜ (U+2098) and ā‚™ (U+2099) subscripts (m and n) overlap integer subscripts

Created on 26 Aug 2020  Ā·  11Comments  Ā·  Source: alerque/libertinus

Describe the bug
When preceded by an integer subscript, subscripts m and n overlap the integer.

Subscripts m and n are represented respectively by ā‚˜ (U+2098) and ā‚™ (U+2099)

This appears to only happen when preceded by an integer subscript, not another letter subscript. Furthermore, this only appears to affect m and n, but not other letter subscripts in the U+209x range.

Steps to reproduce

  1. Cā‚ƒā‚˜
  2. Cā‚ƒā‚™

Expected vs. actual behavior
Expected: subscripts to render side-by-side
Actual: the m or n subscript overlaps the integer

Screenshots / logs

Bug:

Screen Shot 2020-08-25 at 3 36 35 PM
Screen Shot 2020-08-25 at 3 37 20 PM

But other U+209x work correctly:

Screen Shot 2020-08-25 at 3 38 00 PM
Screen Shot 2020-08-25 at 3 35 17 PM

Preceding with a letter subscript instead of integer subscript also works correctly:

Screen Shot 2020-08-25 at 3 41 06 PM

Additional context
This was observed with Sans Regular .otf file on both Android and iOS. Not sure if the platform matters, but since we've seen the issue on both I assume it's not too platform-specific.

bug script latin

All 11 comments

Thanks for the clear report @yuvalgnessin-qz. This is probably not a hard fix if anybody wants to poke around in FontForge and jump in with a PR (and yes I'm in a position to review and accept PRs now). I'll retag/assign when I get around to working on this if nobody else is at that point so we don't duplicate work.

Thank you @alerque! Unfortunately I have absolutely zero context and experience with developing fonts, so I don't think I'm qualified to fix this myself. But please let me know if there's any other way in which I can help!

Hi again @alerque, I'm sure you're very busy, but do you know if you'll be able to get to this fix soon? Is there anything I can do to help?

Thank you so much!

It would appear that the issue is that uni2098 and uni2099 are placed in the kerning class (right-hand side) along with all the superscript characters and the degree sign and stuff like that, which understandably have a huge negative kern with respect to preceding subscripts. Should they just be removed from that class?

Thanks @clsn, that does sound about right. I went looking for this once already and didn't find it (my FontForge foo is still pretty weak sauce). Are you interested in contributing a PR for this?

I'll give it a try. Just a matter of mucking about with the kerning classes. And making sure I understand how the repo is organized, what goes in sfd and what in fea and all that.

OK, it's... weird. I tried using fontforge's python bindings, pulling in the kern table, taking those two characters out of that class, and putting the table back, but when I look at the diffs of the SFD files, it looks like a bunch of other kern classes have also changed, inexplicably. It's as if FF has its own ideas of what should be in the class. And for all I know it might be right!
I think I'll twiddle the SFD files so that ONLY the changes I meant to change are changed!

NO. I think it knows what it's doing.

@clsn I haven't actually used FontForge's Python bindings myself, I'd be interested in seeing the code snippet you used to make this attempt.

@yuvalgnessin-qz Since the PR fixing this has been merged to the master branch it will be in the next release, whenever that is. In the mean time feel free to use the fonts from development builds, you can find them attached as artifacts to each build here (newest first). The fonts in there have development version numbers, but should be a fully working set with whatever changes have been committed to master up to the point they were built.

Do let us know in a new issue if any problems come up in your usage.

Thank you so much! I think I should have time tomorrow or early next week to give it a shot and validate the fix.

Hi @alerque, I was able to validate this fix in my app. It works perfectly! Thank you so much!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

cssobral2013 picture cssobral2013  Ā·  7Comments

aleslavista picture aleslavista  Ā·  5Comments

rolfn picture rolfn  Ā·  5Comments

kopeckyf picture kopeckyf  Ā·  6Comments

KrasnayaPloshchad picture KrasnayaPloshchad  Ā·  4Comments