logo

package
v0.6.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 11, 2026 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	InputPath  string  // Path to the input logo SVG
	OutputPath string  // Path for the output combined SVG
	Text       string  // Text to display (e.g., "grove flow")
	TextColor  string  // Color for the text (e.g., "#589ac7")
	FontPath   string  // Path to font file (TTF/OTF) - required for path conversion
	FontSize   float64 // Font size in pixels (defaults to 48)
	Spacing    float64 // Spacing between logo and text (defaults to 20)
	TextScale  float64 // Text width as proportion of logo width (defaults to 0.8)
	Width      float64 // Output SVG width in pixels (defaults to 200)
}

Config holds the configuration for logo generation.

func DefaultConfig

func DefaultConfig() Config

DefaultConfig returns a Config with sensible defaults. Note: TextColor defaults to empty string to trigger auto-detection from source SVG.

type Generator

type Generator struct {
	// contains filtered or unexported fields
}

Generator handles the creation of combined logo+text SVGs.

func New

func New(logger *logrus.Logger) *Generator

New creates a new Generator instance.

func (*Generator) Generate

func (g *Generator) Generate(cfg Config) error

Generate creates a combined logo+text SVG with text converted to paths.

type SVGDimensions

type SVGDimensions struct {
	Width   float64
	Height  float64
	ViewBox string
	Content string // The inner content of the SVG (everything inside <svg>...</svg>)
}

SVGDimensions holds the parsed dimensions of an SVG.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL