From e11d4f4e69fd5b1715a758c4952cf30ee5a403d4 Mon Sep 17 00:00:00 2001 From: Alexander Wang Date: Thu, 16 Mar 2023 10:35:38 -0700 Subject: [PATCH] apply theme to measured too --- d2graph/d2graph.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/d2graph/d2graph.go b/d2graph/d2graph.go index 03c438a58..b005ae407 100644 --- a/d2graph/d2graph.go +++ b/d2graph/d2graph.go @@ -505,8 +505,11 @@ func (obj *Object) Text() *d2target.MText { } fontSize := d2fonts.FONT_SIZE_M + labelVal := obj.Attributes.Label.Value if obj.Class != nil || obj.SQLTable != nil { fontSize = d2fonts.FONT_SIZE_L + } else if obj.Graph.Theme != nil && obj.Graph.Theme.SpecialRules.CapsLock { + labelVal = strings.ToUpper(labelVal) } if obj.OuterSequenceDiagram() == nil { @@ -527,7 +530,7 @@ func (obj *Object) Text() *d2target.MText { isBold = false } return &d2target.MText{ - Text: obj.Attributes.Label.Value, + Text: labelVal, FontSize: fontSize, IsBold: isBold, IsItalic: isItalic,