()
| 237 | type OpenTypeFeatures map[OpenTypeTag]uint32 |
| 238 | |
| 239 | func (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. |
| 253 | type OpenTypeTag uint32 |
nothing calls this directly
no outgoing calls
no test coverage detected