Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

The font size of print definitions is incorrect on Linux.

未关闭
#338 0 条评论 1 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

评估

难度
4/5
预计耗时
3-5 天
新手友好度
35/100
Issue 类型
缺陷
描述清晰度
基本清楚
活跃度
停滞
领域
desktop

调研方向

先从 gui-lib/mred/private/wxme/text.rkt 中第 5956-5960 行和第 5631-5643 行的页面计算和绘制代码开始,然后查看链接的显示分辨率文档。跟踪 snip 字体在 Linux 上如何用于页面计算和打印。完成的标准是 Print definitions 使用已配置的编辑器字体大小,而无需用户在打印前后更改它。

由索引模型根据 Issue 内容生成。

描述

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?

主要语言
Racket
星标
68
派生
83
平均合并
9 天 8 小时
30 天内合并 PR
4

环境准备

  • 没有 Dockerfile 或 Docker Compose 文件
  • 没有 Pull Request 模板
  • 阅读贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

racket/gui 的其他 Issue

查看 racket/gui 的全部 Issue

相似的 Issue

更多 Desktop Dev Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。