TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Thoughts on different fonts for different languages in a text editor

4 点作者 greenn超过 1 年前
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 条评论

eimrine超过 1 年前
My text editor has this feature, all non-English symbols use to render like ▯▯▯▯▯ ▯▯▯ ▯ ▯▯▯▯▯▯▯▯▯.
fomine3超过 1 年前
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.
Someone超过 1 年前
&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.
joshxyz超过 1 年前
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 未加载
cpach超过 1 年前
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 未加载
brudgers超过 1 年前
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 未加载