On Tue, 11 Sep 2018, at 3:01 PM, viktor.oge...@gmail.com wrote:
> Hi,
> 
> I am struggling to load and use custom fonts from ttf files in draw2d
> (used since I need rotated text).> 
> To illustrate: https://play.golang.org/p/6-rswetZOr8 give the output:> 
> 2018/09/11 15:52:43 open ../resource/font/luxisr.ttf: no such file or
> directory> 
> It seems as if GraphicsContext.SetFont() does not work? draw2dimg
> tries to load the default font (from fontData) regardless?> 
> Am i misunderstanding how SetFont is supposed to be used?
> 
> Any hints appreciated. 

You can override how the font is loaded. I have some code that does it
somewhere which I can find if you need it.
However, I switched to github.com/fogleman/gg which I found to be a
better designed packaged.
It has a font example:
https://github.com/fogleman/gg/blob/master/examples/gofont.go

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to