bdf: make it possible to set the drawing colour
Intended for red and black tapes.
This commit is contained in:
@@ -3,6 +3,7 @@ package main
|
||||
import (
|
||||
"html/template"
|
||||
"image"
|
||||
"image/color"
|
||||
"image/draw"
|
||||
"image/png"
|
||||
"log"
|
||||
@@ -82,7 +83,7 @@ func main() {
|
||||
|
||||
img := image.NewRGBA(super)
|
||||
draw.Draw(img, super, image.White, image.ZP, draw.Src)
|
||||
font.DrawString(img, image.ZP, font.Name)
|
||||
font.DrawString(img, image.ZP, color.Black, font.Name)
|
||||
|
||||
fonts[filename] = fontItem{Font: font, Preview: img}
|
||||
}
|
||||
|
||||
@@ -2,6 +2,7 @@ package main
|
||||
|
||||
import (
|
||||
"image"
|
||||
"image/color"
|
||||
"image/draw"
|
||||
"image/png"
|
||||
"log"
|
||||
@@ -26,7 +27,7 @@ func main() {
|
||||
|
||||
img := image.NewRGBA(super)
|
||||
draw.Draw(img, super, image.White, image.ZP, draw.Src)
|
||||
font.DrawString(img, image.ZP, font.Name)
|
||||
font.DrawString(img, image.ZP, color.Black, font.Name)
|
||||
|
||||
fo, err := os.Create("out.png")
|
||||
if err != nil {
|
||||
|
||||
@@ -4,6 +4,7 @@ import (
|
||||
"errors"
|
||||
"html/template"
|
||||
"image"
|
||||
"image/color"
|
||||
"image/draw"
|
||||
"image/png"
|
||||
"log"
|
||||
@@ -260,7 +261,7 @@ func main() {
|
||||
|
||||
img := image.NewRGBA(super)
|
||||
draw.Draw(img, super, image.White, image.ZP, draw.Src)
|
||||
font.DrawString(img, image.ZP, font.Name)
|
||||
font.DrawString(img, image.ZP, color.Black, font.Name)
|
||||
|
||||
fonts = append(fonts, &fontItem{Path: path, Font: font, Preview: img})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user