Skip to content
Casey Reas edited this page Aug 25, 2014 · 1 revision

Processing.js and hence JavaScript mode handles fonts differently than the standard Java mode:

  • the *.vlw format is not supported
  • for the same reason loadFont() is just an alias to createFont()
  • font files can be loaded directly if they are in these formats: *.ttf, *.otf
  • you can re-use fonts already defined as CSS rule by passing the @font-face name to createFont()
  • use "@pjs font" directive to preload fonts before your sketch starts
Clone this wiki locally