瀏覽代碼

release PDF file issue(narrow font)

TonyKang 8 年之前
父節點
當前提交
400c6914f9
共有 2 個文件被更改,包括 24 次插入5 次删除
  1. 3 2
      Forms/ReportsFrm.dfm
  2. 21 3
      Forms/ReportsFrm.pas

+ 3 - 2
Forms/ReportsFrm.dfm

@@ -2510,7 +2510,7 @@ object ReportsForm: TReportsForm
     Left = 184
     Top = 76
     Bitmap = {
-      494C010108000900040010001000FFFFFFFFFF00FFFFFFFFFFFFFFFF424D3600
+      494C010108000900040010001000FFFFFFFFFF10FFFFFFFFFFFFFFFF424D3600
       0000000000003600000028000000400000003000000001002000000000000030
       0000000000000000000000000000000000000000000000000000000000000000
       0000000000000000000000000000000000000000000000000000000000000000
@@ -2910,7 +2910,8 @@ object ReportsForm: TReportsForm
       8001800180008000800180008000800080008000800080008001800080008000
       8001800180018001800180018001800180018001800180018001800180018001
       8001800180018001800180018001800180018001800180018001800180018001
-      8001800180018001FFFFFFFFFFFFFFFF}
+      8001800180018001FFFFFFFFFFFFFFFF00000000000000000000000000000000
+      000000000000}
   end
   object BatchPrintXml: TPrintComXML
     PreviewRows = 1

+ 21 - 3
Forms/ReportsFrm.pas

@@ -762,11 +762,29 @@ begin
         contentFontRec.FontHeight := Round(ReportConfig.ContentFont.Size*4/3);
       end else if (isPrinting) then
       begin
-        contentFontRec.FontName := 'Arial Narrow';
-        contentFontRec.FontHeight := Round(ReportConfig.ContentFont.Size*4/3) * 7 div 6;
+        if (dataType = DATA_TYPE_DOUBLE) or (dataType = DATA_TYPE_FLOAT) then
+        begin
+          contentFontRec.FontName := 'Arial Narrow';
+          contentFontRec.FontHeight := Round(ReportConfig.ContentFont.Size*4/3) * 7 div 6;
+        end else
+        begin
+          contentFontRec.FontName := ReportConfig.ContentFont.Name;
+          contentFontRec.FontHeight := Round(ReportConfig.ContentFont.Size*4/3);
+        end;
+//        contentFontRec.FontName := 'Arial Narrow';
+//        contentFontRec.FontHeight := Round(ReportConfig.ContentFont.Size*4/3) * 7 div 6;
       end else
       begin
-        contentFontRec.FontHeight := Round(ReportConfig.ContentFont.Size*4/3) * 4 div 3;
+        if (dataType = DATA_TYPE_DOUBLE) or (dataType = DATA_TYPE_FLOAT) then
+        begin
+          contentFontRec.FontName := 'Arial Narrow';
+          contentFontRec.FontHeight := Round(ReportConfig.ContentFont.Size*4/3) * 4 div 3;
+        end else
+        begin
+          contentFontRec.FontName := ReportConfig.ContentFont.Name;
+          contentFontRec.FontHeight := Round(ReportConfig.ContentFont.Size*4/3);
+        end;
+//        contentFontRec.FontHeight := Round(ReportConfig.ContentFont.Size*4/3) * 4 div 3;
       end;
     end;
   end;