Permalink
Browse files

Migrated from NSScanner-based HTML parsing to libxml2.

  • Loading branch information...
1 parent aff3984 commit 5ab4da01fc3c29bceff75a3d838086c9de5f5487 @odrobnik odrobnik committed Jan 23, 2012
@@ -1,11 +1,12 @@
//
-// Prefix header for all source files of the 'CoreTextExtensions' target in the 'CoreTextExtensions' project
+// Prefix header for all source files of the Static Library and Framework targets in the 'DTCoreText' project
//
#ifdef __OBJC__
#import <Foundation/Foundation.h>
#import <UIKit/UIKit.h>
+#import <CoreText/CoreText.h>
#endif
@@ -0,0 +1,17 @@
+extern NSString *NSBaseURLDocumentOption;
+extern NSString *NSTextEncodingNameDocumentOption;
+extern NSString *NSTextSizeMultiplierDocumentOption;
+
+extern NSString *DTMaxImageSize;
+extern NSString *DTDefaultFontFamily;
+extern NSString *DTDefaultTextColor;
+extern NSString *DTDefaultLinkColor;
+extern NSString *DTDefaultLinkDecoration;
+extern NSString *DTDefaultTextAlignment;
+extern NSString *DTDefaultLineHeightMultiplier;
+extern NSString *DTDefaultLineHeightMultiplier;
+extern NSString *DTDefaultFirstLineHeadIndent;
+extern NSString *DTDefaultHeadIndent;
+extern NSString *DTDefaultListIndent;
+
+extern NSString *DTDefaultStyleSheet;
@@ -0,0 +1,18 @@
+// standard options
+NSString *NSBaseURLDocumentOption = @"NSBaseURLDocumentOption";
+NSString *NSTextEncodingNameDocumentOption = @"NSTextEncodingNameDocumentOption";
+NSString *NSTextSizeMultiplierDocumentOption = @"NSTextSizeMultiplierDocumentOption";
+
+// custom options
+NSString *DTMaxImageSize = @"DTMaxImageSize";
+NSString *DTDefaultFontFamily = @"DTDefaultFontFamily";
+NSString *DTDefaultTextColor = @"DTDefaultTextColor";
+NSString *DTDefaultLinkColor = @"DTDefaultLinkColor";
+NSString *DTDefaultLinkDecoration = @"DTDefaultLinkDecoration";
+NSString *DTDefaultTextAlignment = @"DTDefaultTextAlignment";
+NSString *DTDefaultLineHeightMultiplier = @"DTDefaultLineHeightMultiplier";
+NSString *DTDefaultFirstLineHeadIndent = @"DTDefaultFirstLineHeadIndent";
+NSString *DTDefaultHeadIndent = @"DTDefaultHeadIndent";
+NSString *DTDefaultListIndent = @"DTDefaultListIndent";
+
+NSString *DTDefaultStyleSheet = @"DTDefaultStyleSheet";
@@ -7,9 +7,6 @@
//
-#import <CoreText/CoreText.h>
-
-
@interface DTCoreTextFontDescriptor : NSObject <NSCopying, NSCoding>
// sets the font face name to use for a specific font family
@@ -6,8 +6,6 @@
// Copyright 2011 Drobnik.com. All rights reserved.
//
-#import <CoreText/CoreText.h>
-
@interface DTCoreTextParagraphStyle : NSObject <NSCopying>
@property (nonatomic, assign) CGFloat firstLineIndent;
@@ -0,0 +1,20 @@
+//
+// DTHTMLDocument.h
+// DTCoreText
+//
+// Created by Oliver Drobnik on 21.01.12.
+// Copyright (c) 2012 Drobnik.com. All rights reserved.
+//
+
+#import <Foundation/Foundation.h>
+#import "DTHTMLParser.h"
+
+@interface DTHTMLAttributedStringBuilder : NSObject <DTHTMLParserDelegate>
+
+- (id)initWithHTML:(NSData *)data options:(NSDictionary *)options documentAttributes:(NSDictionary **)dict;
+
+- (BOOL)buildString;
+
+- (NSAttributedString *)generatedAttributedString;
+
+@end
Oops, something went wrong.

0 comments on commit 5ab4da0

Please sign in to comment.