Fixed span for ios. Fixes issue #452.

This commit is contained in:
Nedyalko Nikolov
2015-07-20 15:20:53 +03:00
parent dea2e693c0
commit 1976c28dc1
2 changed files with 8 additions and 8 deletions

View File

@ -22,7 +22,8 @@ export class Span extends spanCommon.Span {
if (realFontFamily) {
font = UIFont.fontWithNameSize(realFontFamily, realFontSize);
}
else {
if (!font) {
var fontDescriptor = UIFontDescriptor.new();
var symbolicTraits;
if (realFontAttributes & enums.FontAttributes.Bold) {
@ -33,12 +34,11 @@ export class Span extends spanCommon.Span {
}
font = UIFont.fontWithDescriptorSize(fontDescriptor.fontDescriptorWithSymbolicTraits(symbolicTraits), realFontSize);
}
if (font) {
this.spanModifiers.push({
key: NSFontAttributeName,
value: font
});
}
this.spanModifiers.push({
key: NSFontAttributeName,
value: font
});
}
var realForegroundColor = this.foregroundColor ||