Skip to content
This repository has been archived by the owner on Feb 2, 2023. It is now read-only.

Possible fix for text node truncation issue #462

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 2 additions & 2 deletions AsyncDisplayKit/Details/ASTextNodeWordKerner.m
Expand Up @@ -31,7 +31,7 @@ - (NSUInteger)layoutManager:(NSLayoutManager *)layoutManager shouldGenerateGlyph
continue;

// If we've set the whitespace control character for this space already, we have nothing to do.
if (properties[arrayIndex] == NSGlyphPropertyControlCharacter) {
if (properties[arrayIndex] == NSGlyphPropertyElastic) {
usesWordKerning = YES;
continue;
}
Expand All @@ -43,7 +43,7 @@ - (NSUInteger)layoutManager:(NSLayoutManager *)layoutManager shouldGenerateGlyph
}

// It's a space. Make it a whitespace control character.
newGlyphProperties[arrayIndex] = NSGlyphPropertyControlCharacter;
newGlyphProperties[arrayIndex] = NSGlyphPropertyElastic;
}

// If we don't have any custom glyph properties, return 0 to indicate to the layout manager that it should use the standard glyphs+properties.
Expand Down