Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

Candidate and message windows do not adapt to Per-Monitor High DPI

Aperta
#960 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

@PCMan ci sta già lavorando.

Dal 18/10/2026.

  • #962 di @PCMan — aperta

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
25/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Ferma
Stack tecnologico
cpp

Direzione di ricerca

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.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

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:

  1. \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.
  2. 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
  1. Introduce a helper to query per-window DPI using \GetDpiForWindow\ with fallback to \GetDeviceCaps\ / 96 DPI.
  2. Dynamically update font sizing in \TextService\ when target window DPI changes so candidate and message windows scale properly across mixed-DPI monitors.
Lingua principale
C++
Stelle
1.5k
Fork
244
Merge medio
19h 59m
PR unite (30g)
33

Preparare l'ambiente

Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di EasyIME/PIME

Tutte le issue di EasyIME/PIME

Issue simili

Altre issue su C++

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.