setting up semibold font
This commit is contained in:
parent
4c35a27791
commit
624b2a9a10
1 changed files with 20 additions and 3 deletions
|
|
@ -64,9 +64,10 @@ const (
|
|||
FONT_SIZE_XXL = 28
|
||||
FONT_SIZE_XXXL = 32
|
||||
|
||||
FONT_STYLE_REGULAR FontStyle = "regular"
|
||||
FONT_STYLE_BOLD FontStyle = "bold"
|
||||
FONT_STYLE_ITALIC FontStyle = "italic"
|
||||
FONT_STYLE_REGULAR FontStyle = "regular"
|
||||
FONT_STYLE_BOLD FontStyle = "bold"
|
||||
FONT_STYLE_SEMIBOLD FontStyle = "semibold"
|
||||
FONT_STYLE_ITALIC FontStyle = "italic"
|
||||
|
||||
SourceSansPro FontFamily = "SourceSansPro"
|
||||
SourceCodePro FontFamily = "SourceCodePro"
|
||||
|
|
@ -86,6 +87,7 @@ var FontSizes = []int{
|
|||
var FontStyles = []FontStyle{
|
||||
FONT_STYLE_REGULAR,
|
||||
FONT_STYLE_BOLD,
|
||||
FONT_STYLE_SEMIBOLD,
|
||||
FONT_STYLE_ITALIC,
|
||||
}
|
||||
|
||||
|
|
@ -101,6 +103,9 @@ var sourceSansProRegularBase64 string
|
|||
//go:embed encoded/SourceSansPro-Bold.txt
|
||||
var sourceSansProBoldBase64 string
|
||||
|
||||
//go:embed encoded/SourceSansPro-Semibold.txt
|
||||
var sourceSansProSemiboldBase64 string
|
||||
|
||||
//go:embed encoded/SourceSansPro-Italic.txt
|
||||
var sourceSansProItalicBase64 string
|
||||
|
||||
|
|
@ -135,6 +140,10 @@ func init() {
|
|||
Family: SourceSansPro,
|
||||
Style: FONT_STYLE_BOLD,
|
||||
}: sourceSansProBoldBase64,
|
||||
{
|
||||
Family: SourceSansPro,
|
||||
Style: FONT_STYLE_SEMIBOLD,
|
||||
}: sourceSansProSemiboldBase64,
|
||||
{
|
||||
Family: SourceSansPro,
|
||||
Style: FONT_STYLE_ITALIC,
|
||||
|
|
@ -211,6 +220,14 @@ func init() {
|
|||
Family: SourceSansPro,
|
||||
Style: FONT_STYLE_BOLD,
|
||||
}] = b
|
||||
b, err = fontFacesFS.ReadFile("ttf/SourceSansPro-Semibold.ttf")
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
FontFaces[Font{
|
||||
Family: SourceSansPro,
|
||||
Style: FONT_STYLE_SEMIBOLD,
|
||||
}] = b
|
||||
b, err = fontFacesFS.ReadFile("ttf/SourceSansPro-Italic.ttf")
|
||||
if err != nil {
|
||||
panic(err)
|
||||
|
|
|
|||
Loading…
Reference in a new issue