Height returns the height of the text when using the given font before any text rotation is applied.
(txt string)
| 108 | // Height returns the height of the text when using |
| 109 | // the given font before any text rotation is applied. |
| 110 | func (s Style) Height(txt string) vg.Length { |
| 111 | _, h := s.box(txt) |
| 112 | return h |
| 113 | } |
| 114 | |
| 115 | // box returns the bounding box of a possibly multi-line text. |
| 116 | func (s Style) box(txt string) (w, h vg.Length) { |