* 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
This commit is contained in:
fredkiefer 2014-01-11 18:09:54 +00:00
parent f16dddd595
commit 1226543e89
2 changed files with 9 additions and 2 deletions

View file

@ -1,3 +1,8 @@
2014-01-10 Fred Kiefer <FredKiefer@gmx.de>
* Source/NSAttributedString.m (-fixFontAttributeInRange:): Don't
look for substitutions for control or attachment characters.
2014-01-10 Fred Kiefer <FredKiefer@gmx.de> 2014-01-10 Fred Kiefer <FredKiefer@gmx.de>
* Source/NSSavePanel.m (-runModal): Use only last component from filename. * Source/NSSavePanel.m (-runModal): Use only last component from filename.

View file

@ -1559,6 +1559,7 @@ static NSMutableDictionary *cachedCSets = nil;
NSUInteger start; NSUInteger start;
unichar chars[64]; unichar chars[64];
CREATE_AUTORELEASE_POOL(pool); CREATE_AUTORELEASE_POOL(pool);
NSCharacterSet *controlset = [NSCharacterSet controlCharacterSet];
if (NSMaxRange (range) > [self length]) if (NSMaxRange (range) > [self length])
{ {
@ -1603,14 +1604,15 @@ static NSMutableDictionary *cachedCSets = nil;
*/ */
if (nil == font) if (nil == font)
{ {
font = [NSFont userFontOfSize:0.0]; font = [NSFont userFontOfSize: 0.0];
} }
charset = [font coveredCharacterSet]; charset = [font coveredCharacterSet];
} }
if (charset != nil && ![charset characterIsMember: uchar] if (charset != nil && ![charset characterIsMember: uchar]
&& (uchar > 31)) && (uchar != NSAttachmentCharacter)
&& ![controlset characterIsMember: uchar])
{ {
// Find a replacement font // Find a replacement font
NSFont *subFont; NSFont *subFont;