Iosevka icon indicating copy to clipboard operation
Iosevka copied to clipboard

Combining Parentheses behavior

Open Logo121 opened this issue 1 year ago • 6 comments

Mentioned in #1673.

The combining parentheses have some specific behavior that is not realized in Iosevka yet. Though considering this is only used for Germanic dialectology, this is probably low priority.

According to the unicode standard (Under the section "Combining Parentheses"):

  1. Instead of stacking above/below other diacritical marks, they are supposed to surround them. Iosevka does not stack these characters as of now, but instead fixing them at a certain position. This works for simple, diacritic-height marks. But for some cases it doesn't (both of these cases can happen in actual notation):
    • Non-centered diacritics: image (Text: u\u0315\u1ABB k\u0321\u1ABD)
    • Stacked marks: image (Text: g\u0303\u0304\u1ABB, parentheses should attach to the macron)
  2. If a base character has a precomposed diacritic above/below/overlay, the corresponding Combining Parentheses should surround those. I.e., they should look identical to their canonical form: image This is already handled by Iosevka.
  3. Diacritics that can be placed sideways of each other should be surrounded by the parentheses individually. This is mentioned in the issue above: However, since neither of those marks are implemented yet, this is not an issue now.
  4. This is entirely optional and undefined by unicode, but the "combining parentheses overlay" character may also surround "augmentation" parts of a glyph, if it is based on another character. The documentation uses ŋ vs n as example, which may imply that n\u0321\u1ABD and ŋ\u1ABE would look the same (in default style, sans-serif), although whether they really should look the same is undefined. I don't think I see any fonts implementing that, however. The "combining parentheses overlay" character also not implemented yet, so this is not an issue now.

Where these should go in other cases (e.g. stacked parentheses, parentheses above over base character) is undefined behavior.

These probably can't be resolved in the near future, so I'm just leaving this for possible Research purposes.

EDIT: some corrections

Logo121 avatar Apr 18 '23 20:04 Logo121

I mean... Are there even existing fonts supporting this well?

be5invis avatar Apr 19 '23 03:04 be5invis

Well, probably no. Very few fonts even support these characters, and even fewer fonts actually can stack diacritics properly in the first place.

The most that've been done is that dscorbett's issue in Noto LGC https://github.com/notofonts/latin-greek-cyrillic/issues/146

That's why I did say this would probably be low priority because the use of it is very niche and there are really no support at all (that I know). It is Unicode standard though, that's all I can say.

Logo121 avatar Apr 19 '23 15:04 Logo121

Nishiki-teki has partial support.

dscorbett avatar Apr 19 '23 16:04 dscorbett

Does it? I've checked out on that before, but it doesn't seem like the diacritics in that font even stack.

Logo121 avatar Apr 19 '23 16:04 Logo121

It supports some sequences like ⟨a᪺᪽᪷᪽⟩. It is not full support but it is more than most fonts.

dscorbett avatar Apr 19 '23 16:04 dscorbett

Ok, checked the changes and it already works amazingly well

There's this problem with parentheses on base character with no diacritics for now: image There's no defined behavior for this but I guess it's reasonable to expect them to be at the same place as normal above/below diacritics (or even acting as a standalone diacritic that surrounds nothing)?

EDIT: Another one: image Probably happens when some combinations are custom made

Logo121 avatar Apr 23 '23 16:04 Logo121