lmi-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[lmi-commits] [lmi] master 5f53cca 2/9: Appropriately treat font sizes a


From: Greg Chicares
Subject: [lmi-commits] [lmi] master 5f53cca 2/9: Appropriately treat font sizes as static data
Date: Wed, 19 Sep 2018 09:19:33 -0400 (EDT)

branch: master
commit 5f53cca8cec0953fe72b11abb794ff38b34e32fe
Author: Gregory W. Chicares <address@hidden>
Commit: Gregory W. Chicares <address@hidden>

    Appropriately treat font sizes as static data
---
 ledger_pdf_generator_wx.cpp | 12 ++++--------
 1 file changed, 4 insertions(+), 8 deletions(-)

diff --git a/ledger_pdf_generator_wx.cpp b/ledger_pdf_generator_wx.cpp
index fac2ecf..0b98353 100644
--- a/ledger_pdf_generator_wx.cpp
+++ b/ledger_pdf_generator_wx.cpp
@@ -741,13 +741,7 @@ class pdf_illustration : protected html_interpolator, 
protected pdf_writer_wx
   public:
     explicit pdf_illustration(Ledger const& ledger, fs::path const& 
pdf_out_file)
         :html_interpolator {ledger.make_evaluator()}
-        // Use non-default font sizes that are used to make the new
-        // illustrations more similar to the previously existing ones.
-        ,pdf_writer_wx
-            (pdf_out_file.string()
-            ,wxPORTRAIT
-            ,{8, 9, 10, 12, 14, 18, 20}
-            )
+        ,pdf_writer_wx     (pdf_out_file.string(), wxPORTRAIT, font_sizes_)
         ,ledger_           {ledger}
     {
         init_variables();
@@ -958,9 +952,11 @@ class pdf_illustration : protected html_interpolator, 
protected pdf_writer_wx
             );
     }
 
-    // Source of the data.
     Ledger const& ledger_;
 
+    // These font sizes differ from wxHTML defaults.
+    static inline html_font_sizes font_sizes_ {8, 9, 10, 12, 14, 18, 20};
+
     // All the pages of this illustration.
     std::vector<std::unique_ptr<logical_page>> pages_;
 };



reply via email to

[Prev in Thread] Current Thread [Next in Thread]