Closed rekby closed 5 years ago
When I split line with newline symbol: It doesn't add in height, but increase width.
func test() { font := LoadFont() fontFace := truetype.NewFace(font, &truetype.Options{ Size: 20, }) ggContext := gg.NewContext(1000, 1000) ggContext.SetFontFace(fontFace) text1 := "asd asd" text2 := "asd\nasd" w1, h1 := ggContext.MeasureString(text1) w2, h2 := ggContext.MeasureString(text2) fmt.Printf("W1: %v, H1: %v\n", w1, h1) fmt.Printf("W2: %v, H2: %v\n", w2, h2) }
I have output:
W1: 50, H1: 20 W2: 58, H2: 20
Fixed in #52
When I split line with newline symbol: It doesn't add in height, but increase width.
I have output: