In my main rve I am now using DocumentPixelsPerInch and no longer setting overall font size(s) as a "zoom." I would like to maintain the approximate overall text size or "zoom" when printing. I've tried the following ("memo" is my rve, rvs is its RVStyle):
Code: Select all
memo.DocumentPixelsPerInch := rve.DocumentPixelsPerInch;
rvs.UnitsPixelsPerInch := rve.DocumentPixelsPerInch;
rvs.TextStyles[0].Size := 48;
I set this up this way for now. I added 2 buttons to my print preview form, one to make the font larger, one smaller.
Code: Select all
procedure TFormPrintPreview.SRDCvsFontLargerMouseUp(Sender: TObject;
Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
var
i, i2: integer;
begin
if Button = mbRight then exit;
for i := 0 to RVPrint1.rv.Style.TextStyles.Count-1 do
RVPrint1.rv.Style.TextStyles[i].Size := RVPrint1.rv.Style.TextStyles[i].Size + 2;
for i := 0 to RVPrint1.rv.Style.ListStyles.Count - 1 do
begin
for i2 := 0 to RVPrint1.rv.Style.ListStyles[i].Levels.Count-1 do
RVPrint1.rv.Style.ListStyles[i].Levels[i2].Font.Size :=
RVPrint1.rv.Style.ListStyles[i].Levels[i2].Font.Size + 2;
end;
RVPrint1.FormatPages( rvdoALL );
RVPrintPreview1.Repaint ;
end;
Thanks Sergey.
Stan