Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

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

Open
#960 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

@PCMan is already working on this.

Since Oct 18, 2026.

  • #962 by @PCMan — open

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
25/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
cpp

Research direction

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.

Written by the indexing model from the issue text.

Description

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.
Dominant language
C++
Stars
1.5k
Forks
244
Avg merge
19h 59m
Merged PRs (30d)
33

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from EasyIME/PIME

All issues in EasyIME/PIME

Similar issues

More C++ issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.