Documentation update.

This commit is contained in:
Pietro Gagliardi 2016-05-23 01:12:52 -04:00
parent 5d63fe4cec
commit 156c3584f7
1 changed files with 1 additions and 0 deletions

View File

@ -475,6 +475,7 @@ uiDrawTextLayout *uiDrawNewTextLayout(const char *str, uiDrawTextFont *defaultFo
// unfortunately the CFRanges for attributes expect UTF-16 codepoints // unfortunately the CFRanges for attributes expect UTF-16 codepoints
// we want full characters // we want full characters
// fortunately CFStringGetRangeOfComposedCharactersAtIndex() is here for us // fortunately CFStringGetRangeOfComposedCharactersAtIndex() is here for us
// https://developer.apple.com/library/mac/documentation/Cocoa/Conceptual/Strings/Articles/stringsClusters.html says that this does work on surrogate pairs (despite the name), and that this is the preferred function for this particular job anyway
backing = CFAttributedStringGetString(layout->mas); backing = CFAttributedStringGetString(layout->mas);
n = CFStringGetLength(backing); n = CFStringGetLength(backing);
// allocate one extra, just to be safe // allocate one extra, just to be safe