mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-16 17:29:31 +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}
|
||||
|
||||
{$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 }
|
||||
|
||||
procedure TheFontsInfoManager.LockFontsInfo(
|
||||
@ -873,7 +885,11 @@ begin
|
||||
{$ELSE}
|
||||
ASSERT(SizeOf(TFontStyles) = 1);
|
||||
{$ENDIF}
|
||||
{$IFDEF SYN_LAZARUS}
|
||||
idx := GetStyleIndex(Value);
|
||||
{$ELSE}
|
||||
idx := PByte(@Value)^;
|
||||
{$ENDIF}
|
||||
ASSERT(idx <= High(TheStockFontPatterns));
|
||||
|
||||
UseFontHandles;
|
||||
@ -1202,7 +1218,11 @@ procedure TheTextDrawer2.SetStyle(Value: TFontStyles);
|
||||
var
|
||||
idx: Integer;
|
||||
begin
|
||||
{$IFDEF SYN_LAZARUS}
|
||||
idx := GetStyleIndex(Value);
|
||||
{$ELSE}
|
||||
idx := PByte(@Value)^;
|
||||
{$ENDIF}
|
||||
if FFonts[idx] <> 0 then
|
||||
begin
|
||||
FCrntFont := FFonts[idx];
|
||||
|
Loading…
Reference in New Issue
Block a user