add ASTextKitFontSizeAdjuster

This commit is contained in:
Luke Zhao
2016-01-20 16:28:46 -08:00
parent 882379a820
commit f413a618e0
8 changed files with 175 additions and 2 deletions

View File

@@ -81,6 +81,10 @@ struct ASTextKitAttributes {
The radius that should be applied to the shadow blur. Larger values mean a larger, more blurred shadow.
*/
CGFloat shadowRadius;
/**
The minimum scale that the textnode can apply to fit long words in constrained size.
*/
CGFloat minimumScaleFactor;
/**
A pointer to a function that that returns a custom layout manager subclass. If nil, defaults to NSLayoutManager.
*/
@@ -103,6 +107,7 @@ struct ASTextKitAttributes {
[shadowColor copy],
shadowOpacity,
shadowRadius,
minimumScaleFactor,
layoutManagerFactory
};
};
@@ -114,6 +119,7 @@ struct ASTextKitAttributes {
&& maximumNumberOfLines == other.maximumNumberOfLines
&& shadowOpacity == other.shadowOpacity
&& shadowRadius == other.shadowRadius
&& minimumScaleFactor == other.minimumScaleFactor
&& layoutManagerFactory == other.layoutManagerFactory
&& CGSizeEqualToSize(shadowOffset, other.shadowOffset)
&& _objectsEqual(exclusionPaths, other.exclusionPaths)