Documentation
¶
Overview ¶
Package ttf provides a truetype font Backend
Index ¶
- type Backend
- func (be *Backend) Kern(ft1 font.Font, sym1 string, ft2 font.Font, sym2 string, dpi float64) float64
- func (be *Backend) Metrics(symbol string, fnt font.Font, dpi float64, math bool) font.Metrics
- func (be *Backend) RenderGlyph(x, y float64, font font.Font, symbol string, dpi float64)
- func (be *Backend) RenderRectFilled(x1, y1, x2, y2 float64)
- func (*Backend) UnderlineThickness(font font.Font, dpi float64) float64
- func (be *Backend) XHeight(fnt font.Font, dpi float64) float64
- type Fonts
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Backend ¶
type Backend struct {
// contains filtered or unexported fields
}
func (*Backend) Kern ¶
func (be *Backend) Kern(ft1 font.Font, sym1 string, ft2 font.Font, sym2 string, dpi float64) float64
Kern returns the kerning distance between two symbols.
func (*Backend) RenderGlyph ¶
RenderGlyphs renders the glyph g at the reference point (x,y).
func (*Backend) RenderRectFilled ¶
RenderRectFilled draws a filled black rectangle from (x1,y1) to (x2,y2).
func (*Backend) UnderlineThickness ¶
UnderlineThickness returns the line thickness that matches the given font. It is used as a base unit for drawing lines such as in a fraction or radical.
Click to show internal directories.
Click to hide internal directories.