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
I know that we can use the option.font property to change the font, but it only searches for web-safe fonts. How can I use a custom font that I stored on the server, let's say /public/fonts/Wurmics_Bravo.ttf?
The text was updated successfully, but these errors were encountered:
Using the FontFace API you can load a font, and then reference the name (first argument to FontFace) within your vectorize text options.
// load your fontconstfont=newFontFace('Fredoka',"url('fonts/Fredoka-SemiBold.ttf')")awaitfont.load()document.fonts.add(font)// make a mesh from itconstmesh=vectorizeText(char,{triangles: true,textBaseline: "alphabetic",font: 'Fredoka',size: '10px',textAlign: 'center',})
I know that we can use the
option.font
property to change the font, but it only searches for web-safe fonts. How can I use a custom font that I stored on the server, let's say/public/fonts/Wurmics_Bravo.ttf
?The text was updated successfully, but these errors were encountered: