Versions in this module Expand all Collapse all v0 v0.0.13 Apr 19, 2024 Changes in this version type Font + func (f *Font) SVGPath(gi *GlyphInfo) (string, error) type Polygon + func (p *Polygon) Move(dx, dy float64) type Render + func (r *Render) GetPolygonsForGlyph(index int) ([]*Polygon, error) + func (r *Render) MoveGlyph(index int, dx, dy float64) error + func (t *Render) SaveSVG(fontName, filename string, scale float64) error v0.0.12 Jan 21, 2023 v0.0.11 Jan 21, 2023 Changes in this version type Render + func (r *Render) ToContext(width, height int) *gg.Context + func (r *Render) ToImage(width, height int) image.Image v0.0.10 Aug 4, 2022 Changes in this version type MBB + func GetRenderMBB(inWidth, inHeight int, renders ...*Render) (mbb MBB, scale float64, width, height int, err error) v0.0.9 Jul 4, 2022 v0.0.8 Mar 7, 2021 v0.0.7 May 25, 2019 Changes in this version + const MaxSteps + const XCenter + const XLeft + const XRight + const YBottom + const YCenter + const YTop + var BottomCenter = TextOpts + var BottomLeft = TextOpts + var BottomRight = TextOpts + var Center = TextOpts + var CenterLeft = TextOpts + var CenterRight = TextOpts + var Fonts = map[string]*Font + var TopCenter = TextOpts + var TopLeft = TextOpts + var TopRight = TextOpts + func FillBox(mbb MBB, xScale, yScale float64, message, fontName string, opts *TextOpts) (x, y, pts float64, err error) + func InitFromFontData(font *Font, fontData string) + func SavePNG(filename string, width, height int, renders ...*Render) error + type Font struct + Ascent float64 + Descent float64 + Glyphs map[rune]*Glyph + HorizAdvX float64 + ID string + MissingHorizAdvX float64 + UnitsPerEm float64 + type Glyph struct + GerberLP string + HorizAdvX float64 + MBB MBB + PathSteps []*PathStep + Unicode rune + func (g *Glyph) Render(x, y, xScale, yScale float64) (float64, *Render) + type GlyphInfo struct + Glyph rune + MBB MBB + N int + Width float64 + X float64 + Y float64 + type MBB = vec2.Rect + func TextMBB(xPos, yPos, xScale, yScale float64, message, fontName string) (*MBB, error) + type PathStep struct + C byte + P []float64 + type Polygon struct + Dark bool + MBB MBB + Pts []Pt + RuneIndex int + func (p *Polygon) Area() float64 + type Pt = vec2.T + type Render struct + Background color.Color + Foreground color.Color + Info []*GlyphInfo + MBB MBB + Polygons []*Polygon + func Merge(renders ...*Render) *Render + func Text(xPos, yPos, xScale, yScale float64, message, fontName string, opts *TextOpts) (*Render, error) + func (r *Render) RenderToDC(dc *gg.Context, dx, dy, scale float64, height int) + func (r *Render) SaveDXF(filename string, scale float64) error + func (r *Render) SavePNG(filename string, width, height int) error + type TextOpts struct + Rotate float64 + XAlign float64 + YAlign float64