Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

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

Đang mở
#960 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

@PCMan đang làm issue này rồi.

Từ ngày 18/10/2026.

  • #962 của @PCMan — đang mở

Đánh giá

Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức phù hợp với người mới
25/100
Loại issue
Lỗi
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Đình trệ
Công nghệ
cpp
Lĩnh vực
desktop, operating-systems

Hướng nghiên cứu

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.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

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.
Ngôn ngữ chính
C++
Star
1.5k
Fork
244
Merge trung bình
19 giờ 59 phút
Pull request đã merge (30 ngày)
33

Chuẩn bị môi trường

Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của EasyIME/PIME

Tất cả issue của EasyIME/PIME

Issue tương tự

Thêm issue về C++

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.