Skip to content

Add Reference to Default Font object #7193

Open
@blackboxlogic

Description

@blackboxlogic

Increasing access

Proposal would simplify working with fonts.

Most appropriate sub-area of p5.js?

  • Accessibility
  • Color
  • Core/Environment/Rendering
  • Data
  • DOM
  • Events
  • Image
  • IO
  • Math
  • Typography
  • Utilities
  • WebGL
  • Build process
  • Unit testing
  • Internationalization
  • Friendly errors
  • Other (specify if possible)

Feature request details

To use textBounds() or textToPoints(), you first need to call loadFont() to get a reference to a p5.Font object. Creating a reference like defaultFont or currentFont would bypass the need to find a font file, include it in your project, and load it if the user is happy with the default p5js font.

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