Quickreport forum
Go to Quickreport website
Welcome Guest Search | Active Topics | Log In | Register

suggestions and fixes
sender
#1 Posted : 17 April 2017 16:30:42(UTC)
Rank: Newbie

Groups: Registered
Joined: 17/04/2017(UTC)
Posts: 1
Location: China

Thanks: 0 times
Was thanked: 0 time(s) in 0 post(s)
I have 2 suggestions and fixes to QuickReport 5.06.

1. QuickReport is using "font size" which is a positive value to set the font size. But in chinese font family like using "Simsun.ttf", a character with font.size=11 actually has 2 font.height values, -14 and -15. The cause is the "Internal Leading" of the font by Microsoft. The difference between these 2 font.height leads to incorrect rendering of the report content (most about font alignment). So, I suggest to use font.height to set font size. For the compatibility to previous report, quickreport should determine the value of the "FontSize" property, if it's a positive value, set it to font.size, but if it's a negative value, set it to font.height. The modification is simple, as:

in qrctrls.pas,

procedure TQRCustomLabel.WriteFontSize(Writer : TWriter);
begin
Writer.WriteInteger(Font.Height); // SXD: change to save font.height
end;

procedure TQRCustomLabel.Loaded;
begin
inherited Loaded;
if FFontSize > 0 then
Font.Size := FFontSize
else if FFontSize < 0 then // SXD: if this is a negative value, set it to font.height
Font.Height := FFontSize;
end;


2. in the latest build 48, quickrpt.pas, line #1884, the condition "ParentReport.Bands.ColumnHeaderBand.Enabled" should be removed. The reason to do so is if the columnheaderband is disabled at the very beginning, It won't get any chance to appear in the report later. Here is what I did:

if (ParentReport.Bands.ColumnHeaderBand <> nil) {sxd: and ParentReport.Bands.ColumnHeaderBand.Enabled} then


Users browsing this topic
Guest
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

Clean Slate theme by Jaben Cargman (Tiny Gecko)
Powered by YAF 1.9.4 | YAF © 2003-2010, Yet Another Forum.NET
This page was generated in 0.030 seconds.