From 39cc07475776827b8412b7b6137d6bca7a4afabf Mon Sep 17 00:00:00 2001 From: Alexander Wang Date: Thu, 22 Dec 2022 00:45:32 -0800 Subject: [PATCH] cleanup --- lib/textmeasure/markdown.go | 5 ----- 1 file changed, 5 deletions(-) diff --git a/lib/textmeasure/markdown.go b/lib/textmeasure/markdown.go index bb2edd8a3..bf12dc7ab 100644 --- a/lib/textmeasure/markdown.go +++ b/lib/textmeasure/markdown.go @@ -251,23 +251,18 @@ func (ruler *Ruler) measureNode(depth int, n *html.Node, fontFamily *d2fonts.Fon case "h1", "h2", "h3", "h4", "h5", "h6": fontSize = HeaderToFontSize[n.Data] fontStyle = d2fonts.FONT_STYLE_BOLD - font = fontFamily.Font(HeaderToFontSize[n.Data], fontStyle) originalLineHeight := ruler.LineHeightFactor ruler.LineHeightFactor = LineHeight_h defer func() { ruler.LineHeightFactor = originalLineHeight }() case "em": - font.Style = d2fonts.FONT_STYLE_ITALIC fontStyle = d2fonts.FONT_STYLE_ITALIC case "b", "strong": - font.Style = d2fonts.FONT_STYLE_BOLD fontStyle = d2fonts.FONT_STYLE_BOLD case "pre", "code": fontFamily = go2.Pointer(d2fonts.SourceCodePro) fontStyle = d2fonts.FONT_STYLE_REGULAR - font.Family = d2fonts.SourceCodePro - font.Style = d2fonts.FONT_STYLE_REGULAR isCode = true }