golang / freetype

The Freetype font rasterizer in the Go programming language.
Other
786 stars 184 forks source link

Add stroke functionality to the glyphs #49

Closed tdewolff closed 1 year ago

tdewolff commented 7 years ago

This adds the ability to set stroke width for font drawing. Drawing a black stroked glyph and then a white normal glyph will give the font a black stroke.

The only problem is that the rasterizer doesn't allow closing paths. If the start and end point are at the same position, the strokes will overlap and appear thicker (alpha channel overlaps). An upcoming PR will solve this.

Secondly, this should be added to github.com/golang/freetype/freetype.go too?