Skip to content

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

@processing-bot

Description

@processing-bot
Collaborator

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);
}

Activity

processing-bot

processing-bot commented on Nov 11, 2022

@processing-bot
CollaboratorAuthor

Created by: benfry

That sounds like your graphics card is running out of texture memory, but that should be the case if you're not even changing the font size. (The noLoop() version works because it just does one frame and doesn't run out of memory.)

Try removing the textSize() call there (since it's not doing anything) and it may start working again.

processing-bot

processing-bot commented on Nov 14, 2022

@processing-bot
CollaboratorAuthor

Created by: clankill3r

It's actually the noLoop() version that does not work.

processing-bot

processing-bot commented on Nov 23, 2022

@processing-bot
CollaboratorAuthor

Created by: benfry

Sorry, misread the post. What happens if you load the font in setup()? Also, try taking out the extra textSize() call since it may be juggling the textures in a weird way because it's loading the font twice.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    has attachmentAttachment was not transfered from GitLabopengl

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @processing-bot

        Issue actions

          With a lot of custom fonts and large font sizes, characters disappear with P2D / P3D · Issue #594 · processing/processing4