using semibold
This commit is contained in:
parent
d4228a171e
commit
07faf97941
2 changed files with 24 additions and 11 deletions
|
|
@ -115,6 +115,9 @@ var sourceCodeProRegularBase64 string
|
||||||
//go:embed encoded/SourceCodePro-Bold.txt
|
//go:embed encoded/SourceCodePro-Bold.txt
|
||||||
var sourceCodeProBoldBase64 string
|
var sourceCodeProBoldBase64 string
|
||||||
|
|
||||||
|
//go:embed encoded/SourceCodePro-Semibold.txt
|
||||||
|
var sourceCodeProSemiboldBase64 string
|
||||||
|
|
||||||
//go:embed encoded/SourceCodePro-Italic.txt
|
//go:embed encoded/SourceCodePro-Italic.txt
|
||||||
var sourceCodeProItalicBase64 string
|
var sourceCodeProItalicBase64 string
|
||||||
|
|
||||||
|
|
@ -156,6 +159,10 @@ func init() {
|
||||||
Family: SourceCodePro,
|
Family: SourceCodePro,
|
||||||
Style: FONT_STYLE_BOLD,
|
Style: FONT_STYLE_BOLD,
|
||||||
}: sourceCodeProBoldBase64,
|
}: sourceCodeProBoldBase64,
|
||||||
|
{
|
||||||
|
Family: SourceCodePro,
|
||||||
|
Style: FONT_STYLE_SEMIBOLD,
|
||||||
|
}: sourceCodeProSemiboldBase64,
|
||||||
{
|
{
|
||||||
Family: SourceCodePro,
|
Family: SourceCodePro,
|
||||||
Style: FONT_STYLE_ITALIC,
|
Style: FONT_STYLE_ITALIC,
|
||||||
|
|
@ -204,6 +211,14 @@ func init() {
|
||||||
Family: SourceCodePro,
|
Family: SourceCodePro,
|
||||||
Style: FONT_STYLE_BOLD,
|
Style: FONT_STYLE_BOLD,
|
||||||
}] = b
|
}] = b
|
||||||
|
b, err = fontFacesFS.ReadFile("ttf/SourceCodePro-Semibold.ttf")
|
||||||
|
if err != nil {
|
||||||
|
panic(err)
|
||||||
|
}
|
||||||
|
FontFaces[Font{
|
||||||
|
Family: SourceCodePro,
|
||||||
|
Style: FONT_STYLE_SEMIBOLD,
|
||||||
|
}] = b
|
||||||
b, err = fontFacesFS.ReadFile("ttf/SourceCodePro-Italic.ttf")
|
b, err = fontFacesFS.ReadFile("ttf/SourceCodePro-Italic.ttf")
|
||||||
if err != nil {
|
if err != nil {
|
||||||
panic(err)
|
panic(err)
|
||||||
|
|
|
||||||
|
|
@ -1434,7 +1434,6 @@ func EmbedFonts(buf *bytes.Buffer, diagramHash, source string, fontFamily *d2fon
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
|
|
||||||
if fontFamily != nil && *fontFamily == d2fonts.SourceSansPro {
|
|
||||||
appendOnTrigger(
|
appendOnTrigger(
|
||||||
buf,
|
buf,
|
||||||
source,
|
source,
|
||||||
|
|
@ -1448,7 +1447,6 @@ func EmbedFonts(buf *bytes.Buffer, diagramHash, source string, fontFamily *d2fon
|
||||||
fontFamily.Font(0, d2fonts.FONT_STYLE_SEMIBOLD).GetEncodedSubset(corpus),
|
fontFamily.Font(0, d2fonts.FONT_STYLE_SEMIBOLD).GetEncodedSubset(corpus),
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
}
|
|
||||||
|
|
||||||
appendOnTrigger(
|
appendOnTrigger(
|
||||||
buf,
|
buf,
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue