-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
Description
Nature of issue?
- Found a bug
- Existing feature enhancement
- New feature request
Most appropriate sub-area of p5.js?
- Color
- Core/Environment/Rendering
- Data
- Events
- Image
- IO
- Math
- Typography
- Utilities
- WebGL
- Other (specify if possible)
Which platform were you using when you encountered this?
- Mobile/Tablet (touch devices)
- Desktop/Laptop
- Others (specify if possible)
Details about the bug:
- p5.js version: v0.8.0 April 08, 2019
- Web browser and version: 74.0.3729.169
- Operating System: MacOSX Mojave
- Steps to reproduce this:
p.preload = function() {
font = p.loadFont("https://fonts.googleapis.com/css?family=Roboto&display=swap" );
}
Error Message:
p5.js says: It looks like there was a problem loading your font. Try checking if the file path [https://fonts.googleapis.com/css?family=Roboto&display=swap] is correct, hosting the font online, or running a local server.[https://github.com/processing/p5.js/wiki/Local-server]
index.js:1375 Error: Unsupported OpenType signature /* c
at parseBuffer (p5.js:42241)
at p5.js:42439
at XMLHttpRequest.request.onload (p5.js:42079) "https://fonts.googleapis.com/css?family=Roboto&display=swap"
Feature enhancement details:
In WEBGL mode, p5 is not supporting .ttf text files when stored locally or when accessed via url (as is the case in the above example). Meanwhile, the reference page for text() says
"WEBGL: Only opentype/truetype fonts are supported."
which would imply .ttf fonts shoud be usable.