processing / processing/processing4

Tools > Create Font unable to disable smoothing on macOS

Aperta
#278 7 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

has attachment macos
Lingua principale
Java
Stelle
494
Fork
183
Merge medio
4h 39m
PR unite (30g)
3

Descrizione

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 :)

Guida per i contributori

Apri la guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Direzione di ricerca

Riproduci il problema su macOS con il font sg08.zip fornito e lo sketch che usa createFont("SHAKAGRAPHICS08", 8, false). Traccia il percorso di generazione dei font dello strumento Create Font e di createFont() per determinare dove viene introdotto l’antialiasing. Il lavoro è completato quando il font bitmap generato non contiene pixel grigi indesiderati con l’antialiasing disabilitato, mentre il normale comportamento dei font rimane invariato.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Stack tecnologico
java
Ambito
computer-graphics, desktop
Tipo di issue
Bug
Difficoltà
4/5
Tempo stimato
3-5 giorni
Stato di attività
Ferma
Chiarezza
Abbastanza chiara
Idoneità per principianti
35/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.