lmi
[Top][All Lists]
Advanced

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

[lmi] wx assertion failure: invalid font


From: Greg Chicares
Subject: [lmi] wx assertion failure: invalid font
Date: Tue, 2 Oct 2018 14:30:37 +0000
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1

If I experimentally apply the patch below and run a default
group private placement illustration:
  File | New | Illustration
  change "Policy" to "sample2gpp"
  OK
  File | Print to PDF
then I observe this message box a few dozen times:

  Assertion '"IsOk"' failed
  (invalid font).
  [file cache_for_lmi/vcs/wxWidgets/src/msw/font.cpp, line 981]

I thought that perhaps the font size had been incremented or
decremented too many times, but neither of the MST templates
included in the <header> element nor any template they include
contains a <font> tag:

/opt/lmi/src/lmi[0]$grep '{{>' reg_d_group_header_*.mst                      
reg_d_group_header_lower.mst:        {{>contract_numbers}}
/opt/lmi/src/lmi[0]$grep 'font' reg_d_group_header_*.mst contract_numbers.mst
/opt/lmi/src/lmi[1]$

Here's the failing patch:

---------8<--------8<--------8<--------8<--------8<--------8<--------8<-------
diff --git a/reg_d_group_supp_report.mst b/reg_d_group_supp_report.mst
index d9c28a14..bc0f3f63 100644
--- a/reg_d_group_supp_report.mst
+++ b/reg_d_group_supp_report.mst
@@ -19,9 +19,11 @@
     snail: Chicares, 186 Belle Woods Drive, Glastonbury CT 06033, USA
 }}
 
+<header>
   {{>reg_d_group_header_upper}}
   <p align="center">{{SupplementalReportTitle}}</p>
   {{>reg_d_group_header_lower}}
+</header>
 
   {{>dollar_units}}
 
--------->8-------->8-------->8-------->8-------->8-------->8-------->8-------

It seems unnecessary to use <header> in 'reg_d_group_supp_report.mst',
because it's added thus:
  add<standard_supplemental_report>("reg_d_group_supp_report");
and
  class standard_supplemental_report
  is derived from class page_with_tabular_report
  which is derived from numbered_page
  which already repeats headers in its own pagination; and thus I
should add <header> only to pages identified by this command:
  grep 'add<standard_page>' ledger_pdf_generator_wx.cpp
Yet OTOH adding <header> to these two:
  finra_supp_report.mst
  reg_d_indiv_supp_report.mst
seemed to produce no ill effect.

BTW, the wxHTML <font> size can be either
 - an integer [0,7] with no sign, or
 - an integer with a sign in [-2,+4]
as shown here:
  
https://docs.wxwidgets.org/trunk/overview_html.html#overview_html_supptags_commonvalues
and I've always wondered: are the two forms both absolute, and identical
except for an offset of three units (so 0 = -2, ... 7 = -4); or are the
forms with an explicit sign relative, so that this combination:
  <font size="3"> <font size="-1">
would yield a font size of 2 (= 3 - 1)?



reply via email to

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