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

Apply kerning between Hiragana and Katakana #310

Closed
Hoolean opened this issue Jan 23, 2023 · 2 comments · Fixed by #311
Closed

Apply kerning between Hiragana and Katakana #310

Hoolean opened this issue Jan 23, 2023 · 2 comments · Fixed by #311

Comments

@Hoolean
Copy link

Hoolean commented Jan 23, 2023

Issue

Kerning is not shown between Hiragana and Katakana characters

Example

"すペ" in Noto Sans JP (sourced from Google Fonts), which has kerning that is not displayed

Further Context

Hiragana and Katakana characters belong to separate Unicode scripts, "Hira" and "Kana", but it is not uncommon for characters from both scripts to occur in the same run of text. In particular, the OpenType specification for font files classifies both Hiragana and Katakana under the same script, "kana", such that the same script-specific positioning and substitution features apply to both.

Chrome displays kerning between the two scripts, and Firefox will begin doing so in an upcoming release.

Workaround

Disable BiDi and Segmentation

Ideal Fix

Poke Hiragana and Katakana into the same segment, so that they can interact with each other

Other Notes

The vertical kerning of "しチ" in the same test fonts is not affected, possibly because segmentation is not enabled for Top-to-Bottom

@justvanrossum
Copy link
Owner

Thanks for the detailed report. Perhaps the segmentation could be done based on the opentype version of the script tag.

(Indeed, segmentation is not implemented for vertical layout, see also #52)

@justvanrossum
Copy link
Owner

#311 seems to fix this:
image

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 a pull request may close this issue.

2 participants