Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type FontFunc ¶
FontFunc returns a new font face of the given point size.
Points are 1/72 of an inch. https://en.wikipedia.org/wiki/Point_(typography)
type Option ¶
type Option option
func WithFontOpenType ¶
func WithFontOpenType(f *opentype.Font, opts *opentype.FaceOptions) Option
WithFontOpenType is a convenience helper for WithFont that uses an OpenType font.
Unlike opentype.NewFace, a FaceOptions value must be provided. FaceOptions.Size is overwritten by this function.
func WithImageFunc ¶
WithImageFunc sets the function used to create an image of the desired size.
By default, image.NewGray is used.
func WithMaxHeight ¶
WithMaxHeight sets maximum height for rendered text, in pixels.
This option is mandatory.
Click to show internal directories.
Click to hide internal directories.