From 768aba6614e7fa4a0916414689c6bf2afc9ae8fc Mon Sep 17 00:00:00 2001 From: Pietro Gagliardi Date: Thu, 16 Feb 2017 03:05:29 -0500 Subject: [PATCH] Added test of Unicase. Had to use the Arial that comes with Windows 10, which seems to be the only font file I have out of **everything** that comes with Unicase. :S --- examples/drawtext/attributes.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/examples/drawtext/attributes.c b/examples/drawtext/attributes.c index c7ecf880..51c6cbfa 100644 --- a/examples/drawtext/attributes.c +++ b/examples/drawtext/attributes.c @@ -232,7 +232,17 @@ static void setupAttributedString(void) uiAttributedStringAppendUnattributed(attrstr, ", "); - // TODO unicase + next = "UnICasE wRITInG"; + start = uiAttributedStringLen(attrstr); + end = start + strlen(next); + uiAttributedStringAppendUnattributed(attrstr, next); + spec.Type = uiAttributeUnicase; + spec.Value = 1; + uiAttributedStringSetAttribute(attrstr, &spec, start, end); + + uiAttributedStringAppendUnattributed(attrstr, ", "); + + next = "TODO"; } static char fontFamily[] = "Times New Roman";