go-p5 / p5

p5 is a simple package that provides primitives resembling the ones exposed by p5js.org
https://go-p5.github.io/
BSD 3-Clause "New" or "Revised" License
150 stars 12 forks source link

is custom font supported? #56

Closed mat-lo closed 2 years ago

mat-lo commented 2 years ago

I looked for it in the documentation but it's not there so I guess not

sbinet commented 2 years ago

thanks for the report.

there's indeed no exposed API to do that at the moment. as the underlying Gio library allows for such a thing, it wouldn't be too difficult to achieve such a thing.

do you expect to be able to have different fonts flavors (italic/bold/mono), different fonts altogether (helvetica/noto,....) or both, on a per-text basis? or something at the "application" level would suffice?

mat-lo commented 2 years ago

Thanks @sbinet for your quick reply! It would be great if we could use a custom font file altogether, just like loadFont() in p5.js.