Versions in this module Expand all Collapse all v1 v1.1.0 Mar 31, 2024 Changes in this version + type AvatarBuilder struct + H int + W int + func NewAvatarBuilder(fontFile string, calc FontCenterCalculator) *AvatarBuilder + func (ab *AvatarBuilder) GenerateImage(s string) ([]byte, error) + func (ab *AvatarBuilder) GenerateImageAndSavePNG(s string) (string, error) + func (ab *AvatarBuilder) GenerateImageAndSaveSVG(s string) (string, error) + func (ab *AvatarBuilder) GetFontWidth() int + func (ab *AvatarBuilder) SetAvatarSize(w int, h int) + func (ab *AvatarBuilder) SetBackgroundColor(c color.Color) + func (ab *AvatarBuilder) SetBackgroundColorHex(hex uint32) + func (ab *AvatarBuilder) SetFontSize(size float64) + func (ab *AvatarBuilder) SetFrontgroundColor(c color.Color) + func (ab *AvatarBuilder) SetFrontgroundColorHex(hex uint32) + type FontCenterCalculator interface + CalculateCenterLocation func(string, *AvatarBuilder) (int, int)