I think the change that is actually making the difference might be the changes to TCocoaContext.GetTextExtentPoint().
The original code, before any of our cocoagdiobjects.pas patches were applied created an NSMutableAttributedString, set the current font and then used:
r :=M.boundingRectWithSize_options(NSMakeSize(Maxint, Maxint), 0);
height := ROund(r.size.height).
New code uses CTLineGetTypographicBounds() and then
height := Round(ascent + abs(descent) + lead);
I put the boundingRectwithsize() code back in and checked the two different results before they were rounded.
For one font I got
original code: height = 17.0 , new code: height = 15.31
for another font:
original code: height = 16.0 , new code: height = 14.13
and
original code: height = 14.0 , new code: height = 12.96.
This is important, I believe, because SynEdit spaces its text lines by
FTextHeight := CharHeight + FCurrentExtraLineSpace. Where CharHeight initial calculation is based on calling GetTextExtentPoint.
I could not repeat the clipping you were seeing when I compiled Laz IDE at first. But if I went into preferences and changed Current Extra Line Space and made it smaller then I did get clipping. You can probably make your clipping go away by increasing Current Extra Line Space.
You could also test this by removing the +1 in .TextOUt and instead doing a +1 on the height returned in GetTextExtentPoint().
That's my theory. This issue is that I spent particular time trying to get GetTextExtentPoint() correct. This is the second patch I sent in. The initial patch had replaced the NSMutableAttributedString call and was using CTLineGetBoundswithOptions() instead. I looked the height value returned for CTLineGetBOundsWithOptions() and noticed that it was larger than ascent+descent+lead. I haven't checked this but is probably pretty close to what the NSMutableAttributedString.boundRectWithSize.
I wasn't sure which of the values was correct. The one that matched ascent+descent+lead (which is what GetTextMetrics returns) or the larger values from the two functions that returned bounds.
So I went and looked at what windows GetTextExtentPoint returns. It appears to me that GetTextExtentPoint() on windows returns ascent+descent+lead. And the GetTextMetrics on windows also returns that same value for Tm.height.
So my last patch made GetTextExtentPoint() return a height that matches what I saw Windows doing. That value IS smaller than previous code and could well be what is causing the difference you are seeing.
If ascent+descent+lead is not the correct value for GetTextExtentPoint() to return for height and if that is what is causing the SynEdit clipping you are seeing then I suggest reverting my last patch on cocoagdiobjects.pas and seeing if that fixes the problem.