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

The font size of print definitions is incorrect on Linux.

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

Chưa có ai nhận issue này.

Đá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
35/100
Loại issue
Lỗi
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Đình trệ
Lĩnh vực
desktop

Hướng nghiên cứu

Bắt đầu với mã tính toán trang và vẽ trong gui-lib/mred/private/wxme/text.rkt ở các dòng 5956-5960 và 5631-5643, sau đó xem lại tài liệu về độ phân giải màn hình được liên kết. Truy vết cách phông chữ snip được sử dụng để tính toán trang và in trên Linux. Được coi là hoàn thành khi Print definitions sử dụng cỡ phông chữ trình soạn thảo đã cấu hình mà không yêu cầu người dùng thay đổi cỡ đó trước và sau khi in.

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

Mô tả

This is another issue related to https://github.com/racket/gui/issues/336. Suppose #336 is fixed, "File > Print definitions... > [print dialogue opens]" does print non-blank pages on Linux. But the font size of the printed file is larger than the font size set in the preference or "View > Decrease Font Size/Increase Font Size". According to the documentation:

A “point” for font sizing is equivalent to (/ 96 72) drawing units.

So the actual print font size is 1.33 times the set font size. This really makes it painful on Linux because we have to change the font size of the editor when printing and change it back after printing. On Windows there is no such problem. It seems page calculation/draw is done in the following code:
https://github.com/racket/gui/blob/03b7ffaab6ba1bd5b16907b95a1a0f12e9dd6135/gui-lib/mred/private/wxme/text.rkt#L5956-L5960

https://github.com/racket/gui/blob/03b7ffaab6ba1bd5b16907b95a1a0f12e9dd6135/gui-lib/mred/private/wxme/text.rkt#L5631-L5643
Here snip's font is used for both page number calculation and printing. Is there a way to automatically scale when printing so that the print font size is adjusted to the actual font size?

Ngôn ngữ chính
Racket
Star
68
Fork
83
Merge trung bình
9 ngày 8 giờ
Pull request đã merge (30 ngày)
4

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

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 racket/gui

Tất cả issue của racket/gui

Issue tương tự

Thêm issue về Desktop Dev

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.