base64Captcha icon indicating copy to clipboard operation
base64Captcha copied to clipboard

Loading custom fonts

Open PaulSonOfLars opened this issue 4 years ago • 3 comments

I'm interested in the loading of custom fonts for my project. I understand that the current fonts seem to be loaded in using code generated by bindata (not very familiar with the project), but do not see any examples of how to load my own fonts.

Is this supported? and if so, is there any sample code available? Thanks in advance!

PaulSonOfLars avatar Jun 21 '20 19:06 PaulSonOfLars

  • install package go get -u github.com/jteeuwen/go-bindata/...
  • change package name sed -i "s/package main/package base64Captcha/g"

mojocn avatar Jun 23 '20 07:06 mojocn

Which package do I run the sed on? My package, or the package I just downloaded?

And then what, I'm assuming there are other things to do after this? Do I then have to run the bindata script to compress my fonts into the binary?

This isn't particularly user friendly, would be a lot nicer if there was a way to just load from directory - having to use bindata shouldn't be a required step.

PaulSonOfLars avatar Jun 23 '20 08:06 PaulSonOfLars

Could I ask why this has been closed?

PaulSonOfLars avatar Jul 22 '20 09:07 PaulSonOfLars