[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [lmi] Group-quote PDF: whitespace changes, and enhancement
From: |
Vadim Zeitlin |
Subject: |
Re: [lmi] Group-quote PDF: whitespace changes, and enhancement |
Date: |
Thu, 8 Mar 2018 13:46:53 +0100 |
On Thu, 8 Mar 2018 10:36:58 +0000 Greg Chicares <address@hidden> wrote:
GC> On 2018-03-01 18:36, Greg Chicares wrote:
GC> > On 2018-03-01 18:21, Greg Chicares wrote:
GC> >> On 2018-02-09 13:08, Greg Chicares wrote:
GC> > [...]
GC> >>> Therefore, by design, illustration columns can never overflow
GC> >> To see them overflow:
GC> > [...]
GC> >> Fixed: master 0a1c6cab2.
GC> >
GC> > Actually, d73dd4a7d rather than 0a1c6cab2.
GC> Here's a complementary issue. Input file 'large-in-dollars.ill'
GC> (Vadim, I'll send a copy to your personal email) has a $900M
GC> face amount and a premium of $109M. Kim designed it so that no
GC> number in any column ever reaches one billion and therefore it
GC> is just below the threshold where "scaling" would be performed.
GC>
GC> Create PDFs both the old way and the new way, and compare them.
GC> On the sixth page, labelled "5 of 8", the "old" column spacing
GC> in the table of numbers looks preferable:
Thanks, I can see the issue and it's very visible on even the second page,
where "Premium Outlay" value in the first row overlaps with the age in the
new PDF, but not the old one.
GC> - it seems less cramped, using more of the available page width;
GC> - in the first row of the table, the "Premium Outlay" column
GC> isn't wide enough to be clearly separate from the column to
GC> its left, and it slightly overlaps the column to its right.
This can be "fixed" by using the same font as the old PDFs did, i.e. Times
Roman instead of Helvetica used by the new PDF code:
---------------------------------- >8 --------------------------------------
diff --git a/pdf_writer_wx.cpp b/pdf_writer_wx.cpp
index 8f1284df4..93dad3dd0 100644
--- a/pdf_writer_wx.cpp
+++ b/pdf_writer_wx.cpp
@@ -81,8 +81,8 @@
);
pdf_dc_.StartPage();
- // Use a standard PDF Helvetica font (without embedding any custom fonts in
- // the generated file, the only other realistic choice is Times New Roman).
+ // Use a standard PDF Times-Roman font (without embedding any custom fonts
+ // in the generated file, the only other realistic choice is Helvetica).
pdf_dc_.SetFont
(wxFontInfo
(html_font_sizes
@@ -90,7 +90,7 @@
: 8
)
.Family(wxFONTFAMILY_SWISS)
- .FaceName("Helvetica")
+ .FaceName("Times")
);
// Create an HTML parser to allow easily adding HTML contents to the
output.
@@ -98,7 +98,7 @@
if(html_font_sizes)
{
html_parser_.SetFonts
- ("Helvetica"
+ ("Times"
,"Courier"
,html_font_sizes->data()
);
@@ -107,7 +107,7 @@
{
html_parser_.SetStandardFonts
(pdf_dc_.GetFont().GetPointSize()
- ,"Helvetica"
+ ,"Times"
,"Courier"
);
}
---------------------------------- >8 --------------------------------------
With this change, the old and new PDF look closer to each other, at least
at the tables level: the trouble now is that most of the text looks too
small as Times is somehow smaller than Helvetica at the same point size. So
if we want to use it, I probably need to adjust the values in the
pdf_illustration::html_font_sizes array too.
Also, new PDF still uses wider (by a factor of ~1.5) margins around the
page than the old ones. AFAIR I did this intentionally because the old
tables seemed to go uncomfortably close to the right page border to me, but
if we need to fit more data into them, it probably should be reduced.
The problem is that all this is still very ad hoc, i.e. there is no
obviously right value to use for the page margins or for margins between
the table columns. I chose something that looked reasonable to me, but now
we see that it doesn't quite work and I'm going to change it, but nothing
guarantees that we won't have to change it again in the future...
Anyhow, the first question is whether you'd like to switch to using Times,
which is more compact than Helvetica? Please note that this would affect
the group quotes PDFs too, as written. It would, of course, be possible,
and simple, to keep using Helvetica for those and use Times for the
illustrations, but I'm not sure if it's a good idea to use inconsistent
fonts in the output files produced by the same program.
What do you think?
VZ
- Re: [lmi] Group-quote PDF: whitespace changes, and enhancement, Greg Chicares, 2018/03/01
- Re: [lmi] Group-quote PDF: whitespace changes, and enhancement, Greg Chicares, 2018/03/01
- Re: [lmi] Group-quote PDF: whitespace changes, and enhancement, Greg Chicares, 2018/03/08
- Re: [lmi] Group-quote PDF: whitespace changes, and enhancement,
Vadim Zeitlin <=
- Re: [lmi] Group-quote PDF: whitespace changes, and enhancement, Greg Chicares, 2018/03/08
- Re: [lmi] Group-quote PDF: whitespace changes, and enhancement, Vadim Zeitlin, 2018/03/08
- Re: [lmi] Group-quote PDF: whitespace changes, and enhancement, Greg Chicares, 2018/03/08
- Re: [lmi] Group-quote PDF: whitespace changes, and enhancement, Vadim Zeitlin, 2018/03/09
- Re: [lmi] Group-quote PDF: whitespace changes, and enhancement, Greg Chicares, 2018/03/09
- Re: [lmi] Group-quote PDF: whitespace changes, and enhancement, Greg Chicares, 2018/03/12
- Re: [lmi] Group-quote PDF: whitespace changes, and enhancement, Vadim Zeitlin, 2018/03/13