Documentation
¶
Overview ¶
Package font provides Go bindings for Android Font.
Index ¶
- type Error
- type FAMILY_VARIANT
- type Font
- func (h *Font) Close() error
- func (h *Font) GetAxisCount() uint64
- func (h *Font) GetAxisTag(axisIndex uint32) error
- func (h *Font) GetAxisValue(axisIndex uint32) float32
- func (h *Font) GetCollectionIndex() uint64
- func (h *Font) GetFontFilePath() string
- func (h *Font) GetLocale() string
- func (h *Font) IsItalic() bool
- func (h *Font) Pointer() unsafe.Pointer
- func (h *Font) Weight() uint16
- type Matcher
- func (h *Matcher) Close() error
- func (h *Matcher) Match(familyName string, text *uint16, textLength uint32, runLengthOut *uint32) *Font
- func (h *Matcher) Pointer() unsafe.Pointer
- func (h *Matcher) SetFamilyVariant(familyVariant uint32)
- func (h *Matcher) SetLocales(languageTags string)
- func (h *Matcher) SetStyle(weight uint16, italic bool) *Matcher
- type SystemFontIterator
- type Weight
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type FAMILY_VARIANT ¶
type FAMILY_VARIANT int32
const ( AFAMILY_VARIANT_DEFAULT FAMILY_VARIANT = 0 AFAMILY_VARIANT_COMPACT FAMILY_VARIANT = 1 AFAMILY_VARIANT_ELEGANT FAMILY_VARIANT = 2 )
type Font ¶
type Font struct {
// contains filtered or unexported fields
}
Font wraps the NDK AFont handle.
func NewFontFromPointer ¶
NewFontFromPointer wraps a raw AFont pointer.
func (*Font) GetAxisCount ¶
GetAxisCount returns the value directly.
func (*Font) GetAxisTag ¶
GetAxisTag calls the underlying NDK function.
func (*Font) GetAxisValue ¶
GetAxisValue returns the value directly.
func (*Font) GetCollectionIndex ¶
GetCollectionIndex returns the value directly.
func (*Font) GetFontFilePath ¶
GetFontFilePath returns the value directly.
type Matcher ¶
type Matcher struct {
// contains filtered or unexported fields
}
Matcher wraps the NDK AFontMatcher handle.
func NewMatcherFromPointer ¶
NewMatcherFromPointer wraps a raw AFontMatcher pointer.
func (*Matcher) Match ¶
func (h *Matcher) Match(familyName string, text *uint16, textLength uint32, runLengthOut *uint32) *Font
Match creates a new Font from this Matcher.
func (*Matcher) SetFamilyVariant ¶
SetFamilyVariant calls the underlying NDK function.
func (*Matcher) SetLocales ¶
SetLocales calls the underlying NDK function.
type SystemFontIterator ¶
type SystemFontIterator struct {
// contains filtered or unexported fields
}
SystemFontIterator wraps the NDK ASystemFontIterator handle.
func ASystemFontIterator_open ¶
func ASystemFontIterator_open() *SystemFontIterator
ASystemFontIterator_open calls the underlying C function.
func NewSystemFontIteratorFromPointer ¶
func NewSystemFontIteratorFromPointer(ptr unsafe.Pointer) *SystemFontIterator
NewSystemFontIteratorFromPointer wraps a raw ASystemFontIterator pointer.
func (*SystemFontIterator) Close ¶
func (h *SystemFontIterator) Close() error
Close releases the underlying NDK handle.
func (*SystemFontIterator) Next ¶
func (h *SystemFontIterator) Next() *Font
Next creates a new Font from this SystemFontIterator.
func (*SystemFontIterator) Pointer ¶
func (h *SystemFontIterator) Pointer() unsafe.Pointer
Pointer returns the underlying pointer as unsafe.Pointer.