You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
**Right now this issue is called "finish implementation", but really this is a little more conceptual than just implementation. Most of the basic Processing text features are in p5.js right now, but are there others that make sense? Some that don't? I think createFont() would probably go away, but it would be nice to have a way to hook in a webfont without having to touch the html/css.
WebFontLoader does add some CSS to the page, but I think that's unavoidable. If you're concerned about extra styles being added, here's the contents of the stylesheet that the loader adds:
I believe that @font-face defines a symbol that can only be used as the value of a font or font-family property so unless the user has another @font-face declaration with the same name but uses a different font, they should be okay.
I tripped on this now, I want to render text with a custom font...
Shoud I use WebFontLoader or implement loadFont? I read some of the docs and WebFontLoader still needs custom CSS to load custom fonts.
is this reopened because there's some part left to do or because you were leaving it for me to close? let's breakout the leftover part if there is one.
Activity
k4b7 commentedon Feb 4, 2015
@lmccart maybe we could use https://github.com/typekit/webfontloader for
loadFont()GoToLoop commentedon Feb 4, 2015
I much prefer programmatically than touching config files like HTML & CSS!
k4b7 commentedon Feb 4, 2015
WebFontLoader has a programmatic API. Here's an example using the canvas to render:
Here's the resulting output:

WebFontLoader does add some CSS to the page, but I think that's unavoidable. If you're concerned about extra styles being added, here's the contents of the stylesheet that the loader adds:
I believe that
@font-facedefines a symbol that can only be used as the value of afontorfont-familyproperty so unless the user has another@font-facedeclaration with the same name but uses a different font, they should be okay.debone commentedon Mar 7, 2015
I tripped on this now, I want to render text with a custom font...
Shoud I use WebFontLoader or implement loadFont? I read some of the docs and WebFontLoader still needs custom CSS to load custom fonts.
dhowe commentedon Jun 1, 2015
all the functions listed above are now implemented for opentype (ttf, otf) fonts -- see the updated docs
lmccart commentedon Jun 2, 2015
is this reopened because there's some part left to do or because you were leaving it for me to close? let's breakout the leftover part if there is one.
dhowe commentedon Jun 2, 2015
just leaving for you to close, thanks