Permalink
Browse files

if no color set, use kCTForegroundColorFromContextAttributeName

  • Loading branch information...
1 parent a34d9eb commit 7d60edcb1af4b80ff93bc3bc8b88d303a027aa13 @farfromrefug farfromrefug committed Jan 6, 2014
Showing with 3 additions and 5 deletions.
  1. +0 −5 Core/Source/DTHTMLAttributedStringBuilder.m
  2. +3 −0 Core/Source/DTHTMLElement.m
@@ -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)
{
@@ -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)
{

0 comments on commit 7d60edc

Please sign in to comment.