generated from bing/readnotes
111 lines
2.6 KiB
Go
111 lines
2.6 KiB
Go
|
package font
|
||
|
|
||
|
const (
|
||
|
PlatformIDUnicode = iota
|
||
|
PlatformIDMacintosh
|
||
|
PlatformIDReserved
|
||
|
PlatformIDMicrosoft
|
||
|
)
|
||
|
|
||
|
const (
|
||
|
UnicodePlatformSpecificIDVer1dot0 = iota
|
||
|
UnicodePlatformSpecificIDVer1dot1
|
||
|
UnicodePlatformSpecificIDISO10646
|
||
|
UnicodePlatformSpecificIDUnicode2OnlyBMP
|
||
|
UnicodePlatformSpecificIDUnicode2NoBMP
|
||
|
)
|
||
|
|
||
|
const (
|
||
|
MacintoshPlatformSpecificIDRoman = iota
|
||
|
MacintoshPlatformSpecificIDJapanese
|
||
|
MacintoshPlatformSpecificIDTraditionalChinese
|
||
|
MacintoshPlatformSpecificIDKorean
|
||
|
MacintoshPlatformSpecificIDArabic
|
||
|
MacintoshPlatformSpecificIDHebrew
|
||
|
MacintoshPlatformSpecificIDGreek
|
||
|
MacintoshPlatformSpecificIDRussian
|
||
|
MacintoshPlatformSpecificIDRSymbol
|
||
|
MacintoshPlatformSpecificIDDevanagari
|
||
|
MacintoshPlatformSpecificIDGurmukhi
|
||
|
MacintoshPlatformSpecificIDGujarati
|
||
|
MacintoshPlatformSpecificIDOriya
|
||
|
MacintoshPlatformSpecificIDBengali
|
||
|
MacintoshPlatformSpecificIDTamil
|
||
|
MacintoshPlatformSpecificIDTelugu
|
||
|
MacintoshPlatformSpecificIDKannada
|
||
|
MacintoshPlatformSpecificIDMalayalam
|
||
|
MacintoshPlatformSpecificIDSinhalese
|
||
|
MacintoshPlatformSpecificIDBurmese
|
||
|
MacintoshPlatformSpecificIDThai
|
||
|
MacintoshPlatformSpecificIDLaotian
|
||
|
MacintoshPlatformSpecificIDGeorgian
|
||
|
MacintoshPlatformSpecificIDArmenian
|
||
|
MacintoshPlatformSpecificIDSimplifiedChinese
|
||
|
MacintoshPlatformSpecificIDTibetan
|
||
|
MacintoshPlatformSpecificIDMongolian
|
||
|
MacintoshPlatformSpecificIDGeez
|
||
|
MacintoshPlatformSpecificIDSlavic
|
||
|
MacintoshPlatformSpecificIDVietnamese
|
||
|
MacintoshPlatformSpecificIDSindhi
|
||
|
MacintoshPlatformSpecificIDUniterpreted
|
||
|
)
|
||
|
|
||
|
const (
|
||
|
NameIDCopyright = iota
|
||
|
NameIDFontFamily
|
||
|
NameIDFontSubFamily
|
||
|
NameIDUniqueFontID
|
||
|
NameIDFullFontName
|
||
|
NameIDVersion
|
||
|
NameIDPostScriptName
|
||
|
NameIDTrademark
|
||
|
NameIDManufacturerName
|
||
|
NameIDDesigner
|
||
|
NameIDDescription
|
||
|
NameIDVendorURL
|
||
|
NameIDDesignerURL
|
||
|
NameIDLicenseDescription
|
||
|
NameIDLicenseInfoURL
|
||
|
NameIDReserved
|
||
|
NameIDTypographicFamily
|
||
|
NameIDTypographicSubFamily
|
||
|
NameIDCompatibleFullName //only mac
|
||
|
NameIDSampleText
|
||
|
NameIDPostscriptCID
|
||
|
NameIDWWSFamily
|
||
|
NameIDWWSSubFamily
|
||
|
NameIDLightBackgroundPallete
|
||
|
NameIDDarkBackgroundPallete
|
||
|
NameIDVariationScriptNamePrefix
|
||
|
)
|
||
|
|
||
|
type NameTable struct {
|
||
|
Name string `json:"name"`
|
||
|
CopyRight string `json:"copyRight"`
|
||
|
Family string `json:"family"`
|
||
|
Style string `json:"style"`
|
||
|
}
|
||
|
|
||
|
|
||
|
type NameRecord struct{
|
||
|
Platform uint16
|
||
|
PlatformSpecific uint16
|
||
|
Language uint16
|
||
|
Name uint16
|
||
|
Length uint16
|
||
|
Offset uint16
|
||
|
}
|
||
|
|
||
|
type LangTagRecord struct{
|
||
|
Length uint16
|
||
|
Offset uint16
|
||
|
}
|
||
|
|
||
|
type NameTableFormat struct{
|
||
|
Format uint16
|
||
|
RecordsCount uint16
|
||
|
StringOffset uint16
|
||
|
NameRecords []NameRecord
|
||
|
LangTagCount uint16 //only ver 1, apple not support
|
||
|
LangTagRecords []LangTagRecord //only ver 1, apple not support
|
||
|
}
|