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

Some Korean glyphs are not rendered correctly. #512

Open
arrufat opened this issue Mar 9, 2023 · 4 comments
Open

Some Korean glyphs are not rendered correctly. #512

arrufat opened this issue Mar 9, 2023 · 4 comments
Assignees

Comments

@arrufat
Copy link

arrufat commented Mar 9, 2023

I am using IBM Plex on Linux and sometimes Hangul syllables are not rendered correctly.

For instance, the syllable (\uC544 HANGUL SYLLABLE A) is sometimes rendered as:

아 (\u110B HANGUL CHOSEONG IEUNG, \u1161 HANGUL JUNGSEONG A), that is, the individual parts separated:

image

It doesn't happen when I type those characters (that always works).
But sometimes, people send me files with those weird characters.

I wonder why this is happening. Is it because IBM Plex KR does not support the range U+1100 to U+302F?
If I install Source Han Sans, which supports that range, I can render those characters.
Moreover, if I set my main font to “IBM Plex Sans KR” it works, but then it doesn't render any accented characters, and the metrics are a bit off.

How can I proceed? Maybe there's some magic fontconfig configuration I have to set up?
Are there any plans to support that Unicode range?

@arrufat
Copy link
Author

arrufat commented Mar 9, 2023

I've just modified the font with fontforge to include those two characters (copied them from U+3137 and U+314F) but still doesn't work.

@BoldMonday
Copy link
Collaborator

BoldMonday commented Apr 11, 2023

IBM Plex Sans KR does not support the unicode range Hangul Jamo U+1100U+11FF. I don't know the reason why the designers at Sandoll made that decision. But Unicode normalisation rules prescribe that the characters in question U+110B and U+1161 should be converted to U+C544. This is also what we observe in our testing environment on macOS.

image

It appears that in some situations this normalisation is not applied correctly in your environment.
Is there a difference in behaviour when using Plex Sans KR in different font formats (OTF or TTF) perhaps?
Otherwise I would consider filing this as a bug with the developers of your Linux environment.

@arrufat
Copy link
Author

arrufat commented Apr 11, 2023

Hi, thank you for your reply.
I tried with both OTF and TTF and still get the same problem.
I will repost if I make any progress on this.
Thank you.

@arrufat
Copy link
Author

arrufat commented Apr 18, 2023

I've managed to come up with a hack, by adding this to my ~/.config/fontconfig/fonts.conf:

<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "urn:fontconfig:fonts.dtd">
<fontconfig>
    <alias>
        <family>sans-serif</family>
        <prefer>
            <family>IBM Plex Sans</family>
            <family>IBM Plex Sans KR</family>
            <family>Source Han Sans</family>
        </prefer>
    </alias>
</fontconfig>

This will use IBM Plex Sans KR, but when the characters are missing, it will fall back to the Source Han Sans font. Not ideal, but it at least I can read all the characters now.

It would be great if IBM Plex Sans KR supported that Unicode range, though, and also if it included accented characters, just like the IBM Plex Sans JP does.

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

No branches or pull requests

2 participants