Swiftpack.co - Package - Cocoanetics/DTCoreText


A description of this package.


Stars: 5986

Used By

Total: 0


1.6.24 - 2020-08-24 15:51:12


Version 1.6.23 - 2019-09-11 07:07:11


Version 1.6.22 - 2019-09-11 06:23:44

Please read the announcement for a summary of changes to this maintenance release.

Version 1.6.21 - 2017-08-28 13:57:00

  • ADDED: Support for


  • ADDED: Support width attribute in percent for text attachments
  • ADDED: Ability to abort HTML parsing
  • ADDED: Archiving
  • ADDED: Improved support for macOS
  • FIXED: Incorrect file name in import should be DTCSSStylesheet.h
  • FIXED: HTML generation with multi-line links
  • FIXED: Do not add 'Apple-converted-space' to attributed string when processing custom HTML attributes
  • FIXED: Ignore list style shorthands that are not strings
  • FIXED: Wrong attributed substring passed to generic custom view when using truncation
  • FIXED: Avoid unnecessary drawing of DTAttributedTextContentView if it is being deallocated
  • FIXED: Changing properties on DTCoreTextLayoutFrame would not update layout, resulting in incorrect sizing information being returned

Announcement: https://www.cocoanetics.com/2017/08/dtcoretext-1-6-21/

Version 1.6.20 - 2017-02-23 18:12:22

  • FIXED: Crash when img tag had an invalid file URL to an animated GIF
  • FIXED: Superfluos import for framework-based umbrella header causing build issues
  • FIXED: Link will be nil when cleanString contains Chinese characters
  • FIXED: DTCoreTextLayoutFrame memory leak
  • FIXED: Certain truncations might cause a crash
  • FIXED: Skip unpaired bracket } & fix NSUInteger underflow in CSS parser
  • FIXED: Space to “apple converted space span” conversion for 2 spaces
  • FIXED: Text range for text block (for drawing background rectangle) might be computed incorrectly
  • FIXED: Crash with IFRAME src attribute had less than 2 characters
  • ADDED: Look for DTCoreTextFontOverrides.plist in the main bundle if its not found in the local bundle
  • ADDED: Expanded character decoding support in stringByReplacingHTMLEntities

Announcement: https://www.cocoanetics.com/2017/02/dtcoretext-1-6-20/

Version 1.6.19 - 2016-10-11 17:13:24

  • FIXED: Incompatibility with iOS 7, using containsString
  • FIXED: Memory Leak in DTLazyImageView, using NSURLSession
  • FIXED: [Demo] When loading remote images the relayout needs to be done on next runloop
  • FIXED: Incorrect tabulator used for list items
  • FIXED: In default.css P tags had a -webkit-margin-before (which gets parsed since 1.6.18) causing superfluous extra space before paragraphs

Announcement: https://www.cocoanetics.com/2016/10/dtcoretext-1-6-19/

Version 1.6.18 - 2016-09-30 14:11:35

  • ADDED: tvOS Support
  • ADDED: Property to better support display remote images with DTAttributedTextCell
  • ADDED: Extension sub spec (which removes some things that cannot be used in Extensions)
  • ADDED: Parse margin-top as paragraphSpacingBefore
  • ADDED: Support for list style with roman numerals
  • ADDED: 10% performance increase parsing CSS styles that only have a single part
  • ADDED: Usage of custom font name via CSS in programming guide
  • FIXED: Potential crash on iOS 10 from more strict CoreText functions
  • FIXED: Crash when list-style-image was not a string
  • FIXED: Crash when comparing lines and one of them was nil
  • FIXED: Several Xcode 8 build warnings
  • FIXED: All deprecation warnings related to CoreText text alignment constants
  • FIXED: NSURLConnection deprecation by using NSURLSessionDataTask instead
  • FIXED: Deprecation warnings related to percentEncoding, replaced with HTML entity encoding
  • FIXED: Several Carthage build problems

Announcement: https://www.cocoanetics.com/2016/09/dtcoretext-1-6-18/

Version 1.6.17 - 2016-01-08 14:09:51


  • ADDED: Line truncation
  • ADDED: Minimum and maximum line heights
  • ADDED: Ability to change paragraph tag name
  • ADDED: Support for use in app extension
  • FIXED: Build error for integrating via sub-project
  • FIXED: CTLineUtils compiler warnings
  • FIXED: Setup Guide for sub-project integration
  • FIXED: Missing paragraph style for text attachments
  • CHANGED: Updated to DTFoundation 1.6.9

Annoucement: https://www.cocoanetics.com/2015/12/dtcoretext-1-6-17/

Version 1.6.16 - 2015-07-07 11:10:29

  • FIXED: Compatibility with CocoaPods 0.36 and frameworks
  • FIXED: Missing super calls in -awakeFromNib
  • FIXED: Dependency problems with DTWeakSupport.h
  • FIXED: Problem with "Cursive" tag and a Custom Font Cursive
  • FIXED: CGFloat values were used as bool values within if statements
  • FIXED: Additional CGFloat build issue on xCode 7
  • FIXED: Wrong foreground color attribute used for appending NL
  • FIXED: Xcode warning for unused expression result
  • FIXED: CGFloat build issue on xCode 7
  • ADDED: Honour the value of NSBaselineOffsetAttributeName
  • ADDED: DTCoreText.framework for iOS
  • ADDED: Improve AutoLayout in DTAttributedTextContentView
  • ADDED: DTDocumentPreserveTrailingSpaces boolean option

Announcement: https://www.cocoanetics.com/2015/07/dtcoretext-1-6-16/

Version 1.6.15 - 2015-02-19 14:06:50

  • FIXED: NULL dereference when CTLineCreateTruncatedLine fails
  • FIXED: UIColor would be set as CTForegroundColor in some cases, causing problems
  • FIXED: Possible exception 'Auto Layout still required after executing -layoutSubviews.'
  • CHANGED: Use defaultParagraphStyle rather than assert crash for DTUseiOS6Attributes option
  • CHANGED: DTFoundation updated to 1.7.5 (few minor fixes for DTHTMLParser)

Annoucement: https://www.cocoanetics.com/2015/02/dtcoretext-1-6-15/

Version 1.6.14 - 2014-10-17 18:45:02

  • FIXED: Parsing 2x Image in data URL causes it to double in size
  • FIXED: In Demo app, image elements seem to block scrolling in iOS 8
  • FIXED: Missing Helvetica Neue Italic font in iOS 7.0.x would cause crash
  • FIXED: Potential memory leak in -newMatchingFont
  • FIXED: Potential crash from iOS bug, calling -accessibilityElementAtIndex: with non-existing index
  • ADDED: Override -coretext-fontname to use direct "PostScript" names for fonts

Announcement: http://www.cocoanetics.com/2014/10/dtcoretext-1-6-14/

Version 1.6.13 - 2014-07-07 09:42:02

  • FIXED: Traditional margin-* style value following -webkit-margin-* reset margin values to 0
  • FIXED: iOS 8 crash resulting from Apple making CTRunGetPositionsPtr lazy
  • FIXED: HTML element with text attachment and display:none would emit extra object placeholder
  • FIXED: Child element with display:none would not be ignored when determining if parent needs to be output
  • FIXED: Animated GIF only showing first frame
  • FIXED: DTHTMLWriter does not output attachments
  • FIXED: Some build warnings from Xcode 6
  • CHANGED: Migrated unit testing to XCTest
  • CHANGED: DTFoundation updated to 1.7.1 (for animated GIF support)

Announcement: http://www.cocoanetics.com/2014/07/dtcoretext-1-6-13/

Version 1.6.12 - 2014-06-04 13:59:55

  • FIXED: Crash parsing background shorthand containing color
  • FIXED: Broken unit test for uncompressing background shorthand
  • FIXED: DTAttributeLabel doesn't use delegate methods to render text from truncationString param
  • FIXED: Links parsed from HTML are not recognized in UITextView (using NS-style attributes)
  • FIXED: Memory leak in -CGColor method on MacOSX target.
  • FIXED: lineHeightMultiple not being transferred to NSParagraphStyle
  • FIXED: Warnings related to disparities between properties and ivars
  • FIXED: Build issues because submodule did not include 32-bit slice
  • FIXED: Crash on iOS 5 due to unguarded selector calling
  • FIXED: Warning about deprecated methods using deployment target >= iOS 7
  • ADDED: Ability to specify default font face name
  • CHANGED: Updated DTFoundation to 1.7.0

Announcement: http://www.cocoanetics.com/2014/06/dtcoretext-1-6-12/

Version 1.6.11 - 2014-03-18 12:53:50

FIXED: Crash on 64-bit CPU if an element had no foreground color FIXED: CGColor sanity check randomly fails FIXED: Implicit conversion warnings in DTHTMLWriter FIXED: Analyzer warnings in DTHTMLWriter FIXED: Compatibility of NSColor for deployment targets prior to OS X 10.8 FIXED: Various documentation fixes CHANGED: Manual drawing of underlines removed as of iOS 7 CHANGED: Completeness of AppleDoc comments now part of unit tests ADDED: Options parameter to setting HTML string convenience method on DTAttributedTextCell ADDED: Support for CSS "background" shorthand ADDED: Screenshot button to Demo app ADDED: NSCoding support for DTTextAttachment, DTTextBlock and DTCSSListStyle

Announcement: http://www.cocoanetics.com/2014/03/dtcoretext-1-6-11/

Version 1.6.10 - 2014-03-18 12:38:41

  • FIXED: 64-bit macros for creating an NSNumber from CGFloat
  • FIXED: Path in podspec prepare_command breaks if CDPATH defined in shell
  • DOCS: Added explanation for lazy image loading to programming guide
  • ADDED: Support for border-color, -radius, -width for use with TTAttributedLabel
  • CHANGED: Updated DTFoundation to 1.6.1

Announcement: http://www.cocoanetics.com/2013/12/dtcoretext-1-6-10/

Version 1.6.9 - 2015-07-04 09:32:41

  • FIXED: Repackage headers needed from DTFoundation to static universal and Mac frameworks
  • FIXED: Duplicate symbol when using DTCoreText together with DTTransition pod
  • FIXED: Compiler warnings
  • FIXED: iOS 6-style attributes would not work on iOS 6 simulator
  • FIXED: Renamed instances of "class" to avoid conflict with C++ reserved word
  • FIXED: Method to set fallback font family would allow setting of invalid font family name
  • FIXED: Crash in DTAttributedTextContentView related to text box range finding
  • ADDED: BundleLoaderDummy to allow unit-testing code dealing UIFont
  • ADDED: arm64 support
  • ADDED: ability to determine attributed string size with unknown width
  • CHANGED: Updated DTFoundation requirement to 1.6.0

Announcement: http://www.cocoanetics.com/2013/11/dtcoretext-1-6-9/


Version 1.0.1 - 2013-10-04 17:57:52

  • Fixed Block-Retain-Cycle
  • Fixed a second minor retain-cycle
  • Workaround for Chinese Font cascade bug in iOS 5.x (radar://11262229)
  • Workaround for a CoreText memory leak in iOS 4.3 (fixed in 5.0)
  • Some Unit Testing corrections
  • Updated Readme regarding necessary linker flags

Announcement: http://www.cocoanetics.com/2012/04/dtcoretext-1-0-1-linker-flags-and-rich-text-news/

Version 1.1.0 - 2013-10-04 17:56:37

Switched to using multiple class clusters

Announcement: http://www.cocoanetics.com/2012/12/dtcoretext-1-1/

- 2013-10-04 17:55:28

  • ADDED: truncation support to DTCoreTextLayoutFrame
  • ADDED: DTAttributedLabel which can be used as a UILabel replacement
  • FIXED: GCD ARC errors and warnings with iOS 6 deployment target
  • CHANGED: DTAttributedTextView now uses the underlying UIScrollView contentInset
  • CHANGED: Improvements on DTAttributedTextView to prevent unnecessary re-layouting

Announcement: http://www.cocoanetics.com/2013/01/dtcoretext-1-2-0/

Version 1.4.0 - 2013-10-04 17:54:26

  • ADDED: Support for including local CSS style sheet files
  • ADDED: DTHTMLWriter can now write HTML fragments with inline styles
  • CHANGED: Changed the way color-changing hyperlinks are drawn, code now unified in DTCoreTextLayoutFrame
  • CHANGED: You no longer need an override plist, all available system fonts now get loaded into the override table automatically
  • CHANGED: renamed the define for showing performance measurement so that they don’t show in normal DEBUG mode
  • CHANGED: strike-through and underline is now properly positioned and sized
  • FIXED: Dictation Placeholder not displayed if no text delegate set
  • FIXED: Line truncation problem going for longer than the paragraph
  • FIXED: RTL justified text too short to be justified would be left-aligned instead of being right-aligned
  • FIXED: Problem parsing CSS styles containing a !important tag
  • FIXED: Using Chinese characters would cause height problems in hyperlinks
  • FIXED: Having text with a shadow would cause bolder text due to it being drawn twice
  • FIXED: Images don’t keep aspect ratio on resize
  • FIXED: Element hyperlink URL did not get copied to DTTextAttachment
  • FIXED: code removed by accident would cause problem with custom views for links
  • FIXED: HTML encoding for Emoji Characters
  • FIXED: Static Framework was not linking in code from DTFoundation
  • FIXED: Static Framework building was missing embedded DTHTMLParser

Announcement: http://www.cocoanetics.com/2013/04/rich-text-update-1-4/

Version 1.4.1 - 2013-10-04 17:53:10

  • FIXED: Parser ignoring align HTML attribute
  • FIXED: Helvetica appearing thinner than normal
  • FIXED: DTAttributedLabel truncation
  • CHANGED: Method of determining paragraph ranges
  • ADDED: Option to disable Apple-converted-space

Announcement: http://www.cocoanetics.com/2013/04/dtcoretext-1-4-2/

Version 1.4.2 - 2013-10-04 17:52:36

  • FIXED: DTWebVideoView for Daily Motion
  • FIXED: textAttachmentsWithPredicate: not returning all attachments for nil predicate
  • FIXED: further fixes for DTAttributedLabel truncation
  • FIXED: Issue with list attribute not including to final \n of empty LI.
  • FIXED: Disable cell reuse in Demo because of variable height you need to do your own cell caching
  • ADDED: Feature to scroll a range to visible
  • CHANGED: Disabled forcing of Times New Roman as font for bullets
  • CHANGED: Replaced synchronization in DTCoreTextLayoutLine with @synchronized

Announcement: http://www.cocoanetics.com/2013/04/dtcoretext-1-4-2/

Version 1.5.1 - 2013-10-04 17:49:40

  • FIXED: Attributes “bleeding” into next paragraph

Announcement: http://www.cocoanetics.com/2013/05/dtcoretext-1-5-2/

Version 1.5.2 - 2013-10-04 17:48:17

  • FIXED: Crash on parsing HTML with additional tags following HTML end tag
  • FIXED: DTAttributedLabel problems being instantiated from NIB, ignoring edge insets
  • FIXED: Crash on using font-family “inherit” together with font-variant “small-caps”.
  • FIXED: Endless loop when using a text block that would not fully fit in a height-constrained layout frame
  • FIXED: Image Attachment ignoring maximum display size if width/height are set via tag attributes
  • FIXED: Invalid font-size would cause Core Text font size of 12px to be used.
  • [Sponsored] CHANGED: Lists now correctly use padding and margin. If you specify too small a margin for the list prefix to fit, then the list prefix is omitted.

Announcement: http://www.cocoanetics.com/2013/05/dtcoretext-1-5-2/

Version 1.5.3 - 2013-10-04 17:47:05

  • FIXED: When encountering an unknown font family a NULL font would be returned, causing crashes in connection with lists
  • FIXED: Strings with attachments would not get a font assigned when using DTCoreText via CocoaPods
  • FIXED: DTHTMLWriter now properly escapes tab characters found in attributed strings
  • FIXED: Crash when encountering characters post end of closing HTML tag
  • FIXED: Loading available fonts into override table would lock on synchronize, causing a long delay for parsing
  • FIXED: sizeThatFits would return incorrect value for empty string
  • FIXED: Position of highlighting on RTL text was incorrect
  • ADDED: Delegates are now using zeroing weak references if permitted by the deployment target setting
  • ADDED: Documentation for DTTextAttachment to note that parsed attributes are lower-case
  • UPDATED: DTFoundation to 1.4.3

Announcement: http://www.cocoanetics.com/2013/06/dtcoretext-1-5-3/

Version 1.6.0 - 2013-10-04 17:46:02

  • CHANGED: The algorithm to place lines during typesetting is completely revamped. It is now modeled after how Safari does it.
  • ADDED: Basic Voice Over support
  • ADDED: Support for soft hyphens
  • ADDED: Delegate method that gets called before text is drawn so that you can draw beneath it
  • ADDED [SPONSORED]: Support for custom HTML attributes on text
  • FIXED: new typesetting algorithm fixes several issues with wildly changing line heights
  • FIXED: new typesetting algorithm fixes line height on wrapping lines
  • FIXED: new typesetting algorithm fixes line positioning using fixed line height in combination with text attachments
  • FIXED: DTHTMLWriter would emit multiple A tags if format changed inside the hyperlink

Announcement: http://www.cocoanetics.com/2013/07/dtcoretext-1-6/

Version 1.6.1 - 2013-10-04 17:45:10

  • FIXED: [DTHTMLWriter] did not output span styles (like background color) in fragment mode
  • FIXED: DTHTMLWriter did not output name of anchors if present
  • FIXED: DTHTMLWriter output base URL even if href property was nil
  • FIXED: DTTextAttachmentDrawing fixed to have non-flipped coordinate system
  • FIXED: Rotated images would show incorrectly oriented in DTTextAttachmentDrawing
  • ADDED [SPONSORED]: Method to determine string index based on touch coordinates
  • ADDED [SPONSORED]: DemoApp demonstrates getting the range of a tapped word
  • ADDED: DemoApp now has toggle to display output of DTHTMLWriter in fragment and document modes
  • CHANGED: Made processing of custom HTML Attributes optional, via new parsing option

Announcement: http://www.cocoanetics.com/2013/07/dtcoretext-1-6-1/

Version 1.6.2 - 2013-10-04 17:43:59

  • FIXED: Unable to run Demo App due to missing symbols
  • FIXED: Random issues with CocoaPods setup where DTHTMLParser subspec could not be found
  • FIXED: Hyphenated line has incorrect stringRange
  • FIXED: LineCreateJustifiedLine sometimes fails if the line ends with soft hyphen

Announcement: https://www.cocoanetics.com/2013/08/dtcoretext-1-6-2/

Version 1.6.3 - 2013-10-04 17:43:14

  • FIXED: Some UIKit calls might be occurring on background thread in DTLazyImageView
  • FIXED: Performance problem parsing HTML that had many encoded entities
  • FIXED: Typo in DTAttributedTextView’s contentViewDidLayout
  • FIXED: DTAttributedTextCell Crash on future iOS version
  • CHANGED: CSS Attribute Parser improved to better deal with multi-value attributes
  • CHANGED: Updated DTFoundation to 1.5.1
  • CHANGED: Updated pod spec for CocoaPods 0.23

Announcement: https://www.cocoanetics.com/2013/08/dtcoretext-1-6-3-dtrichtexteditor-1-6-2/

Version 1.6.4 - 2013-10-04 17:42:09

  • FIXED: Crash when having multiple font-families in the default style sheet
  • FIXED: Crash when encountering multiple font-families in one CSS style during parsing
  • FIXED: Specifying multi font-family entries does not find correct family if fall-back families are specified
  • FIXED: Race condition when using DTTextBlocks together with Tiled Layer
  • CHANGED: Removed CTParagraphStyle caching
  • ADDED: Workaround for rdar://14684188 (iOS 7)
  • ADDED: Adjust content inset in Demo for iOS 7
  • ADDED: Proper indenting of stacked text boxes
  • ADDED: Support for cascading CSS classes

Announcement: http://www.cocoanetics.com/2013/08/dtcoretext-1-6-4/