mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-06 09:05:58 +02:00
SynEdit: TextLayout added debug output
git-svn-id: trunk@19944 -
This commit is contained in:
parent
b6d242fa96
commit
2607eec3c3
@ -565,8 +565,10 @@ Procedure TheFontStock.CalcFontAdvance(DC: HDC; FontData: PheFontData;
|
|||||||
|
|
||||||
Procedure DebugFont(s: String; a: array of const);
|
Procedure DebugFont(s: String; a: array of const);
|
||||||
begin
|
begin
|
||||||
if FontData^.Font <> nil then
|
if FontData^.Font <> nil then begin
|
||||||
|
if FontData^.Font.Size = 0 then exit;
|
||||||
s := 'Font=' + FontData^.Font.Name + ' Size=' + IntToStr(FontData^.Font.Size) + ' ' + s;
|
s := 'Font=' + FontData^.Font.Name + ' Size=' + IntToStr(FontData^.Font.Size) + ' ' + s;
|
||||||
|
end;
|
||||||
s := 'TheFontStock.CalcFontAdvance: ' + s;
|
s := 'TheFontStock.CalcFontAdvance: ' + s;
|
||||||
DebugLn(Format(s, a));
|
DebugLn(Format(s, a));
|
||||||
end;
|
end;
|
||||||
@ -608,8 +610,9 @@ Procedure TheFontStock.CalcFontAdvance(DC: HDC; FontData: PheFontData;
|
|||||||
if (w2 = w) and (w3 = w) then exit;
|
if (w2 = w) and (w3 = w) then exit;
|
||||||
|
|
||||||
if (w2 <= w) and (w3 <= w) then begin
|
if (w2 <= w) and (w3 <= w) then begin
|
||||||
// w includes overhang
|
// w includes overhang (may be fractional
|
||||||
if w2 <> w3 then begin
|
if w2 <> w3 then begin
|
||||||
|
{$IFNDEF SYNFONTDEBUG} if abs(w3-w2) > 1 then {$ENDIF}
|
||||||
DebugFont('Variable Overhang w=%d w2=%d w3=%d', [w, w2, w3]);
|
DebugFont('Variable Overhang w=%d w2=%d w3=%d', [w, w2, w3]);
|
||||||
w2 := Max(w2, w3);
|
w2 := Max(w2, w3);
|
||||||
end;
|
end;
|
||||||
|
Loading…
Reference in New Issue
Block a user