@thisotherthing/ops

@thisotherthing/path-fonts

This package contains fonts that are made up of single paths, for laser cutting or pen plottting etc

Calling .draw() from a font, with the desired position and size, gives you a svg path d string, that you can then put in an svg.

Fonts

Styl

image of the styl font, containing all the available characters

Exports

Styl

Styl.getChar

Record<string,
d:
(
x:number
y:number
scale:number
) => string
getWidth:
(
scale:number
strokeWeight:number
) => number
getAdvance:
(
scale:number
strokeWeight:number
) => number
>

Styl.availableChars

string[]

Styl.draw

Parameters
text
string
x
number
y
number
options?
fontSize:number
strokeWeight:number
textAlign?:
"left"
"center"
"right"
textBaseline?:
"top"
"middle"
"bottom"
Return
d:string
bounds:
x:number
y:number
width:number
height:number