Skip to content

[p5.js 2.0 Beta Bug Report]: Typr error: pako is not defined for some fonts #7707

Closed
@davepagurek

Description

@davepagurek

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)

p5.js version

Latest dev-2.0

Web browser and version

Firefox

Operating system

MacOS

Steps to reproduce this

Some woff fonts (not woff2, which we know isn't supported) aren't being read by Typr, and instead throw the error "pako is not defined". The actual error message is caught and silently handled, so you have to check "pause on caught exceptions" in your debugger to see it:

Image

Here's the woff file I'm testing on, which is the latin italic woff2 of Montserrat from here https://fonts.googleapis.com/css2?family=Montserrat:ital,wght@0,100..900;1,100..900&display=swap and then converted manually to a woff: http://davepagurek.com/stuff/montserrat-italic.woff

Steps:

  1. Load the font with font = await loadFont('http://davepagurek.com/stuff/montserrat-italic.woff')

Snippet:

https://editor.p5js.org/davepagurek/sketches/AsxD8pcb0

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