From 1226543e89361e05d91e8b9f8ce1790696bc8cc0 Mon Sep 17 00:00:00 2001 From: fredkiefer Date: Sat, 11 Jan 2014 18:09:54 +0000 Subject: [PATCH] * Source/NSAttributedString.m (-fixFontAttributeInRange:): Don't look for substitutions for control or attachment characters. git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@37575 72102866-910b-0410-8b05-ffd578937521 --- ChangeLog | 5 +++++ Source/NSAttributedString.m | 6 ++++-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index c4ee78518..87c9f433f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2014-01-10 Fred Kiefer + + * Source/NSAttributedString.m (-fixFontAttributeInRange:): Don't + look for substitutions for control or attachment characters. + 2014-01-10 Fred Kiefer * Source/NSSavePanel.m (-runModal): Use only last component from filename. diff --git a/Source/NSAttributedString.m b/Source/NSAttributedString.m index 9a62974a1..5f024c35c 100644 --- a/Source/NSAttributedString.m +++ b/Source/NSAttributedString.m @@ -1559,6 +1559,7 @@ static NSMutableDictionary *cachedCSets = nil; NSUInteger start; unichar chars[64]; CREATE_AUTORELEASE_POOL(pool); + NSCharacterSet *controlset = [NSCharacterSet controlCharacterSet]; if (NSMaxRange (range) > [self length]) { @@ -1603,14 +1604,15 @@ static NSMutableDictionary *cachedCSets = nil; */ if (nil == font) { - font = [NSFont userFontOfSize:0.0]; + font = [NSFont userFontOfSize: 0.0]; } charset = [font coveredCharacterSet]; } if (charset != nil && ![charset characterIsMember: uchar] - && (uchar > 31)) + && (uchar != NSAttachmentCharacter) + && ![controlset characterIsMember: uchar]) { // Find a replacement font NSFont *subFont;