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;