mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-13 00:04:19 +00:00
Fix for a problem with CoreText when laying out very long text strings
This commit is contained in:
parent
420f85bc5f
commit
d0f646a9ad
1 changed files with 6 additions and 3 deletions
|
|
@ -219,10 +219,13 @@ namespace CoreTextTypeLayout
|
|||
CGColorSpaceRef rgbColourSpace = CGColorSpaceCreateDeviceRGB();
|
||||
#endif
|
||||
|
||||
CFStringRef cfText = text.getText().toCFString();
|
||||
CFMutableAttributedStringRef attribString = CFAttributedStringCreateMutable (kCFAllocatorDefault, 0);
|
||||
CFAttributedStringReplaceString (attribString, CFRangeMake (0, 0), cfText);
|
||||
CFRelease (cfText);
|
||||
|
||||
if (CFStringRef cfText = text.getText().toCFString())
|
||||
{
|
||||
CFAttributedStringReplaceString (attribString, CFRangeMake (0, 0), cfText);
|
||||
CFRelease (cfText);
|
||||
}
|
||||
|
||||
const int numCharacterAttributes = text.getNumAttributes();
|
||||
const CFIndex attribStringLen = CFAttributedStringGetLength (attribString);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue