Emacs 31 在 Windows 上支持颜色字体了

Implement drawing text with DirectWrite on MS-Windows. · emacs-mirror/emacs@edf37e8 · GitHub

(set-fontset-font t 'emoji (font-spec :family "Segoe UI Emoji"))
(setq org-bullets-bullet-list '("🐉" "🐠" "🐬" "🐤"))

10 个赞

好消息!Windows 上的 Emacs 越来越好用了。

看来是时候长驻 Emacs 31了。

2 个赞

看了下,不仅是彩色字体,更是直接启用Direct-Write功能增强了字体渲染?

编辑:经下载最新commit编译的Emacs对比,字体渲染明显更实,更接近Mac/Linux版本了。

对性能有提升没?

在macOS上是这样的。

https://www.reddit.com/r/emacs/comments/1gevkia/comment/luded7z

eli-zaretskii

7h ago

GNU Emacs maintainer

Emacs 31 on MS-Windows doesn’t use DirectWrite for text shaping, it still uses HarfBuzz. We only use low-level DirectWrite APIs to draw the font glyphs produced by HarfBuzz, so as to be able to support color fonts.

MS-Windows 上的 Emacs 31 并未使用 DirectWrite 进行文本整形,仍采用 HarfBuzz。我们仅利用 DirectWrite 的底层 API 绘制 HarfBuzz 生成的字体字形,以便支持彩色字体。

So most of the rendering is unchanged in Emacs 31 on MS-Windows, even with the addition of this feature – and there’s no reason to change it, since HarfBuzz is being actively developed and supports all the latest innovations of text shaping. We want to stick to HarfBuzz because we don’t want to depend on MS’s decisions to deprecate their text-shaping engines, something that already happened with Uniscribe.

因此,在 MS-Windows 上的 Emacs 31 中,大部分渲染保持不变,即便加入了这一新特性——也没有理由改变它,因为 HarfBuzz 正在积极开发中,并支持所有最新的文本塑形创新。我们希望坚持使用 HarfBuzz,因为我们不想依赖微软决定弃用其文本塑形引擎的决策,这种情况已经在 Uniscribe 上发生过。