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.G == spec->G &&
|
||||||
attr->spec.B == spec->B &&
|
attr->spec.B == spec->B &&
|
||||||
attr->spec.A == spec->A;
|
attr->spec.A == spec->A;
|
||||||
|
case uiAttributeVerticalForms:
|
||||||
|
return 1;
|
||||||
// TODO
|
// TODO
|
||||||
}
|
}
|
||||||
// handles the rest
|
// handles the rest
|
||||||
|
|
|
@ -122,6 +122,9 @@ static int processAttribute(uiAttributedString *s, uiAttributeSpec *spec, size_t
|
||||||
[p->backgroundBlocks addObject:block];
|
[p->backgroundBlocks addObject:block];
|
||||||
Block_release(block);
|
Block_release(block);
|
||||||
break;
|
break;
|
||||||
|
case uiAttributeVerticalForms:
|
||||||
|
CFAttributedStringSetAttribute(p->mas, range, kCTVerticalFormsAttributeName, kCFBooleanTrue);
|
||||||
|
break;
|
||||||
// TODO
|
// TODO
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
|
|
|
@ -91,6 +91,16 @@ static void setupAttributedString(void)
|
||||||
|
|
||||||
uiAttributedStringAppendUnattributed(attrstr, ", ");
|
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";
|
next = "multiple TODO";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -3,12 +3,13 @@ typedef struct uiAttributeSpec uiAttributeSpec;
|
||||||
|
|
||||||
_UI_ENUM(uiAttribute) {
|
_UI_ENUM(uiAttribute) {
|
||||||
uiAttributeFamily,
|
uiAttributeFamily,
|
||||||
uiAttributeSize, // use Double
|
uiAttributeSize, // use Double
|
||||||
uiAttributeWeight,
|
uiAttributeWeight,
|
||||||
uiAttributeItalic,
|
uiAttributeItalic,
|
||||||
uiAttributeStretch,
|
uiAttributeStretch,
|
||||||
uiAttributeColor, // use R, G, B, A
|
uiAttributeColor, // use R, G, B, A
|
||||||
uiAttributeBackground, // use R, G, B, A
|
uiAttributeBackground, // use R, G, B, A
|
||||||
|
uiAttributeVerticalForms, // no parameter
|
||||||
// TODO
|
// TODO
|
||||||
// TODO uiAttributeSystem,
|
// TODO uiAttributeSystem,
|
||||||
// TODO uiAttributeCustom,
|
// TODO uiAttributeCustom,
|
||||||
|
|
Loading…
Reference in New Issue