You are not logged in.
Pages: 1
Hi,
I detect a problem when SetWordSpace is called in function TextOut in SynPdf.pas (line 8908).
After WordSpace is set, it's set to all following elements.
to fix this :
if Canvas.fUseSetTextJustification and (nspace>0) and ((W-measW)>(nspace*2)) then
// we should have had a SetTextJustification() call -> modify word space
with Canvas do
SetWordSpace(((W-measW) * fscaleX)/nspace)
else begin
Canvas.SetWordSpace(0);
// check if DX[] width differs from PDF width
nspace := 0;
hscale := (W*100) / measW;
I add SetWordSpace(0) in else condition.
and in SetWordSpace function :
procedure TPdfCanvas.SetWordSpace(wordSpace: Single);
begin
//if FPage.WordSpace=wordSpace then Exit;
FPage.SetWordSpace(wordSpace);
if FContents<>nil then
FContents.Writer.AddWithSpace(wordSpace).Add('Tw'#10);
end;
If you have a better solution...
Fabien.
Offline
Pages: 1