processing / processing/processing4

With a lot of custom fonts and large font sizes, characters disappear with P2D / P3D

Open
#594 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

has attachment opengl
Dominant language
Java
Stars
494
Forks
183
Avg merge
4h 39m
Merged PRs (30d)
3

Description

Created by: clankill3r

With a lot of custom fonts and large font sizes, it can be that characters are not drawn.
Here i draw the text "HSLAB":

Screenshot 2022-11-10 at 13 58 51

One of the weird things is, that if you disable noLoop() that it works again.

Font:
https://fonts.google.com/specimen/Source+Code+Pro

int font_size = 400;
PFont font;

void setup() {
  size(1200, 350, P2D);
  noLoop();
}

void draw() {
  background(0);
  
  if (font == null) {
    font = createFont("SourceCodePro-Black.ttf", font_size);
    textFont(font);
  }
  textSize(font_size);
  fill(255);
  text("HSLAB", 0, height*0.85);
}

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

No source file or test is named. Start by running the supplied Java sketch with P2D and P3D, using Source Code Pro, a large font size, many custom fonts, and noLoop(). Done means the HSLAB characters render consistently in both renderers without requiring noLoop() to be disabled.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
computer-graphics
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.