Skip to content

Commit

Permalink
if no color set, use kCTForegroundColorFromContextAttributeName
Browse files Browse the repository at this point in the history
  • Loading branch information
farfromrefug committed Jan 6, 2014
1 parent a34d9eb commit 7d60edc
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
5 changes: 0 additions & 5 deletions Core/Source/DTHTMLAttributedStringBuilder.m
Original file line number Diff line number Diff line change
Expand Up @@ -290,11 +290,6 @@ - (BOOL)_buildString
_defaultTag.textScale = _textScale;
_defaultTag.currentTextSize = _defaultFontDescriptor.pointSize;

#if DTCORETEXT_FIX_14684188
// workaround, only necessary while rdar://14684188 is not fixed
_defaultTag.textColor = [UIColor blackColor];
#endif

id defaultColor = [_options objectForKey:DTDefaultTextColor];
if (defaultColor)
{
Expand Down
3 changes: 3 additions & 0 deletions Core/Source/DTHTMLElement.m
Original file line number Diff line number Diff line change
Expand Up @@ -207,6 +207,9 @@ - (NSDictionary *)attributesForAttributedStringRepresentation
[tmpDict setObject:(id)[_textColor CGColor] forKey:(id)kCTForegroundColorAttributeName];
}
}
else {
[tmpDict setObject:[NSNumber numberWithBool:YES] forKey:(id)kCTForegroundColorFromContextAttributeName];
}

if (_backgroundColor)
{
Expand Down

0 comments on commit 7d60edc

Please sign in to comment.