Skip to content

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

@knupel

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions