mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-17 17:59:16 +02:00
synedit: applied patch #0012606: Carbon : Editor font rendering badly damaged for default font, point size 14 on PowerPC rev 17304 #80581bd7cb from Brad Campbell
git-svn-id: trunk@17319 -
This commit is contained in:
parent
632c4008bd
commit
838dd9d2c9
@ -395,6 +395,18 @@ end;
|
|||||||
{$ENDIF}
|
{$ENDIF}
|
||||||
{$ENDIF}
|
{$ENDIF}
|
||||||
|
|
||||||
|
{$IFDEF SYN_LAZARUS}
|
||||||
|
function GetStyleIndex(Value: TFontStyles): Integer;
|
||||||
|
var
|
||||||
|
item: TFontStyle;
|
||||||
|
begin
|
||||||
|
result := 0;
|
||||||
|
for item := low (TFontStyle) to high(TFontStyle) do
|
||||||
|
if item in Value then
|
||||||
|
result := result + 1 shr ord(item);
|
||||||
|
end;
|
||||||
|
{$ENDIF}
|
||||||
|
|
||||||
{ TheFontsInfoManager }
|
{ TheFontsInfoManager }
|
||||||
|
|
||||||
procedure TheFontsInfoManager.LockFontsInfo(
|
procedure TheFontsInfoManager.LockFontsInfo(
|
||||||
@ -873,7 +885,11 @@ begin
|
|||||||
{$ELSE}
|
{$ELSE}
|
||||||
ASSERT(SizeOf(TFontStyles) = 1);
|
ASSERT(SizeOf(TFontStyles) = 1);
|
||||||
{$ENDIF}
|
{$ENDIF}
|
||||||
|
{$IFDEF SYN_LAZARUS}
|
||||||
|
idx := GetStyleIndex(Value);
|
||||||
|
{$ELSE}
|
||||||
idx := PByte(@Value)^;
|
idx := PByte(@Value)^;
|
||||||
|
{$ENDIF}
|
||||||
ASSERT(idx <= High(TheStockFontPatterns));
|
ASSERT(idx <= High(TheStockFontPatterns));
|
||||||
|
|
||||||
UseFontHandles;
|
UseFontHandles;
|
||||||
@ -1202,7 +1218,11 @@ procedure TheTextDrawer2.SetStyle(Value: TFontStyles);
|
|||||||
var
|
var
|
||||||
idx: Integer;
|
idx: Integer;
|
||||||
begin
|
begin
|
||||||
|
{$IFDEF SYN_LAZARUS}
|
||||||
|
idx := GetStyleIndex(Value);
|
||||||
|
{$ELSE}
|
||||||
idx := PByte(@Value)^;
|
idx := PByte(@Value)^;
|
||||||
|
{$ENDIF}
|
||||||
if FFonts[idx] <> 0 then
|
if FFonts[idx] <> 0 then
|
||||||
begin
|
begin
|
||||||
FCrntFont := FFonts[idx];
|
FCrntFont := FFonts[idx];
|
||||||
|
Loading…
Reference in New Issue
Block a user