MCPcopy Create free account
hub / github.com/andlabs/ui / toLibui

Method toLibui

drawtext.go:239–250  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

237type OpenTypeFeatures map[OpenTypeTag]uint32
238
239func (o OpenTypeFeatures) toLibui() *C.uiAttribute {
240 otf := C.uiNewOpenTypeFeatures()
241 defer C.uiFreeOpenTypeFeatures(otf)
242 for tag, value := range o {
243 a := byte((tag >> 24) & 0xFF)
244 b := byte((tag >> 16) & 0xFF)
245 c := byte((tag >> 8) & 0xFF)
246 d := byte(tag & 0xFF)
247 C.uiOpenTypeFeaturesAdd(otf, C.char(a), C.char(b), C.char(c), C.char(d), C.uint32_t(value))
248 }
249 return C.uiNewFeaturesAttribute(otf)
250}
251
252// OpenTypeTag represents a four-byte OpenType feature tag.
253type OpenTypeTag uint32

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected