You are not logged in.
Pages: 1
Look in SynPdf.pas at TPdfEnum.TextOut
To get better results if positioning method is tpSetTextJustification, rendering should switch to tpExactTextCharacterPositining if special char spacing is used.
if R.emrtext.offDx>0 then begin
DX := pointer(PtrUInt(@R)+R.emrtext.offDx);
W := DXTextWidth(DX, R.emrText.nChars);
//BS.2015.03.21. - Start
if Positioning=tpSetTextJustification then
Positioning := tpExactTextCharacterPositining;
//BS.2015.03.21. - End
if W<R.rclBounds.Right-R.rclBounds.Left then // offDX=0 or within box
DX := nil;
end else
DX := nil;
Best regards
Sándor Bógáncs
Offline
Isn't it what tpExactTextCharacterPositining is for?
In practice, I do not see any benefit of this patch.
It will just bypass tpSetTextJustification, and replace it by tpExactTextCharacterPositining, for most generated text...
What is wrong with using tpExactTextCharacterPositining for the whole conversion?
Offline
Using exact position result the following:
As you can see the space betweeen the letters are different and the document looks ugly. The only way to keep it looking good is using SetTextJustification. But it doesn't handle character spacing. This is why I switched to the exact method in this case.
If you have any idea how to fix the character shifting problem, please let me know. It is important, that I'm using fastreport to generate PDF with the component posted in this forum.
Offline
Pages: 1