golang-image/font
Nigel Tao 22f1b5f81b font/plan9font: optimize the conversion to image.Alpha.
Also remove the dependency on the image/draw package. That package will
give the right answer for arbitrary source images, including those of
type plan9Image, but doing the conversion directly avoids bouncing uint8
or color.Alpha values through the general-purpose draw.Image,
image.Image and color.Color interfaces.

It is possible to optimize this even further, but this will do for now.

benchmark                   old ns/op     new ns/op     delta
BenchmarkParseSubfont-8     2298492       492443        -78.58%

Change-Id: Iea9436bffa097a1ba0052dbabf21516bce8b61e0
Reviewed-on: https://go-review.googlesource.com/21693
Reviewed-by: Nigel Tao <nigeltao@golang.org>
2016-04-10 01:11:56 +00:00
..
basicfont font: add Metrics.Descent. 2016-03-23 23:23:04 +00:00
plan9font font/plan9font: optimize the conversion to image.Alpha. 2016-04-10 01:11:56 +00:00
testdata/fixed shiny/font/plan9font: add an example test. 2015-09-01 04:36:16 +00:00
font.go image/font: make a zero Weight mean a normal weight. 2016-04-02 04:27:04 +00:00