core

package
v0.0.0-...-14f9c33 Latest Latest
Warning

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

Go to latest
Published: Jan 16, 2015 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ERROR_FONT_LICENSE_DOES_NOT_ALLOW_EMBEDDING = errors.New("Font license does not allow embedding")
View Source
var ERROR_INCORRECT_MAGIC_NUMBER = errors.New("Incorrect magic number")
View Source
var ERROR_NO_GET_WRONG_TYPE = errors.New("get wrong type")
View Source
var ERROR_NO_KEY_FOUND = errors.New("no key found")
View Source
var ERROR_NO_UNICODE_ENCODING_FOUND = errors.New("No Unicode encoding found")
View Source
var ERROR_POSTSCRIPT_NAME_NOT_FOUND = errors.New("PostScript name not found")
View Source
var ERROR_UNEXPECTED_SUBTABLE_FORMAT = errors.New("Unexpected subtable format")

Functions

This section is empty.

Types

type FontMaker

type FontMaker struct {
	// contains filtered or unexported fields
}

func NewFontMaker

func NewFontMaker() *FontMaker

func (*FontMaker) FileSize

func (me *FontMaker) FileSize(path string) (int64, error)

func (*FontMaker) GetInfoFromTrueType

func (me *FontMaker) GetInfoFromTrueType(fontpath string, fontmaps []FontMap) (TtfInfo, error)

func (*FontMaker) GetResults

func (me *FontMaker) GetResults() []string

func (*FontMaker) GoStructName

func (me *FontMaker) GoStructName(name string) string

func (*FontMaker) LoadMap

func (me *FontMaker) LoadMap(encodingpath string) ([]FontMap, error)

func (*FontMaker) MakeDefinitionFile

func (me *FontMaker) MakeDefinitionFile(gofontname string, mappath string, exportfile string, encode string, fontmaps []FontMap, info TtfInfo) (string, error)

func (*FontMaker) MakeFont

func (me *FontMaker) MakeFont(fontpath string, mappath string, encode string, outfolderpath string) error

func (*FontMaker) MakeFontDescriptor

func (me *FontMaker) MakeFontDescriptor(info TtfInfo) (string, error)

func (*FontMaker) MakeFontEncoding

func (me *FontMaker) MakeFontEncoding(mappath string, fontmaps []FontMap) (string, error)

func (*FontMaker) MakeWidthArray

func (me *FontMaker) MakeWidthArray(widths map[int]int64) (string, error)

func (*FontMaker) MultiplyAndRound

func (me *FontMaker) MultiplyAndRound(k float64, v int64) int64

func (*FontMaker) MultiplyAndRoundWithUInt64

func (me *FontMaker) MultiplyAndRoundWithUInt64(k float64, v uint64) int64

func (*FontMaker) Round

func (me *FontMaker) Round(value float64) int64

type FontMap

type FontMap struct {
	Uv   int
	Name string
}

type TTFParser

type TTFParser struct {
	Embeddable bool
	Bold       bool
	// contains filtered or unexported fields
}

func (*TTFParser) ArrayPadUint

func (me *TTFParser) ArrayPadUint(arr []uint64, size uint64, val uint64) ([]uint64, error)

func (*TTFParser) BytesToString

func (me *TTFParser) BytesToString(b []byte) string

func (*TTFParser) CompareBytes

func (me *TTFParser) CompareBytes(a []byte, b []byte) bool

func (*TTFParser) FTell

func (me *TTFParser) FTell(fd *os.File) (uint64, error)

func (*TTFParser) Parse

func (me *TTFParser) Parse(fontpath string) error

func (*TTFParser) ParseCmap

func (me *TTFParser) ParseCmap(fd *os.File) error

func (*TTFParser) ParseHead

func (me *TTFParser) ParseHead(fd *os.File) error

func (*TTFParser) ParseHhea

func (me *TTFParser) ParseHhea(fd *os.File) error

func (*TTFParser) ParseHmtx

func (me *TTFParser) ParseHmtx(fd *os.File) error

func (*TTFParser) ParseMaxp

func (me *TTFParser) ParseMaxp(fd *os.File) error

func (*TTFParser) ParseName

func (me *TTFParser) ParseName(fd *os.File) error

func (*TTFParser) ParseOS2

func (me *TTFParser) ParseOS2(fd *os.File) error

func (*TTFParser) ParsePost

func (me *TTFParser) ParsePost(fd *os.File) error

func (*TTFParser) PregReplace

func (me *TTFParser) PregReplace(pattern string, replacement string, subject string) (string, error)

func (*TTFParser) Read

func (me *TTFParser) Read(fd *os.File, length int) ([]byte, error)

func (*TTFParser) ReadShort

func (me *TTFParser) ReadShort(fd *os.File) (int64, error)

func (*TTFParser) ReadULong

func (me *TTFParser) ReadULong(fd *os.File) (uint64, error)

func (*TTFParser) ReadUShort

func (me *TTFParser) ReadUShort(fd *os.File) (uint64, error)

func (*TTFParser) Seek

func (me *TTFParser) Seek(fd *os.File, tag string) error

func (*TTFParser) Skip

func (me *TTFParser) Skip(fd *os.File, length int64) error

type TtfInfo

type TtfInfo map[string]interface{}

func NewTtfInfo

func NewTtfInfo() TtfInfo

func (TtfInfo) GetBool

func (me TtfInfo) GetBool(key string) (bool, error)

func (TtfInfo) GetInt64

func (me TtfInfo) GetInt64(key string) (int64, error)

func (TtfInfo) GetInt64s

func (me TtfInfo) GetInt64s(key string) ([]int64, error)

func (TtfInfo) GetMapIntInt64

func (me TtfInfo) GetMapIntInt64(key string) (map[int]int64, error)

func (TtfInfo) GetString

func (me TtfInfo) GetString(key string) (string, error)

func (TtfInfo) PushBool

func (me TtfInfo) PushBool(key string, val bool)

func (TtfInfo) PushBytes

func (me TtfInfo) PushBytes(key string, val []byte)

func (TtfInfo) PushInt64

func (me TtfInfo) PushInt64(key string, val int64)

func (TtfInfo) PushInt64s

func (me TtfInfo) PushInt64s(key string, val []int64)

func (TtfInfo) PushMapIntInt64

func (me TtfInfo) PushMapIntInt64(key string, val map[int]int64)

func (TtfInfo) PushString

func (me TtfInfo) PushString(key string, val string)

func (TtfInfo) PushUInt64

func (me TtfInfo) PushUInt64(key string, val uint64)

Jump to

Keyboard shortcuts

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