
我在 Windows 10 上使用 Claws Mail 3.19.1(帶有 GTK2 的最新版本)的 Windows 端口,但字體不是子像素抗鋸齒 (RGB),它們要么是原始像素邊緣(“清晰”),要么灰度平滑使它們變得模糊。
例如,如果我使用 Segoe UI,它會進行灰階平滑,這會使其變得模糊。如果我使用 Courier New,它根本沒有過濾,並且有鋸齒狀的像素化邊緣。
我想要的是它使用RGB 子像素渲染/抗鋸齒(如ClearType,但我猜它不使用它,因為它是GTK2),這樣它在我的LCD 螢幕上的有效解析度就會增加,而我可以使用較小的字體。
請注意,Thunderbird 的字體工作正常,即使我將其設定為相同的字體,所以我知道這不是機器配置問題。
我可以更改一些隱藏配置來強制執行它嗎?我不介意擺弄任何文件。 Claws Mail 的安裝附帶了一個etc/fonts/fonts.conf
,我在網上搜尋瞭如何強制/啟用 GTK2 並將其添加到那裡。不,不起作用。我嘗試local.conf
在該資料夾中添加一個包含資訊的文件。不,也不起作用。
作為記錄,我在那裡嘗試了這樣的東西:
<match target="font">
<edit name="antialias" mode="assign"><bool>true</bool></edit>
</match>
<match target="pattern">
<edit name="lcdfilter" mode="assign">
<const>lcddefault</const>
</edit>
</match>
等等。我甚至嘗試從我的 Linux 機器(GTK2 應用程式上也有 RGB 子像素抗鋸齒)複製 conf.d 子目錄,但仍然不起作用。
有任何想法嗎?
答案1
感謝喬納森·波音(Windows 連接埠開發人員),我發現我必須傳遞PANGOCAIRO_BACKEND=fc
環境變數才能讓它使用 fontconfig。這以及以下某處etc\fonts\fonts.conf
(安裝 Claws Mail 的地方):
<match target="font">
<edit name="antialias" mode="assign">
<bool>true</bool>
</edit>
<edit name="hinting" mode="assign">
<bool>true</bool>
</edit>
<edit name="hintstyle" mode="assign">
<const>hintfull</const>
</edit>
<edit name="rgba" mode="assign">
<const>rgb</const>
</edit>
<edit name="autohint" mode="assign">
<bool>false</bool>
</edit>
<edit name="lcdfilter" mode="assign">
<const>lcddefault</const>
</edit>
</match>
現在它可以工作並且具有 RGB 子像素抗鋸齒功能!