Documentation
¶
Overview ¶
Package liberation holds TTF data of the Liberation fonts.
Example ¶
package main
import (
"fmt"
"log"
"codeberg.org/go-fonts/liberation/liberationserifregular"
"golang.org/x/image/font/sfnt"
)
func main() {
ttf, err := sfnt.Parse(liberationserifregular.TTF)
if err != nil {
log.Fatalf("could not parse Liberation Serif font: %+v", err)
}
var buf sfnt.Buffer
v, err := ttf.Name(&buf, sfnt.NameIDVersion)
if err != nil {
log.Fatalf("could not retrieve font version: %+v", err)
}
fmt.Printf("version: %s\n", v)
fmt.Printf("num glyphs: %d\n", ttf.NumGlyphs())
}
Output: version: Version 2.1.4 num glyphs: 2601
Directories
¶
| Path | Synopsis |
|---|---|
|
Package liberationmonobold provides the "LiberationMono Bold" TrueType font from the Liberation font family.
|
Package liberationmonobold provides the "LiberationMono Bold" TrueType font from the Liberation font family. |
|
Package liberationmonobolditalic provides the "LiberationMono BoldItalic" TrueType font from the Liberation font family.
|
Package liberationmonobolditalic provides the "LiberationMono BoldItalic" TrueType font from the Liberation font family. |
|
Package liberationmonoitalic provides the "LiberationMono Italic" TrueType font from the Liberation font family.
|
Package liberationmonoitalic provides the "LiberationMono Italic" TrueType font from the Liberation font family. |
|
Package liberationmonoregular provides the "LiberationMono Regular" TrueType font from the Liberation font family.
|
Package liberationmonoregular provides the "LiberationMono Regular" TrueType font from the Liberation font family. |
|
Package liberationsansbold provides the "LiberationSans Bold" TrueType font from the Liberation font family.
|
Package liberationsansbold provides the "LiberationSans Bold" TrueType font from the Liberation font family. |
|
Package liberationsansbolditalic provides the "LiberationSans BoldItalic" TrueType font from the Liberation font family.
|
Package liberationsansbolditalic provides the "LiberationSans BoldItalic" TrueType font from the Liberation font family. |
|
Package liberationsansitalic provides the "LiberationSans Italic" TrueType font from the Liberation font family.
|
Package liberationsansitalic provides the "LiberationSans Italic" TrueType font from the Liberation font family. |
|
Package liberationsansregular provides the "LiberationSans Regular" TrueType font from the Liberation font family.
|
Package liberationsansregular provides the "LiberationSans Regular" TrueType font from the Liberation font family. |
|
Package liberationserifbold provides the "LiberationSerif Bold" TrueType font from the Liberation font family.
|
Package liberationserifbold provides the "LiberationSerif Bold" TrueType font from the Liberation font family. |
|
Package liberationserifbolditalic provides the "LiberationSerif BoldItalic" TrueType font from the Liberation font family.
|
Package liberationserifbolditalic provides the "LiberationSerif BoldItalic" TrueType font from the Liberation font family. |
|
Package liberationserifitalic provides the "LiberationSerif Italic" TrueType font from the Liberation font family.
|
Package liberationserifitalic provides the "LiberationSerif Italic" TrueType font from the Liberation font family. |
|
Package liberationserifregular provides the "LiberationSerif Regular" TrueType font from the Liberation font family.
|
Package liberationserifregular provides the "LiberationSerif Regular" TrueType font from the Liberation font family. |
Click to show internal directories.
Click to hide internal directories.