Redex PDF output contains a wrong font, while Racket REPL renders the correct font
还没有人认领这个 Issue。
评估
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 新手友好度
- 32/100
- Issue 类型
- 缺陷
- 描述清晰度
- 基本清楚
- 活跃度
- 停滞
- 领域
- tooling
调研方向
从提供的最小 Racket 示例和 redex/pict 渲染入口开始,尤其是 render-language;将 REPL 和 PDF 的输出与指定的样式进行比较。完成的标准是,PDF 对相关终端使用 Source Code Pro,而不是 Source Code Variable ExtraLight,同时不导致 REPL 渲染回归。
由索引模型根据 Issue 内容生成。
描述
When I try to use Source Code Pro as the font for nonterminals, the font is correctly rendered in the output of the racket REPL, but when outputting as pdf then a different font is used in the pdf, namely Source Code Variable with weight ExtraLight.
My OS is macOS Ventura 13.4.1, running Racket 8.9 [cs].
A nearly minimal example to reproduce the issue. Some of the style modifications are undoubtedly redundant since they do not affect nonterminals, but this is the actual configuration that I am using in a project (which may be relevant). If needed, the used fonts can be acquired here: Source Code Pro and CMU Serif.
#lang racket
(require redex
redex/pict)
(define-language CommonLang
(atom ::= number boolean string ())
(r/w ::= READ WRITE))
(define sans-serif-style "Source Code Pro")
(define roman-style "CMU Serif")
(label-style sans-serif-style)
(literal-style sans-serif-style)
(metafunction-style sans-serif-style)
(paren-style roman-style)
(default-style roman-style)
(grammar-style roman-style)
(non-terminal-subscript-style `(subscript large-script italic . ,roman-style))
(non-terminal-superscript-style `(superscript large-script italic . ,roman-style))
(non-terminal-style `(italic . ,roman-style))
(render-language CommonLang)
(render-language CommonLang "./commonlang.pdf")
Pictures of the issue:
Correct font for the READ and WRITE terminals:
Incorrect font for the READ and WRITE terminals:
- 主要语言
- Racket
- 星标
- 114
- 派生
- 42
- PR 合并指标
- 30 天内没有已合并 PR
环境准备
这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
racket/redex 的其他 Issue
-
难度 3/5 1-2 天 新手友好度 55/100
-
难度 4/5 3-5 天 新手友好度 35/100
-
难度 4/5 3-5 天 新手友好度 38/100
-
难度 4/5 3-5 天 新手友好度 35/100
-
难度 3/5 1-2 天 新手友好度 35/100
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 79/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 78/100
richardcase/skills#29 ·
维护者通常 1 天内回复
-
难度 1/5 1 小时以内 新手友好度 72/100
-
Type: Bug
难度 2/5 1-3 小时 新手友好度 72/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 90/100
yegor256/antlr2ebnf-maven-plugin#155 ·
维护者通常 1 天内回复