Poor on-screen font antialiasing/smoothing in mplcairo
還沒有人認領這個 Issue。
評估
- 難度
- 4/5
- 預估耗時
- 3-5 天
- 新手友好度
- 30/100
- Issue 類型
- 缺陷
- 描述清晰度
- 基本清楚
- 活躍度
- 停滯
- 技術堆疊
- python
研究方向
首先,使用 mplcairo 和 MacOSX backend 執行提供的 Python MWE,並以所報告的 mplcairo、Matplotlib、Cairo 和 FreeType 版本作為參考。比較螢幕上的文字呈現,並調查 backend 的字型呈現路徑。完成的標準是確認是否支援等效的平滑處理,並加以改善,或清楚記錄該限制與可用的設定。
由索引模型根據 Issue 內容生成。
描述
I'm trying to switch to using the mplcairo backend because it does certain things better than the MacOSX backend, especially when colormaps have transparency. However, I've noticed that the font smoothing, at least for plots displayed on the screen, is noticeably poorer. The code below offers a MWE:
import numpy as np
from matplotlib import pyplot as plt
fig = plt.figure()
plt.plot(np.linspace(0,1,10), np.linspace(0,1,10), '-o')
plt.setp(plt.gca().get_xticklabels(), size=14)
plt.setp(plt.gca().get_yticklabels(), size=14)
With the mplcairo backend, the tick labels look jagged and not smooth, as below.
Whereas with the MacOSX backend gives me noticeably smoother fonts.
Everything is identical for the production of the two figures except the backend, which I switch in .matplotlibrc. Am I missing something? Is there a way to get mplcairo to render fonts with proper smoothing?
import mplcairo
mplcairo.get_versions()
{'python': '3.11.6 (main, Oct 12 2023, 21:46:57) [Clang 15.0.0 (clang-1500.0.40.1)]',
'mplcairo': '0.5.post32+ge771c74',
'matplotlib': '3.8.0',
'cairo': '1.17.6 @ /Users/sbasu1/packages/macports/lib/libcairo.2.dylib',
'freetype': '2.13.2 @ /Users/sbasu1/packages/macports/lib/libfreetype.6.dylib',
'pybind11': '2.11.1',
'raqm': None,
'harfbuzz': None}
- 主要語言
- C++
- 星號
- 120
- 分支
- 23
- PR 合併指標
- 30 天內沒有已合併 PR
環境準備
這個專案沒有提供開發容器、Dockerfile 或貢獻指南,環境需要你自己搭建:先看它的 README,通用步驟見我們的新手貢獻指南。
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
matplotlib/mplcairo 的其他 Issue
-
workaround for low dpi when rasterizing (pcolormesh saved as pdf)可能重新可做 關聯的 PR 已關閉且未合併。 未關閉
難度 4/5 3-5 天 新手友好度 25/100
matplotlib/mplcairo#19 · 5 則留言 ·
查看 matplotlib/mplcairo 的全部 Issue
相似的 Issue
-
Issue-Bug Needs-Triage
難度 2/5 1-3 小時 新手友好度 62/100
microsoft/winget-cli#6645 ·
維護者通常 2 天內回覆
-
cleanup help wanted
難度 2/5 1-3 小時 新手友好度 62/100
ESPresense/ESPresense#2602 ·
維護者通常 1 天內回覆
-
devex good first issue
難度 2/5 1-3 小時 新手友好度 62/100
維護者通常 1 天內回覆
-
artifact:simulation-scenario domain:physics good first issue help wanted role:validation testing
難度 2/5 1-3 小時 新手友好度 75/100
-
難度 2/5 1-3 小時 新手友好度 62/100
維護者通常 3 天內回覆