aboutsummaryrefslogtreecommitdiff
path: root/bdf/bdf.go
diff options
context:
space:
mode:
Diffstat (limited to 'bdf/bdf.go')
-rw-r--r--bdf/bdf.go6
1 files changed, 4 insertions, 2 deletions
diff --git a/bdf/bdf.go b/bdf/bdf.go
index 5ff8f30..2d94b6c 100644
--- a/bdf/bdf.go
+++ b/bdf/bdf.go
@@ -66,11 +66,13 @@ func (f *Font) FindGlyph(r rune) (glyph, bool) {
// DrawString draws the specified text string onto dst horizontally along
// the baseline starting at dp, using black color.
-func (f *Font) DrawString(dst draw.Image, dp image.Point, s string) {
+func (f *Font) DrawString(dst draw.Image, dp image.Point,
+ color color.Color, s string) {
+ src := image.NewUniform(color)
for _, r := range s {
g, _ := f.FindGlyph(r)
draw.DrawMask(dst, g.bounds.Add(dp),
- image.Black, image.ZP, &g, g.bounds.Min, draw.Over)
+ src, image.ZP, &g, g.bounds.Min, draw.Over)
dp.X += g.advance
}
}