Font

package
v0.0.0-...-48b4d52 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 14, 2016 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func LoadFonts

func LoadFonts(path string)

*

  • ReadFonts
  • Read fonts from directory
  • @param {[string]} path string [the directory where fonts are located]

Types

type FontInfo

type FontInfo truetype.Font

func GetFont

func GetFont(font string) *FontInfo

func GetFonts

func GetFonts() []*FontInfo

func (FontInfo) GetImage

func (this FontInfo) GetImage() image.Image

returns image of rendered font

func (FontInfo) GetSectionMap

func (this FontInfo) GetSectionMap() map[rune]image.Rectangle

GetSectionMap Returns section mapping for each letter in ttf in form of image.Rect with y=0

func (FontInfo) Name

func (this FontInfo) Name() string

returns official font name: eg. "Times New Roman Normal""

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL