Versions in this module Expand all Collapse all v0 v0.0.2 Jun 26, 2022 v0.0.1 Jun 21, 2022 Changes in this version + const DefaultLanguage + const DefaultScript + const EncodingMacintoshArabic + const EncodingMacintoshArmenian + const EncodingMacintoshBengali + const EncodingMacintoshBurmese + const EncodingMacintoshChineseSimplified + const EncodingMacintoshChineseTraditional + const EncodingMacintoshDevanagari + const EncodingMacintoshGeez + const EncodingMacintoshGeorgian + const EncodingMacintoshGreek + const EncodingMacintoshGujarati + const EncodingMacintoshGurmukhi + const EncodingMacintoshHebrew + const EncodingMacintoshJapanese + const EncodingMacintoshKannada + const EncodingMacintoshKhmer + const EncodingMacintoshKorean + const EncodingMacintoshLaotian + const EncodingMacintoshMalayalam + const EncodingMacintoshMongolian + const EncodingMacintoshOriya + const EncodingMacintoshRSymbol + const EncodingMacintoshRoman + const EncodingMacintoshRussian + const EncodingMacintoshSindhi + const EncodingMacintoshSinhalese + const EncodingMacintoshSlavic + const EncodingMacintoshTamil + const EncodingMacintoshTelugu + const EncodingMacintoshThai + const EncodingMacintoshTibetan + const EncodingMacintoshUninterpreted + const EncodingMacintoshVietnamese + const EncodingUnicode2BMP + const EncodingUnicode2FullRepertoir + const EncodingUnicodeFullRepertoire + const EncodingUnicodeVariationSequences + const EncodingWindowsBig5 + const EncodingWindowsJohab + const EncodingWindowsPRC + const EncodingWindowsShiftJIS + const EncodingWindowsSymbol + const EncodingWindowsUnicodeBMP + const EncodingWindowsUnicodeFullRepertoir + const EncodingWindowsWansung + const MaxCmapSegments + const NameCompatibleFull + const NameCopyrightNotice + const NameDarkBackgroundPalette + const NameDescription + const NameDesigner + const NameDesignerURL + const NameFontFamily + const NameFontSubfamily + const NameFull + const NameLicense + const NameLicenseURL + const NameLightBackgroundPalette + const NameManufacturer + const NamePostScript + const NamePostScriptCID + const NamePreferredFamily + const NamePreferredSubfamily + const NameSampleText + const NameTrademark + const NameUniqueIdentifier + const NameVariationsPostScriptPrefix + const NameVendorURL + const NameVersion + const NameWWSFamily + const NameWWSSubfamily + const PlatformCustom + const PlatformMacintosh + const PlatformUnicode + const PlatformWindows + const UnknownFeature + const UnknownLanguage + const UnknownScript + var ErrExceedsMemory = fmt.Errorf("memory limit exceded") + var ErrInvalidFontData = fmt.Errorf("invalid font data") + var MaxMemory uint32 = 30 * 1024 * 1024 + func Extension(b []byte) string + func FromGoSFNT(font *sfnt.Font) []byte + func MediaType(b []byte) (string, error) + func NewSFNTReader(r io.Reader) (*bytes.Reader, error) + func ParseEOT(b []byte) ([]byte, error) + func ParseWOFF(b []byte) ([]byte, error) + func ParseWOFF2(b []byte) ([]byte, error) + func ToSFNT(b []byte) ([]byte, error) + func Uint16ToFlags(v uint16) (flags [16]bool) + func Uint8ToFlags(v uint8) (flags [8]bool) + type BinaryReader struct + func NewBinaryReader(buf []byte) *BinaryReader + func (r *BinaryReader) EOF() bool + func (r *BinaryReader) Len() uint32 + func (r *BinaryReader) Pos() uint32 + func (r *BinaryReader) ReadByte() byte + func (r *BinaryReader) ReadBytes(n uint32) []byte + func (r *BinaryReader) ReadInt16() int16 + func (r *BinaryReader) ReadInt16LE() int16 + func (r *BinaryReader) ReadInt32() int32 + func (r *BinaryReader) ReadInt64() int64 + func (r *BinaryReader) ReadInt8() int8 + func (r *BinaryReader) ReadString(n uint32) string + func (r *BinaryReader) ReadUint16() uint16 + func (r *BinaryReader) ReadUint16LE() uint16 + func (r *BinaryReader) ReadUint32() uint32 + func (r *BinaryReader) ReadUint32LE() uint32 + func (r *BinaryReader) ReadUint64() uint64 + func (r *BinaryReader) ReadUint8() uint8 + func (r *BinaryReader) Seek(pos uint32) + type BinaryWriter struct + func NewBinaryWriter(buf []byte) *BinaryWriter + func (w *BinaryWriter) Bytes() []byte + func (w *BinaryWriter) Len() uint32 + func (w *BinaryWriter) WriteByte(v byte) + func (w *BinaryWriter) WriteBytes(v []byte) + func (w *BinaryWriter) WriteInt16(v int16) + func (w *BinaryWriter) WriteInt32(v int32) + func (w *BinaryWriter) WriteInt64(v int64) + func (w *BinaryWriter) WriteInt8(v int8) + func (w *BinaryWriter) WriteString(v string) + func (w *BinaryWriter) WriteUint16(v uint16) + func (w *BinaryWriter) WriteUint32(v uint32) + func (w *BinaryWriter) WriteUint64(v uint64) + func (w *BinaryWriter) WriteUint8(v uint8) + type BitmapReader struct + func NewBitmapReader(buf []byte) *BitmapReader + func (r *BitmapReader) EOF() bool + func (r *BitmapReader) Pos() uint32 + func (r *BitmapReader) Read() bool + type EncodingID uint16 + type FeatureTag string + type Hinting int + const NoHinting + type LanguageTag string + type NameID uint16 + type Pather interface + Close func() + CubeTo func(float64, float64, float64, float64, float64, float64) + LineTo func(float64, float64) + MoveTo func(float64, float64) + QuadTo func(float64, float64, float64, float64) + type PlatformID uint16 + type SFNT struct + CFF *cffTable + Cmap *cmapTable + Data []byte + Glyf *glyfTable + Gpos *gposgsubTable + Gsub *gposgsubTable + Head *headTable + Hhea *hheaTable + Hmtx *hmtxTable + IsCFF bool + IsTrueType bool + Jsft *jsftTable + Kern *kernTable + Loca *locaTable + Maxp *maxpTable + Name *nameTable + OS2 *os2Table + Post *postTable + Tables map[string][]byte + Version string + Vhea *vheaTable + Vmtx *vmtxTable + func ParseFont(b []byte, index int) (*SFNT, error) + func ParseSFNT(b []byte, index int) (*SFNT, error) + func (sfnt *SFNT) GlyphAdvance(glyphID uint16) uint16 + func (sfnt *SFNT) GlyphIndex(r rune) uint16 + func (sfnt *SFNT) GlyphName(glyphID uint16) string + func (sfnt *SFNT) GlyphPath(p Pather, glyphID, ppem uint16, x, y int32, scale float64, hinting Hinting) error + func (sfnt *SFNT) GlyphVerticalAdvance(glyphID uint16) uint16 + func (sfnt *SFNT) Kerning(left, right uint16) int16 + func (sfnt *SFNT) NumGlyphs() uint16 + func (sfnt *SFNT) Subset(glyphIDs []uint16) ([]byte, []uint16) + func (sfnt *SFNT) Write() []byte + type ScriptTag string + type ValueRecord struct + XAdvDeviceOffset uint16 + XAdvance int16 + XPlaDeviceOffset uint16 + XPlacement int16 + YAdvDeviceOffset uint16 + YAdvance int16 + YPlaDeviceOffset uint16 + YPlacement int16