plot
plot copied to clipboard
plot/vg: consider using golang.org/x/image/font/sfnt for parsing fonts
right now, we are using "github.com/golang/freetype"
and "github.com/golang/freetype/truetype"
.
They work fine, but the license is a dual one (BSD-like or GPL2+) : https://github.com/golang/freetype/blob/master/LICENSE
We should perhaps consider use instead the new: https://godoc.org/golang.org/x/image/font/sfnt
(which is released under the same license than Go itself (BSD-3))
for this to happen, though, the following methods will need to be implemented for sfnt.Font
:
https://go-review.googlesource.com/c/37410/ added sfnt.Font.Kern
.
https://go-review.googlesource.com/39670 added sfnt.Font.Bounds
.
https://go-review.googlesource.com/#/c/67330/ is adding metrics to font.
freetype/truetype.Font.Index
is spelled sfnt.GlyphIndex
.
this has been done at some point.