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/default/font/defaultfont.go

49 lines
964 B
Go
Raw Normal View History

2023-03-31 11:50:26 -06:00
// Package font provides a default font. Its data is entirely self contained.
2023-03-31 11:45:52 -06:00
package font
2023-01-08 23:03:19 -07:00
import "golang.org/x/image/font/basicfont"
var FaceRegular = basicfont.Face7x13
2023-03-31 11:45:52 -06:00
// TODO: make bold, italic, and bold italic masks by processing the Face7x13
2023-01-08 23:03:19 -07:00
// 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 },
},
}