TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Thoughts on different fonts for different languages in a text editor

4 pointsby greennover 1 year ago
It would be nice if text editors could select different fonts for different languages.<p>Suppose I have a nice font that only supports latin characters but the codebase I work with contains symbols and strings in both English and Japanese. At best, my editor will render my font&#x27;s supported characters and fall back to some default for everything else. At worst, any characters not in the font won&#x27;t be rendered at all. Wouldn&#x27;t it be nice if we could select one font for English and a different but matching font for Japanese?<p>I&#x27;m not aware of any text editor that has this sort of feature. Does anyone share a desire for this?<p>I&#x27;m thinking of contributing work on this for some editor but I&#x27;m not sure how welcome this would be.

6 comments

eimrineover 1 year ago
My text editor has this feature, all non-English symbols use to render like ▯▯▯▯▯ ▯▯▯ ▯ ▯▯▯▯▯▯▯▯▯.
fomine3over 1 year ago
On Japanese Windows, if a configured font misses glyph, it fallback to default font (Maybe &quot;MS Gothic&quot; for Japanese). It&#x27;s common behavior on most editors. I found that random Hangul can be shown too.<p>Most programmers use far better aligned font like Source Han Code JP, or merged and aligned font like Myrica. So I don&#x27;t know much. I don&#x27;t recommend mixing fonts for coding that prefer monospaced font, but it should have a fallback.
Someoneover 1 year ago
&gt; Wouldn&#x27;t it be nice if we could select one font for English and a different but matching font for Japanese?<p>That “matching” is what font designers do when they make a font with a large character set. Making a nice match is highly nontrivial.<p>I think you might be better of with a tool that makes it easy to merge fonts.
joshxyzover 1 year ago
i havent encountered such codebase yet, but i can imagine it being a real acenario as i have friends in an english speaking country trying to migrate to japan.<p>that would be a cool vscode extension i guess, albeit in a niche use case. what could be the possible challenges here? one i can think of is the alignment of monospace width on differing font families.
评论 #37675043 未加载
cpachover 1 year ago
Interesting idea.<p>I imagine Emacs would be able to support this if you’re willing to dive into Elisp. You would probably need some heuristic to guess language (per line?).<p>However, have you considered a much easier solution: Use a typeface with good glyph coverage. The DejaVu family is probably a good bet.
评论 #37675605 未加载
brudgersover 1 year ago
Emacs<p><a href="https:&#x2F;&#x2F;www.emacswiki.org&#x2F;emacs&#x2F;SetFonts#h5o-2" rel="nofollow noreferrer">https:&#x2F;&#x2F;www.emacswiki.org&#x2F;emacs&#x2F;SetFonts#h5o-2</a>
评论 #37674919 未加载