mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-04-23 20:01:11 +00:00
GSRTFregisterFont() handle fontnames with and without trailing ';'.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@15066 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
961e797c53
commit
3d8be39fa2
1 changed files with 10 additions and 2 deletions
|
@ -642,8 +642,16 @@ void GSRTFregisterFont (void *ctxt, const char *fontName,
|
|||
TEXTPOSITION];
|
||||
}
|
||||
// exclude trailing ';' from fontName
|
||||
fontNameString = [NSString stringWithCString: fontName
|
||||
length: strlen(fontName)-1];
|
||||
if (';' == fontName[strlen(fontName)-1])
|
||||
{
|
||||
fontNameString = [NSString stringWithCString: fontName
|
||||
length: strlen(fontName)-1];
|
||||
}
|
||||
else
|
||||
{
|
||||
fontNameString = [NSString stringWithCString: fontName
|
||||
length: strlen(fontName)];
|
||||
}
|
||||
[FONTS setObject: fontNameString forKey: fontId];
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue