Create another For iterator that leaves out the fake null rune
Apparently it was intended behavior. Closes #4
This commit is contained in:
@@ -13,20 +13,20 @@ type Drawer struct { TypeSetter }
|
||||
// Draw draws the drawer's text onto the specified canvas at the given offset.
|
||||
func (drawer Drawer) Draw (
|
||||
destination draw.Image,
|
||||
color color.Color,
|
||||
col color.Color,
|
||||
offset image.Point,
|
||||
) (
|
||||
updatedRegion image.Rectangle,
|
||||
) {
|
||||
source := image.NewUniform(color)
|
||||
source := image.NewUniform(col)
|
||||
|
||||
drawer.For (func (
|
||||
drawer.ForRunes (func (
|
||||
index int,
|
||||
char rune,
|
||||
position fixed.Point26_6,
|
||||
) bool {
|
||||
// leave empty space for space characters
|
||||
if unicode.IsSpace(char){
|
||||
if unicode.IsSpace(char) {
|
||||
return true
|
||||
}
|
||||
|
||||
@@ -37,7 +37,7 @@ func (drawer Drawer) Draw (
|
||||
mask, maskPoint, _, ok := drawer.face.Glyph(dot, char)
|
||||
// tofu
|
||||
if !ok {
|
||||
drawer.drawTofu(char, destination, color, dot)
|
||||
drawer.drawTofu(char, destination, col, dot)
|
||||
return true
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user