This repository has been archived on 2023-08-08. You can view files and clone it, but cannot push or open issues or pull requests.
tomo-old/defaultfont/defaultfont.go

48 lines
894 B
Go
Raw Normal View History

2023-01-08 23:03:19 -07:00
package defaultfont
import "golang.org/x/image/font/basicfont"
var FaceRegular = basicfont.Face7x13
// FIXME: make bold, italic, and bold italic masks by processing the Face7x13
// mask.
var FaceBold = &basicfont.Face {
Advance: 7,
Width: 6,
Height: 13,
Ascent: 11,
Descent: 2,
Mask: FaceRegular.Mask, // TODO
Ranges: []basicfont.Range {
{ '\u0020', '\u007f', 0 },
{ '\ufffd', '\ufffe', 95 },
},
}
var FaceItalic = &basicfont.Face {
Advance: 7,
Width: 6,
Height: 13,
Ascent: 11,
Descent: 2,
Mask: FaceRegular.Mask, // TODO
Ranges: []basicfont.Range {
{ '\u0020', '\u007f', 0 },
{ '\ufffd', '\ufffe', 95 },
},
}
var FaceBoldItalic = &basicfont.Face {
Advance: 7,
Width: 6,
Height: 13,
Ascent: 11,
Descent: 2,
Mask: FaceRegular.Mask, // TODO
Ranges: []basicfont.Range {
{ '\u0020', '\u007f', 0 },
{ '\ufffd', '\ufffe', 95 },
},
}