diff --git a/darwin/aat.m b/darwin/aat.m index 45a97b00..0c964e05 100644 --- a/darwin/aat.m +++ b/darwin/aat.m @@ -18,6 +18,7 @@ static void boolspec(uint32_t value, uint16_t type, uint16_t ifTrue, uint16_t if pcall(p, type, ifFalse); } +// TODO double-check drawtext example to make sure all of these are used properly (I already screwed dlig up by putting clig twice instead) static int foreach(char a, char b, char c, char d, uint32_t value, void *data) { struct openTypeAATParams *p = (struct openTypeAATParams *) data; @@ -120,7 +121,7 @@ static int foreach(char a, char b, char c, char d, uint32_t value, void *data) break; case mkTag('t', 'i', 't', 'l'): // TODO is this correct, or should we provide an else case? - if (spec->Value != 0) + if (value != 0) pcall(p, kStyleOptionsType, kTitlingCapsSelector); break; diff --git a/darwin/uipriv_darwin.h b/darwin/uipriv_darwin.h index 8c4bff07..fe65f201 100644 --- a/darwin/uipriv_darwin.h +++ b/darwin/uipriv_darwin.h @@ -157,7 +157,7 @@ extern void openTypeToAAT(uiOpenTypeFeatures *otf, void (*doAAT)(uint16_t type, // opentype.m // TODO this is only used by opentype.m and aat.m; figure out some better way to handle this // TODO remove x8tox32() -#define x8to32(x) ((uint32_t) (((uint8_t) (x)) & 0xFF)) +#define x8tox32(x) ((uint32_t) (((uint8_t) (x)) & 0xFF)) #define mkTag(a, b, c, d) \ ((x8tox32(a) << 24) | \ (x8tox32(b) << 16) | \ diff --git a/examples/drawtext/attributes.c b/examples/drawtext/attributes.c index 56ed4d13..46bf1b0d 100644 --- a/examples/drawtext/attributes.c +++ b/examples/drawtext/attributes.c @@ -218,7 +218,7 @@ static void setupAttributedString(void) end = start + strlen(next); uiAttributedStringAppendUnattributed(attrstr, next); spec.Type = uiAttributeFeatures; - spec.Value = addFeature("clig", 1); + spec.Value = addFeature("dlig", 1); uiAttributedStringSetAttribute(attrstr, &spec, start, end); uiAttributedStringAppendUnattributed(attrstr, ")");