Skip to content

Please Help Test for 1.5 Release #429

Closed
odrobnik opened this Issue May 4, 2013 · 0 comments

1 participant

@odrobnik
odrobnik commented May 4, 2013

The current develop branch is about to become the 1.5 release. There are some potentially breaking changes in there plus some new APIs.

DTTextAttachment Class Cluster + Custom Attachments

The one thing that earned this release the tag "breaking" is that the type property of DTTextAttachment has been removed. All the various attachment types are now subclasses of DTTextAttachment. There is no longer a content property. Instead the DTImageTextAttachment has an image property.

There are two no protocols on text attachment, DTTextAttachmentDrawing and DTTextAttachmentHTMLPersistence. Those are primarily of interest if you want to implement your own custom attachments. The drawing protocol allows you to draw the contents of the attachment inline with the inline drawing option on when drawing a layout frame. The HTML persistence protocol allows you to represent your own object in HTML output by DTHTMLWriter

There is a new API registerClass:forTagName: which creates your own custom attachment subclass when seeing this in HTML. With this you can for example support a custom <oli name="boa"> tag.

Convenient Querying of Attributes

I also introduced a new category NSDictionary (DTCoreText) which adds convenient methods for interacting with an attribute dictionary, e.g. find out if text is bold or retrieve the foreground color without having to worry how it is represented in the dictionary.

This category originally was used in DTRichTextEditor but I felt that it is of much broader usefulness, especially with some of the methods being smart about how a color or font might be represented in the attributes.

New API

For example you can now get the glyph paths. There are some improvements related to RTL text handling. DTCoreTextGlyphRun now gets the information if it is RTL oriented straight from the CTRun. Also DTHTMLWriter will output dir="auto" on all paragraphs where the paragraphStyle's baseWritingDirection is "natural".

Please Help

I need you to help me test these changes by switching your git submodule to point to the latest develop branch. Then walk through the warnings and errors you might get in your code and update these parts.

If you find something not working, then please file an issue.

If there are no complaints, I'll tag and release 1.5.

@odrobnik odrobnik closed this May 8, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.