fix wrong git ignore

This commit is contained in:
Adrian Zürcher
2025-12-15 17:44:00 +01:00
parent ed9f31bb96
commit 8f313c00f0
126 changed files with 70589 additions and 1 deletions

View File

@@ -0,0 +1,38 @@
package creator
import (
"gitea.tecamino.com/paadi/pdfmerge/internal/pdf/model/fonts"
"gitea.tecamino.com/paadi/pdfmerge/internal/pdf/model/textencoding"
)
// TextStyle is a collection of properties that can be assigned to a chunk of text.
type TextStyle struct {
// The color of the text.
Color Color
// The font the text will use.
Font fonts.Font
// The size of the font.
FontSize float64
}
// NewTextStyle creates a new text style object which can be used with chunks
// of text. Uses default parameters: Helvetica, WinAnsiEncoding and wrap
// enabled with a wrap width of 100 points.
func NewTextStyle() TextStyle {
font := fonts.NewFontHelvetica()
font.SetEncoder(textencoding.NewWinAnsiTextEncoder())
return TextStyle{
Color: ColorRGBFrom8bit(0, 0, 0),
Font: font,
FontSize: 10,
}
}
// TextChunk represents a chunk of text along with a particular style.
type TextChunk struct {
Text string
Style TextStyle
}