Started dropping the whole features system in favor of a homogenous OpenType feature attribute just like every other API. Will make some things easier, hopefully...
This commit is contained in:
parent
df2a726c1b
commit
a0454a6b43
20
ui_attrstr.h
20
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
|
// TODO document that the color in the case we don't specify it is the text color
|
||||||
uiAttributeUnderlineColor, // enum uiDrawUnderlineColor
|
uiAttributeUnderlineColor, // enum uiDrawUnderlineColor
|
||||||
|
|
||||||
|
uiAttributeFeatures, // object of type uiOpenTypeFeatures
|
||||||
|
|
||||||
|
#if 0
|
||||||
|
|
||||||
// These attributes represent typographic features. Each feature
|
// These attributes represent typographic features. Each feature
|
||||||
// is a separate attribute, to make composition easier. The
|
// is a separate attribute, to make composition easier. The
|
||||||
// availability of for each attribute are defined by the font; the
|
// availability of for each attribute are defined by the font; the
|
||||||
|
@ -154,6 +158,8 @@ _UI_ENUM(uiAttribute) {
|
||||||
uiAttributeLowercaseCapForms, // enum uiAttributeCapForm
|
uiAttributeLowercaseCapForms, // enum uiAttributeCapForm
|
||||||
uiAttributeUppercaseCapForms, // enum uiAttributeCapForm
|
uiAttributeUppercaseCapForms, // enum uiAttributeCapForm
|
||||||
};
|
};
|
||||||
|
#endif
|
||||||
|
};
|
||||||
|
|
||||||
_UI_ENUM(uiDrawUnderlineStyle) {
|
_UI_ENUM(uiDrawUnderlineStyle) {
|
||||||
uiDrawUnderlineStyleNone,
|
uiDrawUnderlineStyleNone,
|
||||||
|
@ -169,6 +175,8 @@ _UI_ENUM(uiDrawUnderlineColor) {
|
||||||
uiDrawUnderlineColorAuxiliary, // for instance, the color used by smart replacements on OS X
|
uiDrawUnderlineColorAuxiliary, // for instance, the color used by smart replacements on OS X
|
||||||
};
|
};
|
||||||
|
|
||||||
|
#if 0
|
||||||
|
|
||||||
_UI_ENUM(uiAttributeNumberSpacing) {
|
_UI_ENUM(uiAttributeNumberSpacing) {
|
||||||
uiAttributeNumberSpacingProportional,
|
uiAttributeNumberSpacingProportional,
|
||||||
// AAT calls this "monospaced"
|
// AAT calls this "monospaced"
|
||||||
|
@ -208,6 +216,18 @@ _UI_ENUM(uiAttributeCapForm) {
|
||||||
uiAttributeCapFormPetiteCaps,
|
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;
|
typedef struct uiAttributeSpec uiAttributeSpec;
|
||||||
|
|
||||||
struct uiAttributeSpec {
|
struct uiAttributeSpec {
|
||||||
|
|
Loading…
Reference in New Issue