Added vertical glyph forms. Next up is the rest of the various font features.
This commit is contained in:
parent
1c238bf85b
commit
ff986858f1
|
@ -302,6 +302,8 @@ static int specsIdentical(struct attr *attr, uiAttributeSpec *spec)
|
|||
attr->spec.G == spec->G &&
|
||||
attr->spec.B == spec->B &&
|
||||
attr->spec.A == spec->A;
|
||||
case uiAttributeVerticalForms:
|
||||
return 1;
|
||||
// TODO
|
||||
}
|
||||
// handles the rest
|
||||
|
|
|
@ -122,6 +122,9 @@ static int processAttribute(uiAttributedString *s, uiAttributeSpec *spec, size_t
|
|||
[p->backgroundBlocks addObject:block];
|
||||
Block_release(block);
|
||||
break;
|
||||
case uiAttributeVerticalForms:
|
||||
CFAttributedStringSetAttribute(p->mas, range, kCTVerticalFormsAttributeName, kCFBooleanTrue);
|
||||
break;
|
||||
// TODO
|
||||
}
|
||||
return 0;
|
||||
|
|
|
@ -91,6 +91,16 @@ static void setupAttributedString(void)
|
|||
|
||||
uiAttributedStringAppendUnattributed(attrstr, ", ");
|
||||
|
||||
next = "vertical glyph forms";
|
||||
start = uiAttributedStringLen(attrstr);
|
||||
end = start + strlen(next);
|
||||
uiAttributedStringAppendUnattributed(attrstr, next);
|
||||
spec.Type = uiAttributeVerticalForms;
|
||||
uiAttributedStringSetAttribute(attrstr, &spec, start, end);
|
||||
|
||||
uiAttributedStringAppendUnattributed(attrstr, " (which you can draw rotated for proper vertical text)");
|
||||
uiAttributedStringAppendUnattributed(attrstr, ", ");
|
||||
|
||||
next = "multiple TODO";
|
||||
}
|
||||
|
||||
|
|
|
@ -9,6 +9,7 @@ _UI_ENUM(uiAttribute) {
|
|||
uiAttributeStretch,
|
||||
uiAttributeColor, // use R, G, B, A
|
||||
uiAttributeBackground, // use R, G, B, A
|
||||
uiAttributeVerticalForms, // no parameter
|
||||
// TODO
|
||||
// TODO uiAttributeSystem,
|
||||
// TODO uiAttributeCustom,
|
||||
|
|
Loading…
Reference in New Issue