2023-03-27 03:37:38 +00:00
|
|
|
|
|
|
|
import
|
2023-05-17 20:51:17 +00:00
|
|
|
preserves, std/tables
|
2023-03-27 03:37:38 +00:00
|
|
|
|
|
|
|
type
|
|
|
|
FontAssertion* {.preservesRecord: "fontconfig".} = object
|
2023-03-29 22:53:37 +00:00
|
|
|
`pattern`*: Properties
|
|
|
|
`attributes`*: Properties
|
2023-03-27 03:37:38 +00:00
|
|
|
|
2023-05-02 21:07:00 +00:00
|
|
|
BootArguments* {.preservesDictionary.} = object
|
|
|
|
`dataspace`* {.preservesEmbedded.}: Preserve[void]
|
|
|
|
|
2023-03-29 22:53:37 +00:00
|
|
|
Properties* = Table[Symbol, Preserve[void]]
|
2023-05-02 21:07:00 +00:00
|
|
|
proc `$`*(x: FontAssertion | BootArguments | Properties): string =
|
2023-03-27 03:37:38 +00:00
|
|
|
`$`(toPreserve(x))
|
|
|
|
|
2023-05-02 21:07:00 +00:00
|
|
|
proc encode*(x: FontAssertion | BootArguments | Properties): seq[byte] =
|
2023-03-27 03:37:38 +00:00
|
|
|
encode(toPreserve(x))
|