cleanup
This commit is contained in:
parent
1e0d6c294c
commit
39cc074757
1 changed files with 0 additions and 5 deletions
|
|
@ -251,23 +251,18 @@ func (ruler *Ruler) measureNode(depth int, n *html.Node, fontFamily *d2fonts.Fon
|
||||||
case "h1", "h2", "h3", "h4", "h5", "h6":
|
case "h1", "h2", "h3", "h4", "h5", "h6":
|
||||||
fontSize = HeaderToFontSize[n.Data]
|
fontSize = HeaderToFontSize[n.Data]
|
||||||
fontStyle = d2fonts.FONT_STYLE_BOLD
|
fontStyle = d2fonts.FONT_STYLE_BOLD
|
||||||
font = fontFamily.Font(HeaderToFontSize[n.Data], fontStyle)
|
|
||||||
originalLineHeight := ruler.LineHeightFactor
|
originalLineHeight := ruler.LineHeightFactor
|
||||||
ruler.LineHeightFactor = LineHeight_h
|
ruler.LineHeightFactor = LineHeight_h
|
||||||
defer func() {
|
defer func() {
|
||||||
ruler.LineHeightFactor = originalLineHeight
|
ruler.LineHeightFactor = originalLineHeight
|
||||||
}()
|
}()
|
||||||
case "em":
|
case "em":
|
||||||
font.Style = d2fonts.FONT_STYLE_ITALIC
|
|
||||||
fontStyle = d2fonts.FONT_STYLE_ITALIC
|
fontStyle = d2fonts.FONT_STYLE_ITALIC
|
||||||
case "b", "strong":
|
case "b", "strong":
|
||||||
font.Style = d2fonts.FONT_STYLE_BOLD
|
|
||||||
fontStyle = d2fonts.FONT_STYLE_BOLD
|
fontStyle = d2fonts.FONT_STYLE_BOLD
|
||||||
case "pre", "code":
|
case "pre", "code":
|
||||||
fontFamily = go2.Pointer(d2fonts.SourceCodePro)
|
fontFamily = go2.Pointer(d2fonts.SourceCodePro)
|
||||||
fontStyle = d2fonts.FONT_STYLE_REGULAR
|
fontStyle = d2fonts.FONT_STYLE_REGULAR
|
||||||
font.Family = d2fonts.SourceCodePro
|
|
||||||
font.Style = d2fonts.FONT_STYLE_REGULAR
|
|
||||||
isCode = true
|
isCode = true
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue