Notes for CJK Users

Unfortunately, I don't understand the Chinese, Japanese, or Korean languages. So it's difficult for me to accurately test all features with these languages and character sets.

Fortunately, there are many helpful users who do. And they have tried to educate me on edge cases so I can fix them. (Or at least try to fix them).


First, some background about the way macOS works with CJK characters (this also applies to some other special characters and fonts, such as Dingbats):

  1. When modify text, macOS provides a function that repairs any incorrect font attributes. This includes ensuring that a proper font is used to display CJK characters.

  2. Composer users that function after modifying the underlying text.

  3. This is especially important since Composer provides syntax highlighting, meaning that it changes fonts based on your chosen theme. For example, Composer may apply Palatino to your document, which does not support CJK characters. macOS is then responsible for fixing those CJK characters so that they are displayed in a font that works.

  4. The fonts used are chosen by macOS (and possibly your system settings). They are not chosen by Composer.

Where does this matter?

  1. If you paste CJK characters in Composer, and then type ASCII characters, the baseline of that line of text may shift, since the line now consists of CJK and non-CJK fonts, possibly with different baseline heights.

What can you do?

  1. If you frequently use CJK characters, you may wish to set Composer's default font in the Appearance Preferences to an appropriate CJK font. I believe that most (all?) of these fonts also contain ASCII characters, so now all characters should be in the same font, with the same baseline. Alternatively, you could use a new theme that defaults to a CJK font. This would allow you to use one theme for CJK-heavy documents, and another for non-CJK documents where you prefer a different font.

  2. If you find a problem, definitely let me know. I will do my best to find a solution!

Known Issues

  1. Pressing Option-Return key to convert Hangul to Hanja and moving up/down the list can cause the preview to "jump". I am still digging into this. I think it is similar to a known issue in Apple's WebView that causes problems when inserting a space character into the preview, but it might be separate. I can't promise a fix, but am still looking. As a workaround, you can disable the "Synchronize preview location while typing" setting in the Preview Preferences, and scroll the preview manually or use the synchronized scrolling feature.

  2. macOS Text Replacement doesn't seem to work with multi-character text to be replaced. I'm trying to dig into this for a solution.