mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-09-08 09:20:49 +02:00
Cocoa: fix Font Orientation issue #40855 (by Johann)
This commit is contained in:
parent
c3411455ae
commit
41bcd7b0a5
@ -1801,7 +1801,6 @@ var
|
|||||||
RunCount: Integer;
|
RunCount: Integer;
|
||||||
Glyphs: array of CGGlyph;
|
Glyphs: array of CGGlyph;
|
||||||
RunFont: CTFontRef;
|
RunFont: CTFontRef;
|
||||||
transform: NSAffineTransform;
|
|
||||||
Dict: NSMutableDictionary;
|
Dict: NSMutableDictionary;
|
||||||
YPrime, StrikeH, StrikeW: CGFloat;
|
YPrime, StrikeH, StrikeW: CGFloat;
|
||||||
lForegroundColor: NSColor;
|
lForegroundColor: NSColor;
|
||||||
@ -1866,14 +1865,9 @@ begin
|
|||||||
ctx.setShouldAntialias(Font.Antialiased);
|
ctx.setShouldAntialias(Font.Antialiased);
|
||||||
if FFont.RotationDeg <> 0 then
|
if FFont.RotationDeg <> 0 then
|
||||||
begin
|
begin
|
||||||
transform := NSAffineTransform.transform;
|
CGContextTranslateCTM(cg, X, Y);
|
||||||
transform.translateXBy_yBy(X, Y);
|
CGContextRotateCTM(cg, -FFont.RotationDeg*Pi/180);
|
||||||
if ctx.isFlipped then
|
CGContextTranslateCTM(cg, -X, -Y);
|
||||||
transform.rotateByDegrees( FFont.RotationDeg )
|
|
||||||
else
|
|
||||||
transform.rotateByDegrees( -FFont.RotationDeg );
|
|
||||||
transform.translateXBy_yBy(-X, -Y);
|
|
||||||
transform.concat;
|
|
||||||
end;
|
end;
|
||||||
|
|
||||||
CGContextTranslateCTM(cg, 0, FSize.Height);
|
CGContextTranslateCTM(cg, 0, FSize.Height);
|
||||||
|
Loading…
Reference in New Issue
Block a user