瀏覽代碼

report, string, forbid narrow

MaiXinRong 8 年之前
父節點
當前提交
24c2d52851
共有 3 個文件被更改,包括 37 次插入7 次删除
  1. 1 1
      Forms/ReportsFrm.dfm
  2. 18 3
      Forms/ReportsFrm.pas
  3. 18 3
      Forms/SignOnlineReportsFrm.pas

+ 1 - 1
Forms/ReportsFrm.dfm

@@ -216,7 +216,7 @@ object ReportsForm: TReportsForm
     Font.Charset = DEFAULT_CHARSET
     Font.Color = clWindowText
     Font.Height = -12
-    Font.Name = #24494#36719#38597#40657
+    Font.Name = 'Microsoft YaHei UI'
     Font.Style = []
     Bars = <
       item

+ 18 - 3
Forms/ReportsFrm.pas

@@ -760,11 +760,26 @@ 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;
       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;
       end;
     end;
   end;

+ 18 - 3
Forms/SignOnlineReportsFrm.pas

@@ -876,11 +876,26 @@ 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;
       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;
       end;
     end;
   end;