Sitelet https://github.com/processing/processing/issues/5481
Skip to content

Show warning when createFont() cannot find a named font #5481

Description

@knupel

Maybe a print can be helpful for the case where the user try to create a font without extension like .ttfor .otf from unknown font by the system, and Processing use the default font ?

void setup() {
  size(400,400);
  PFont f = createFont("Unknow_font",100); // don't find this font, Processing use default font
  PFont f = createFont("Unknow_font.ttf",100); // return null pointer exception
  // PFont f = createFont("Garamond",100); // find font
  println(f.getName());
}

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions