From 4e2821de52a5e9e7f7aa570f43ef7735de3e54c4 Mon Sep 17 00:00:00 2001 From: Gavin Nishizawa Date: Wed, 29 Mar 2023 16:36:30 -0700 Subject: [PATCH] consider bold edge labels --- d2graph/d2graph.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/d2graph/d2graph.go b/d2graph/d2graph.go index 54c658a21..34bc96d42 100644 --- a/d2graph/d2graph.go +++ b/d2graph/d2graph.go @@ -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,