[ASTextNode] italic text clipping bug
ASDK render graphic context (which text kit draws on) into a uiimage, and that may cause text to be clipped if it's outside of view's bounds.
For instance, the left side is clipped in the following italic text

@Yue-Wang-Google On what version are you on? Is it master?
The problem appears on all versions. it's on 1.9.8, and on an internal cut dated back from March. You can use any word start with italic "j" to reproduce the problem.
It's not a textnode specific problem. It's how ASDK render things internally --- The graphic context will be convert to a UIImage with the same size of the node, from which process it got clipped.
@Yue-Wang-Google I built a reproduction case and it appears that the UIImage that ASDK generates is the same size (rounded to pixels up) as the size returned by usedRectForTextContainer: (called on NSLayoutManager). This is still obviously an issue, just trying to confirm that I'm working on the same bug you're reporting :)
Specifically, NSLayoutManager is reporting an incorrect size for italicized text.
yes. that's the bug I was reporting.
usedRectForTextContainer: does not do glyph generation. So I assume it can't be used to calculate image bounds, which is different from typographic bounds.
Got it, thank you. We'll need to figure out another way to generate the image bounds.
@Yue-Wang-Google the plot thickens: this is the exact same behavior of a UILabel even with clipsToBounds set to NO.

Other's appear to attempt to workaround the issue in UILabel: http://stackoverflow.com/questions/20985085/uilabel-clipping-italic-oblique-text-at-left-and-right-edges-of-content-ios
I bet this is a bug in NSLayoutManager, since this is drawing happening inside of it. Another one - is the height ascender/descender underestimation where NSLayoutManager actually returns the incorrect height (usually cutoff by half a point), as can be observed in #637
This makes me think this #2000 may be necessary. I'll look into that to see if it can address the issue.
@nlutsenko I'm not sure they perceive it as a bug – I think it's meant to return the sizing of a view for layout and alignment. The actual rendering may exceed its bounds.
Resolved via #2062