// Register will register a font to the document for later usage. func (f FontType) Register(doc documents.Document) { if f.Color != "" { doc.SetTextColor(utils.HexToRGB(f.Color)) } if f.Type != "" && f.Size != 0 { doc.SetFont(f.Type, f.Weight, f.Size) } }