processing / processing/processing4

Tools > Create Font unable to disable smoothing on macOS

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

还没有人认领这个 Issue。

has attachment macos
主要语言
Java
星标
494
派生
183
平均合并
4 小时 39 分钟
30 天内合并 PR
3

描述

Created by: kylemcdonald

Description

When using createFont() or the Create Font tool to create a PFont for a bitmap pixel font with smoothing disabled, there are still grays in the generated font.

Expected Behavior

Created by thresholding the result in Photoshop:

Screen Shot 2021-10-01 at 10 32 50

Current Behavior

Generated directly by Processing:

Screen Shot 2021-10-01 at 10 31 11

Steps to Reproduce

Here is a link to the font I am using: sg08.zip

PFont font;

void setup() {
  size(512, 512);
  font = createFont("SHAKAGRAPHICS08", 8, false);
  noSmooth();
  textFont(font, 8);
  textAlign(LEFT, TOP);
}

void draw() {
  background(255);
  fill(0);
  noStroke();
  String str = "Forsaking monastic tradition,\ntwelve jovial friars gave up\ntheir vocation for a questionable\nexistence on the flying trapeze.";
  text(str, 20, 20);
}

Your Environment

  • Processing version: 4.0b1
  • Operating System and OS version: MacOS 11.6

Possible Causes / Solutions

I did some basic checks to see that this is happening at font generation time, and not in the rendering. I don't know the Processing internals enough to advise beyond this. Last time I tried this font was circa 2011 and I know it worked correctly Processing back then :)

贡献指南

打开贡献指南

从这里开始

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

调研方向

在 macOS 上使用提供的 sg08.zip 字体,以及调用 createFont("SHAKAGRAPHICS08", 8, false) 的 sketch 重现该问题。跟踪 Create Font 工具和 createFont() 的字体生成路径,以确定平滑处理是在何处引入的。完成的标准是:禁用平滑处理时,生成的位图字体不包含非预期的灰色像素,同时正常的字体行为不受影响。

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

评估

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

把新 issue 发到你的邮箱

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