[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[lmi-commits] [lmi] master af0662a 7/9: Preserve font before parsing HTM
From: |
Greg Chicares |
Subject: |
[lmi-commits] [lmi] master af0662a 7/9: Preserve font before parsing HTML |
Date: |
Sun, 23 Sep 2018 10:41:26 -0400 (EDT) |
branch: master
commit af0662ac85dab43f5572cba5a80e26a5630216f6
Author: Gregory W. Chicares <address@hidden>
Commit: Gregory W. Chicares <address@hidden>
Preserve font before parsing HTML
Applied the patch given here:
https://lists.nongnu.org/archive/html/lmi/2018-09/msg00048.html
verbatim et literatim.
---
pdf_writer_wx.cpp | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/pdf_writer_wx.cpp b/pdf_writer_wx.cpp
index 40ddf87..1435e63 100644
--- a/pdf_writer_wx.cpp
+++ b/pdf_writer_wx.cpp
@@ -335,6 +335,10 @@ void
pdf_writer_wx::initialize_html_parser(wxHtmlWinParser& html_parser)
std::unique_ptr<wxHtmlContainerCell> pdf_writer_wx::parse_html(html::text&&
html)
{
+ // We don't really want to change the font, but to preserve the current DC
+ // font which is changed by parsing the HTML contents.
+ wxDCFontChanger preserve_font(pdf_dc_, wxFont());
+
return std::unique_ptr<wxHtmlContainerCell>
(static_cast<wxHtmlContainerCell*>
(html_parser_.Parse
- [lmi-commits] [lmi] master updated (c2c34b8 -> 682f705), Greg Chicares, 2018/09/23
- [lmi-commits] [lmi] master e54cf66 3/9: Expunge now-unneeded data members, Greg Chicares, 2018/09/23
- [lmi-commits] [lmi] master af0662a 7/9: Preserve font before parsing HTML,
Greg Chicares <=
- [lmi-commits] [lmi] master 682f705 9/9: Set a line in boldface, Greg Chicares, 2018/09/23
- [lmi-commits] [lmi] master ee96985 1/9: Rename certain variables, Greg Chicares, 2018/09/23
- [lmi-commits] [lmi] master 9d7da46 4/9: Expunge unneeded member-function arguments, Greg Chicares, 2018/09/23
- [lmi-commits] [lmi] master bd7133a 2/9: Pass useful objects as ctor arguments, Greg Chicares, 2018/09/23
- [lmi-commits] [lmi] master becab2f 8/9: Note a deferred enhancement, Greg Chicares, 2018/09/23
- [lmi-commits] [lmi] master e6a4e17 6/9: Improve documentation, Greg Chicares, 2018/09/23
- [lmi-commits] [lmi] master 482c9e2 5/9: Rename a mixin class; endow it with state, Greg Chicares, 2018/09/23