Candidate and message windows do not adapt to Per-Monitor High DPI
メンテナーはふだん 1 日以内に返信
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 25/100
- issue の種類
- バグ
- 明瞭さ
- おおむね明確
- 活発さ
- 停滞
- 技術スタック
- cpp
調査の方向性
Start in PIME::TextService, where candFontHeight() uses GetDC(NULL) and GetDeviceCaps to size candidate and message window fonts. Check how TextService initializes or updates the font, then trace how it can detect the target window's DPI and refresh sizing when that DPI changes. Done when both windows scale correctly across monitors with different DPI settings; linked pull request #962 shows work is already underway.
索引モデルが issue の本文から書いたものです。
説明
Problem Description
Currently, \PIME::TextService\ computes font height for the candidate window and message window using \candFontHeight():
\\cpp
candFontHeight_ = -MulDiv(candFontSize_, GetDeviceCaps(hdc, LOGPIXELSY), 72);
\
where \hdc = GetDC(NULL).
This causes issues on modern Windows 10/11 systems:
- \GetDC(NULL)\ queries only the system primary monitor DPI. In multi-monitor setups with mixed DPI scaling (e.g., 4K screen at 200% alongside 1080p at 100%), the candidate and message windows do not scale to the target monitor's DPI, appearing either blurry, too small, or too large.
- The font is only created once at initialization or when font settings change, and does not dynamically update if typing in a window on a monitor with different DPI scaling.
Proposed Solution
- Introduce a helper to query per-window DPI using \GetDpiForWindow\ with fallback to \GetDeviceCaps\ / 96 DPI.
- Dynamically update font sizing in \TextService\ when target window DPI changes so candidate and message windows scale properly across mixed-DPI monitors.
- 主要言語
- C++
- スター
- 1.5k
- フォーク
- 244
- 平均マージ
- 19時間 59分
- マージ済み PR(30日)
- 33
環境構築
このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
EasyIME/PIME のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
メンテナーはふだん 1 日以内に返信
-
添加"麼"輕聲 注音˙ㄇㄜ 順序1オープンchewing enhancement upstream
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
メンテナーはふだん 1 日以内に返信
-
"麼" 建議加上 ai7オープン
難易度 1/5 1時間未満 初心者へのやさしさ 75/100
メンテナーはふだん 1 日以内に返信
-
蝦米輸入法,使用 Ctrl + / 問題オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 60/100
メンテナーはふだん 1 日以内に返信
-
難易度 4/5 3〜5日 初心者へのやさしさ 48/100
メンテナーはふだん 1 日以内に返信
似ている issue
-
needs-format
難易度 2/5 1〜3時間 初心者へのやさしさ 69/100
Niko1221/Strata#3368 · コメント 1 件 ·
メンテナーはふだん 3 日以内に返信
-
bug
難易度 1/5 1〜3時間 初心者へのやさしさ 76/100
dragonflydb/dragonfly#8617 · リアクション 1 件 ·
メンテナーはふだん 1 日以内に返信
-
bug needs triage
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
project-chip/connectedhomeip#74842 ·
メンテナーはふだん 1 日以内に返信
-
難易度 1/5 1時間未満 初心者へのやさしさ 88/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 67/100
smartmontools/smartmontools#670 ·
メンテナーはふだん 1 日以内に返信