mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-04-24 18:31:20 +00:00
Fixed NSAttributedString.m to always do a font substitution when necessary on unicode characters.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/branches/gnustep_testplant_branch@37023 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
68a8e6c19f
commit
bbc245709a
2 changed files with 16 additions and 0 deletions
|
@ -1,3 +1,9 @@
|
|||
2013-08-27 Frank Le Grand <frank.legrand@testplant.com>
|
||||
|
||||
* Source\NSAttributedString.m: In the absence of a NSFontAttributeName attribute,
|
||||
use a default font to prevent the substitution from stopping. This fixes a bug where
|
||||
unicode characters would not get the proper font substitution.
|
||||
|
||||
2013-08-26 Doug Simons <doug.simons@testplant.com>
|
||||
|
||||
* GSLayoutManager.m: Changed _didInvalidateLayout to call [self
|
||||
|
|
|
@ -1596,6 +1596,16 @@ static NSMutableDictionary *cachedCSets = nil;
|
|||
font = [self attribute: NSFontAttributeName
|
||||
atIndex: i
|
||||
effectiveRange: &fontRange];
|
||||
|
||||
/* If we don't have an attribute for NSFontAttributeName,
|
||||
** we take a default font so we can carry on with the
|
||||
** substitution.
|
||||
*/
|
||||
if (nil == font)
|
||||
{
|
||||
font = [NSFont userFontOfSize:0.0];
|
||||
}
|
||||
|
||||
charset = [font coveredCharacterSet];
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue