synedit: less hints

git-svn-id: trunk@36050 -
This commit is contained in:
mattias 2012-03-15 23:07:19 +00:00
parent c370aa5db5
commit 17e13a48b2

View File

@ -539,9 +539,9 @@ Procedure TheFontStock.CalcFontAdvance(DC: HDC; FontData: PheFontData;
s1 := s; s1 := s;
s2 := s1 + s; s2 := s1 + s;
s3 := s2 + s; s3 := s2 + s;
if not(GetTextExtentPoint(DC, PChar(s1), 1, Size1) and if not(GetTextExtentPoint(DC, PChar(s1), 1, Size1{%H-}) and
GetTextExtentPoint(DC, PChar(s2), 2, Size2) and GetTextExtentPoint(DC, PChar(s2), 2, Size2{%H-}) and
GetTextExtentPoint(DC, PChar(s3), 3, Size3)) then GetTextExtentPoint(DC, PChar(s3), 3, Size3{%H-})) then
begin begin
DebugFont('Failed to get GetTextExtentPoint for %s', [s1]); DebugFont('Failed to get GetTextExtentPoint for %s', [s1]);
w := 0; w := 0;
@ -643,7 +643,7 @@ begin
AdjustWHOForChar('''', Width, Height, OverHang, ETO); AdjustWHOForChar('''', Width, Height, OverHang, ETO);
// Negative Overhang ? // Negative Overhang ?
if (not ETO) and GetTextExtentPoint(DC, PChar('Ta'), 2, Size1) then if (not ETO) and GetTextExtentPoint(DC, PChar('Ta'), 2, Size1{%H-}) then
if Size1.cx < 2 * Width then begin if Size1.cx < 2 * Width then begin
{$IFDEF SYNFONTDEBUG} {$IFDEF SYNFONTDEBUG}
DebugFont('Negative Overhang for "Ta" cx=%d Width=%d Overhang=%d', [Size1.cx, Width, OverHang]); DebugFont('Negative Overhang for "Ta" cx=%d Width=%d Overhang=%d', [Size1.cx, Width, OverHang]);
@ -656,7 +656,7 @@ begin
Height := Max(Height, Size1.cy); Height := Max(Height, Size1.cy);
// DoubleCheck the result with GetTextMetrics // DoubleCheck the result with GetTextMetrics
GetTextMetrics(DC, TM); GetTextMetrics(DC, TM{%H-});
{$IFDEF SYNFONTDEBUG} {$IFDEF SYNFONTDEBUG}
DebugFont('TextMetrics tmHeight=%d, tmAve=%d, tmMax=%d, tmOver=%d', [TM.tmHeight, TM.tmAveCharWidth, TM.tmMaxCharWidth, TM.tmOverhang]); DebugFont('TextMetrics tmHeight=%d, tmAve=%d, tmMax=%d, tmOver=%d', [TM.tmHeight, TM.tmAveCharWidth, TM.tmMaxCharWidth, TM.tmOverhang]);
{$ENDIF} {$ENDIF}