Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions SynPdf.pas
Original file line number Diff line number Diff line change
Expand Up @@ -10350,7 +10350,7 @@ procedure DrawLine(var P: TPoint; aH: Single);
with DC[nDC] do begin
tmp := Pen;
pen.color := font.color;
pen.width := aSize / 15 / Canvas.GetWorldFactorX / Canvas.FDevScaleX;
pen.width := aSize / 15 / fscaleY;
pen.style := PS_SOLID;
pen.null := False;
NeedPen;
Expand Down Expand Up @@ -10421,7 +10421,7 @@ procedure DrawLine(var P: TPoint; aH: Single);
if AUseDX then begin
DX := pointer(PtrUInt(@R)+R.emrtext.offDx);
W := DXTextWidth(DX, R.emrText.nChars);
if W<R.rclBounds.Right-R.rclBounds.Left then // offDX=0 or within box
if W < Trunc((R.rclBounds.Right-R.rclBounds.Left) / Canvas.FFactorX) then // offDX=0 or within box
DX := nil;
end else
DX := nil;
Expand Down Expand Up @@ -10607,9 +10607,9 @@ procedure DrawLine(var P: TPoint; aH: Single);
end;
// handle underline or strike out styles (direct draw PDF lines on canvas)
if font.LogFont.lfUnderline<>0 then
DrawLine(Posi, aSize / 8 / Canvas.GetWorldFactorX / Canvas.FDevScaleX);
DrawLine(Posi, aSize / 8 / fscaleY);
if font.LogFont.lfStrikeOut<>0 then
DrawLine(Posi, - aSize / 3 / Canvas.GetWorldFactorX / Canvas.FDevScaleX);
DrawLine(Posi, - aSize / 4 / fscaleY);
// end any pending clipped TextRect() region
if WithClip then begin
Canvas.GRestore;
Expand Down