package svg
Import Path
github.com/alecthomas/chroma/v2/formatters/svg (on go.dev)
Dependency Relation
imports 8 packages, and imported by 2 packages
Package-Level Type Names (total 3)
func EmbedFont(fontFamily string, font string, format FontFormat) Option
const TRUETYPE
const WOFF
const WOFF2
Formatter that generates SVG.
(*Formatter) Format(w io.Writer, style *chroma.Style, iterator chroma.Iterator) (err error)
*Formatter : github.com/alecthomas/chroma/v2.Formatter
func New(options ...Option) *Formatter
Option sets an option of the SVG formatter.
func EmbedFont(fontFamily string, font string, format FontFormat) Option
func EmbedFontFile(fontFamily string, fileName string) (option Option, err error)
func FontFamily(fontFamily string) Option
func New(options ...Option) *Formatter
Package-Level Functions (total 5)
EmbedFont embeds given base64 encoded font
EmbedFontFile embeds given font file
FontFamily sets the font-family.
New SVG formatter.
StyleEntryToSVG converts a chroma.StyleEntry to SVG attributes.
Package-Level Variables (only one)
Liberation Mono as base64 encoded woff (SIL Open Font License)[https://en.wikipedia.org/wiki/Liberation_fonts]
Package-Level Constants (total 3)
![]() |
The pages are generated with Golds v0.8.2. (GOOS=linux GOARCH=amd64) Golds is a Go 101 project developed by Tapir Liu. PR and bug reports are welcome and can be submitted to the issue list. Please follow @zigo_101 (reachable from the left QR code) to get the latest news of Golds. |