diff --git a/ui_attrstr.h b/ui_attrstr.h index f5f153c2..0077b6ee 100644 --- a/ui_attrstr.h +++ b/ui_attrstr.h @@ -32,6 +32,10 @@ _UI_ENUM(uiAttribute) { // TODO document that the color in the case we don't specify it is the text color uiAttributeUnderlineColor, // enum uiDrawUnderlineColor + uiAttributeFeatures, // object of type uiOpenTypeFeatures + +#if 0 + // These attributes represent typographic features. Each feature // is a separate attribute, to make composition easier. The // availability of for each attribute are defined by the font; the @@ -154,6 +158,8 @@ _UI_ENUM(uiAttribute) { uiAttributeLowercaseCapForms, // enum uiAttributeCapForm uiAttributeUppercaseCapForms, // enum uiAttributeCapForm }; +#endif +}; _UI_ENUM(uiDrawUnderlineStyle) { uiDrawUnderlineStyleNone, @@ -169,6 +175,8 @@ _UI_ENUM(uiDrawUnderlineColor) { uiDrawUnderlineColorAuxiliary, // for instance, the color used by smart replacements on OS X }; +#if 0 + _UI_ENUM(uiAttributeNumberSpacing) { uiAttributeNumberSpacingProportional, // AAT calls this "monospaced" @@ -208,6 +216,18 @@ _UI_ENUM(uiAttributeCapForm) { uiAttributeCapFormPetiteCaps, }; +#endif + +// TODO rename? +typedef struct uiOpenTypeFeatures uiOpenTypeFeatures; +// TODO detailed constructor? +_UI_EXTERN uiOpenTypeFeatures *uiNewOpenTypeFeatures(void); +_UI_EXTERN void uiFreeOpenTypeFeatures(uiOpenTypeFeatures *otf); +_UI_EXTERN uiOpenTypeFeatures *uiOpenTypeFeaturesClone(uiOpenTypeFeatures *otf); +_UI_EXTERN void uiOpenTypeFeaturesAdd(uiOpenTypeFeatures *otf, char a, char b, char c, char d, uint32_t value); +// TODO remove, query, enumerate +// TODO make the compare function public? + typedef struct uiAttributeSpec uiAttributeSpec; struct uiAttributeSpec {