Fixed the build and an unspotted error in the drawtext example.
This commit is contained in:
parent
b7d34bf4f5
commit
bd39189a0e
|
@ -18,6 +18,7 @@ static void boolspec(uint32_t value, uint16_t type, uint16_t ifTrue, uint16_t if
|
||||||
pcall(p, type, ifFalse);
|
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)
|
static int foreach(char a, char b, char c, char d, uint32_t value, void *data)
|
||||||
{
|
{
|
||||||
struct openTypeAATParams *p = (struct openTypeAATParams *) 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;
|
break;
|
||||||
case mkTag('t', 'i', 't', 'l'):
|
case mkTag('t', 'i', 't', 'l'):
|
||||||
// TODO is this correct, or should we provide an else case?
|
// TODO is this correct, or should we provide an else case?
|
||||||
if (spec->Value != 0)
|
if (value != 0)
|
||||||
pcall(p, kStyleOptionsType, kTitlingCapsSelector);
|
pcall(p, kStyleOptionsType, kTitlingCapsSelector);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
|
@ -157,7 +157,7 @@ extern void openTypeToAAT(uiOpenTypeFeatures *otf, void (*doAAT)(uint16_t type,
|
||||||
// opentype.m
|
// opentype.m
|
||||||
// TODO this is only used by opentype.m and aat.m; figure out some better way to handle this
|
// TODO this is only used by opentype.m and aat.m; figure out some better way to handle this
|
||||||
// TODO remove x8tox32()
|
// 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) \
|
#define mkTag(a, b, c, d) \
|
||||||
((x8tox32(a) << 24) | \
|
((x8tox32(a) << 24) | \
|
||||||
(x8tox32(b) << 16) | \
|
(x8tox32(b) << 16) | \
|
||||||
|
|
|
@ -218,7 +218,7 @@ static void setupAttributedString(void)
|
||||||
end = start + strlen(next);
|
end = start + strlen(next);
|
||||||
uiAttributedStringAppendUnattributed(attrstr, next);
|
uiAttributedStringAppendUnattributed(attrstr, next);
|
||||||
spec.Type = uiAttributeFeatures;
|
spec.Type = uiAttributeFeatures;
|
||||||
spec.Value = addFeature("clig", 1);
|
spec.Value = addFeature("dlig", 1);
|
||||||
uiAttributedStringSetAttribute(attrstr, &spec, start, end);
|
uiAttributedStringSetAttribute(attrstr, &spec, start, end);
|
||||||
uiAttributedStringAppendUnattributed(attrstr, ")");
|
uiAttributedStringAppendUnattributed(attrstr, ")");
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue