Font sizes with <span> don't work correctly in wxHtmlEasyPrinting (Issue #22944)

58 views
Skip to first unread message

Wanderer82

unread,
Nov 4, 2022, 6:21:19 PM11/4/22
to wx-...@googlegroups.com, Subscribed

When I use the following line in an HTML document

<p><span style="font-size:10pt;font-family:arial;">Teststring</span></p>

and then try to print this using wxHtmlEasyPrinting I always get the same printed font size setting the size between 1 and 11pt. Only when I use 12pt the text is printed bigger but then it's bigger than the real 12pt size. From 12 to about 20pt the text again stays the same size. Am I doing something wrong or is this a mistake in the wxHtmlEasyPrinting function?

Thanks
Thomas


Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.Message ID: <wxWidgets/wxWidgets/issues/22944@github.com>

VZ

unread,
Nov 8, 2022, 6:18:06 PM11/8/22
to wx-...@googlegroups.com, Subscribed

Can you reproduce the problem in the html/printing sample (see files in samples/html/printing directory)?


Reply to this email directly, view it on GitHub, or unsubscribe.

You are receiving this because you are subscribed to this thread.Message ID: <wxWidgets/wxWidgets/issues/22944/1307966739@github.com>

Wanderer82

unread,
Nov 8, 2022, 6:40:58 PM11/8/22
to wx-...@googlegroups.com, Subscribed

But this sample is completely different. It uses another syntax like Font-Size=+2 in the html-file and SetStandardFonts. But I want to specify the font size in points directly in the html-file.


Reply to this email directly, view it on GitHub, or unsubscribe.

You are receiving this because you are subscribed to this thread.Message ID: <wxWidgets/wxWidgets/issues/22944/1307982970@github.com>

VZ

unread,
Nov 8, 2022, 7:30:39 PM11/8/22
to wx-...@googlegroups.com, Subscribed

Can you create a minimal HTML file showing your problem in the sample? If not, please try changing the sample until you can (but try keep the changes as small as possible) and showing us the diff with your changes (see https://www.wxwidgets.org/develop/how-to-report-issues/).


Reply to this email directly, view it on GitHub, or unsubscribe.

You are receiving this because you are subscribed to this thread.Message ID: <wxWidgets/wxWidgets/issues/22944/1308026382@github.com>

Wanderer82

unread,
Nov 9, 2022, 1:27:26 PM11/9/22
to wx-...@googlegroups.com, Subscribed

Yes, I already use a minimal HTML-file for test purposes. The string that I use fits exactly on an A4 page with left and right page borders of 10mm. But when printing with wxHtmlEasyPrinting (even in the preview) you can see that about 3 letters are cut off because the borders are about 13mm instead of 10mm.

This is my HTML file:

Thelittlegirlwalked.Suddenlyshesmiledhappily,growntreewasthere!underwerwerneverhaveeeebeeneeeeseen


Reply to this email directly, view it on GitHub, or unsubscribe.

You are receiving this because you are subscribed to this thread.Message ID: <wxWidgets/wxWidgets/issues/22944/1309190343@github.com>

VZ

unread,
Nov 9, 2022, 1:31:44 PM11/9/22
to wx-...@googlegroups.com, Subscribed

Sorry I'm becoming more and more confused. Is this about the margins or the font size? You started by writing

I always get the same printed font size setting

Is this true or did it turn out to be a mistake?


Reply to this email directly, view it on GitHub, or unsubscribe.

You are receiving this because you are subscribed to this thread.Message ID: <wxWidgets/wxWidgets/issues/22944/1309194709@github.com>

Wanderer82

unread,
Nov 9, 2022, 1:37:28 PM11/9/22
to wx-...@googlegroups.com, Subscribed

In my "real" program, where I tested this first, I had the problem that the font sizes didn't change correctly. There were only about 3 different sizes even if I set them to like 8 or 14 or 19 points inside the HTML file. That's why I started this thread with this problem.

Now that I used the sample file, interestingly this problem is gone now. The font size changes correctly now but still there is the problem that the page margins (even when set to 10 mm both on the left and right side in the page settings of wxHtmlEasyPrinting) are 13mm instead of the set 10mm which means that the line isn't completely printed on one line.


Reply to this email directly, view it on GitHub, or unsubscribe.

You are receiving this because you are subscribed to this thread.Message ID: <wxWidgets/wxWidgets/issues/22944/1309200434@github.com>

Wanderer82

unread,
Nov 9, 2022, 2:56:57 PM11/9/22
to wx-...@googlegroups.com, Subscribed

Well now I'm really confused myself. I again tried the different font sizes and took screenshots to compare and again the problem has arisen. The font size is changed suddenly and a lot (by far too much) and with other font sizes they look exactly the same whether I have 11 or 12, it's the same. 9 and 10 as well.


Reply to this email directly, view it on GitHub, or unsubscribe.

You are receiving this because you are subscribed to this thread.Message ID: <wxWidgets/wxWidgets/issues/22944/1309288061@github.com>

oneeyeman1

unread,
Nov 9, 2022, 3:11:15 PM11/9/22
to wx-...@googlegroups.com, Subscribed

@Wanderer82 ,
Something definitly changed between those runs?
Did you pickup some updates on the system?

Thank you.


Reply to this email directly, view it on GitHub, or unsubscribe.

You are receiving this because you are subscribed to this thread.Message ID: <wxWidgets/wxWidgets/issues/22944/1309319831@github.com>

Wanderer82

unread,
Nov 9, 2022, 3:39:19 PM11/9/22
to wx-...@googlegroups.com, Subscribed

I am now so confused that I don't even believe that it worked at any time. Maybe I might have been just wrong. So I think I have to do more testing also on other systems. But I don't think that there were any updates or changes on my system. I can try the same code on another computer. But that one has an older wxWidgets verison (3.0.5). But I don't think that this would make a difference.


Reply to this email directly, view it on GitHub, or unsubscribe.

You are receiving this because you are subscribed to this thread.Message ID: <wxWidgets/wxWidgets/issues/22944/1309348628@github.com>

Reply all
Reply to author
Forward
0 new messages