Ad

Our DNA is written in Swift
Jump

DTCoreText 1.6.5

This is a maintenance release addressing several crashing problems.

 Changes

  • FIXED: Crash encountering empty text block
  • FIXED: Crash encountering ARGB color in CSS
  • ADDED: More general support for CSS cascading
  • ADDED: Programming Guide
  • ADDED: Documentation for enums

There where some issues necessary that were still a knock on effect of changing the CSS attribute parsing in 1.6.3 to also return arrays for things like a comma-separated list of font families. This also caused the ARGB issue since there were also commas. While fixing this – again – Amro Mousa made the CSS cascading even more general.

Here’s a comparison of cascaded CSS attributes between Safari and DTCoreText.

Safari versus DTCoreText

24df2be0-0687-11e3-8203-948a984e68df

Awesome work, Amro! Those look darn near identical to me. (see the pull request for the HTML behind this)

I needed to update the documentation to – finally! – include enums as AppleDoc supports them now. Since this couldn’t deal with the previous way I defined them I also changed them to be using Apple’s NS_ENUM macro to give them an underlying type.

/**
 The drawing options for DTCoreTextLayoutFrame
 */
typedef NS_ENUM(NSUInteger, DTCoreTextLayoutFrameDrawingOptions)
{
	/**
	 The default method for drawing draws links and attachments. Links are drawn non-highlighted
	 */
	DTCoreTextLayoutFrameDrawingDefault              = 1<<0,
 
	/**
	 Links are not drawn, e.g. if they are displayed via custom buttons
	 */
	DTCoreTextLayoutFrameDrawingOmitLinks            = 1<<1,
 
	/**
	 Text attachments are omitted from drawing, e.g. if they are displayed via custom views
	 */
	DTCoreTextLayoutFrameDrawingOmitAttachments      = 1<<2,
 
	/**
	 If links are drawn they are displayed with the highlighted variant
	 */
	DTCoreTextLayoutFrameDrawingDrawLinksHighlighted = 1<<3
};

This adds a new section in the documentation for the enums as well. And while I was at it I also added a programming guide document where I plan to add common programming examples when I need to explain something. I added the smoke test example from the setup guide and also added information about pre-loading the font override table to speed up the first layout of DTCoreText considerably.

The update is tagged on GitHub as well as available via CocoaPods.


Tagged as:

Categories: Updates

3 Comments »