font

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Mar 16, 2026 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

Raw CGo bindings for Android Font

Index

Constants

View Source
const (
	AFAMILY_VARIANT_DEFAULT = 0
	AFAMILY_VARIANT_COMPACT = 1
	AFAMILY_VARIANT_ELEGANT = 2
)
View Source
const (
	AFONT_WEIGHT_MIN         = 0
	AFONT_WEIGHT_THIN        = 100
	AFONT_WEIGHT_EXTRA_LIGHT = 200
	AFONT_WEIGHT_LIGHT       = 300
	AFONT_WEIGHT_NORMAL      = 400
	AFONT_WEIGHT_MEDIUM      = 500
	AFONT_WEIGHT_SEMI_BOLD   = 600
	AFONT_WEIGHT_BOLD        = 700
	AFONT_WEIGHT_EXTRA_BOLD  = 800
	AFONT_WEIGHT_BLACK       = 900
	AFONT_WEIGHT_MAX         = 1000
)

Variables

This section is empty.

Functions

func AFontMatcher_destroy

func AFontMatcher_destroy(matcher *AFontMatcher)

func AFontMatcher_setFamilyVariant

func AFontMatcher_setFamilyVariant(matcher *AFontMatcher, familyVariant uint32)

func AFontMatcher_setLocales

func AFontMatcher_setLocales(matcher *AFontMatcher, languageTags string)

func AFontMatcher_setStyle

func AFontMatcher_setStyle(matcher *AFontMatcher, weight uint16, italic bool)

func AFont_close

func AFont_close(font *AFont)

func AFont_getAxisCount

func AFont_getAxisCount(font *AFont) uint64

func AFont_getAxisTag

func AFont_getAxisTag(font *AFont, axisIndex uint32) uint32

func AFont_getAxisValue

func AFont_getAxisValue(font *AFont, axisIndex uint32) float32

func AFont_getCollectionIndex

func AFont_getCollectionIndex(font *AFont) uint64

func AFont_getFontFilePath

func AFont_getFontFilePath(font *AFont) string

func AFont_getLocale

func AFont_getLocale(font *AFont) string

func AFont_getWeight

func AFont_getWeight(font *AFont) uint16

func AFont_isItalic

func AFont_isItalic(font *AFont) bool

func ASystemFontIterator_close

func ASystemFontIterator_close(iterator *ASystemFontIterator)

Types

type AFont

type AFont C.AFont

func AFontMatcher_match

func AFontMatcher_match(matcher *AFontMatcher, familyName string, text *uint16, textLength uint32, runLengthOut *uint32) *AFont

func ASystemFontIterator_next

func ASystemFontIterator_next(iterator *ASystemFontIterator) *AFont

type AFontMatcher

type AFontMatcher C.AFontMatcher

func AFontMatcher_create

func AFontMatcher_create() *AFontMatcher

type ASystemFontIterator

type ASystemFontIterator C.ASystemFontIterator

func ASystemFontIterator_open

func ASystemFontIterator_open() *ASystemFontIterator

type CgoAllocMap

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

CgoAllocMap stores pointers to C allocated memory for future reference.

func UnpackPCharString

func UnpackPCharString(str string) (*C.char, *CgoAllocMap)

UnpackPCharString copies the data from Go string as *C.char.

func (*CgoAllocMap) Add

func (a *CgoAllocMap) Add(ptr unsafe.Pointer)

func (*CgoAllocMap) Borrow

func (a *CgoAllocMap) Borrow(b *CgoAllocMap)

func (*CgoAllocMap) Free

func (a *CgoAllocMap) Free()

func (*CgoAllocMap) IsEmpty

func (a *CgoAllocMap) IsEmpty() bool

type SliceHeader

type SliceHeader struct {
	Data unsafe.Pointer
	Len  int
	Cap  int
}

Jump to

Keyboard shortcuts

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