consider bold edge labels

This commit is contained in:
Gavin Nishizawa 2023-03-29 16:36:30 -07:00
parent 74f1efdd47
commit 4e2821de52
No known key found for this signature in database
GPG key ID: AE3B177777CE55CD

View file

@ -1032,10 +1032,14 @@ func (e *Edge) Text() *d2target.MText {
if e.Attributes.Style.FontSize != nil {
fontSize, _ = strconv.Atoi(e.Attributes.Style.FontSize.Value)
}
isBold := false
if e.Attributes.Style.Bold != nil {
isBold, _ = strconv.ParseBool(e.Attributes.Style.Bold.Value)
}
return &d2target.MText{
Text: e.Attributes.Label.Value,
FontSize: fontSize,
IsBold: false,
IsBold: isBold,
IsItalic: true,
Dimensions: e.LabelDimensions,