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

Cyrillic rendering problem #325

Open
jbaublitz opened this issue Oct 26, 2023 · 8 comments
Open

Cyrillic rendering problem #325

jbaublitz opened this issue Oct 26, 2023 · 8 comments

Comments

@jbaublitz
Copy link

Ukrainian Cyrillic letter і with unicode code point u0301 should render as і́. In Source Code Pro, I seem to be getting і ́. I originally thought this was a bug in Gnome font rendering, but it appears to only occur with this font.

Here is the link to the Gnome issue where there was some additional debugging. https://gitlab.gnome.org/GNOME/gnome-text-editor/-/issues/618

@kenmcd
Copy link

kenmcd commented Oct 26, 2023

Hmmm... I can see what is happening.
The acutecomb has a width the same as all the other characters.
Normally combining marks have no width
(and/or they have anchors for proper alignment).
In this case the mark has a width and no anchors.
So it just acts like another monospace character.

In Liberation Mono the acutecomb has no width
and the contour (the actual shape) is a little to the left of center.
When it follows the 0456 it actually overlays that character,
and it ends up placed a little to the right of the dot.
So it looks OK in Liberation Mono.

I also looked at Cascadia Code and its acutecomb has no width, but it is positioned to the right of center so it also looks bad for this purpose.

In IBM Plex Mono the acutecomb has no width
and the shape is close to center, so it looks better too.

JetBrains Mono the acutecomb has no width
but it is very far left of center and ends up overlaying the dot.

No sure why this acutecomb mark has a full width, but that is the issue.

Re Ukrainian: my understanding is the acute is used to indicate stress on vowels.
Is the acute usually positioned above the dot, or to the right?
What is the "correct" placement?
Do you have any example fonts which handle this correctly for Ukrainian?

@pauldhunt
Copy link
Contributor

It looks like there are multiple things going on here. The fonts set all of the characters on a 600 unit width so that it registers as a monowidth font on Mac and relies on some OpenType code to collapse the widths, but it seems that some environments are not accessing that code. Additionally, mark placement for Ukrainian stressed vowels doesn’t seem to be supported in the current version of the fonts. Will do some more checking into how to fix this when I pick this project up again.

@jbaublitz
Copy link
Author

Okay, thanks for looking into this!

@jbaublitz
Copy link
Author

Re Ukrainian: my understanding is the acute is used to indicate stress on vowels. Is the acute usually positioned above the dot, or to the right? What is the "correct" placement? Do you have any example fonts which handle this correctly for Ukrainian?

Hi @kenmcd, I'm sorry, I missed this part. Yes, that is correct. It is only useful for things like dictionaries, etc. that mark word stress or introductory educational materials for non-native speakers. I have never really seen it used outside of cases like that. For an example of a font that renders this correctly, I'm using the font titled "Monospace" on Linux and it seems to render it properly. I've seen some fonts skew a little bit to the right but the ideal placement is centered over the letter. It gets a little bit more complicated with i-like letters (і and ї) because of the dot/dots, which can render like a difficult to read blob in some fonts. As long as it's clear that it's a stress mark as a opposed to a dot for і and [placed above but not covering the dots for ї, that should be good enough. The Wiktionary rendering for this word is actually a great example of how hard it can be to read when it all gets mushed together with the letter ї. The "Monospace" font that I mentioned before does a great job of handling both of these cases if you need an example. Here's a screen shot for both of these letters in that font.

Screenshot from 2023-11-28 17-13-31

@kenmcd
Copy link

kenmcd commented Nov 28, 2023

@jbaublitz Thanks for the info.
Not sure how this will work "correctly" for a monospaced font.
But, I do now know exactly what I need to do in my proportional text font to properly support Ukrainian.
I also found some other info on the proper stress marks.
Thanks.

@jbaublitz
Copy link
Author

The screenshot is from a monospace font, so it seems doable though I would have no idea where to begin, not being a font person.

@kenmcd
Copy link

kenmcd commented Nov 28, 2023

I found a version of Monospace font by George Williams.
And it does have zero width acutecomb (and other comb marks).
But the Cyrillic і does not have any anchors, so it does not work.
Perhaps you have a different updated version of the font.
It does have an OFL-SIL license so you could attach it here.
Be interested in seeing what is in there.

@moyogo
Copy link

moyogo commented Nov 29, 2023

@kenmcd Substitute the dotted i for a dotless one when combined with a top accent. For example see https://googlefonts.github.io/gf-guide/diacritics.html#soft-dotted-glyphs

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

4 participants