Bug 4471 - Default font size for fancy needs to be converted to pixels
Summary: Default font size for fancy needs to be converted to pixels
Status: RESOLVED FIXED
Alias: None
Product: Claws Mail
Classification: Unclassified
Component: Plugins/Fancy (show other bugs)
Version: 4.0.0
Hardware: PC Linux
: P3 normal
Assignee: users
URL:
Depends on:
Blocks:
 
Reported: 2021-04-28 17:27 UTC by Steve Randall
Modified: 2021-04-28 18:10 UTC (History)
0 users

See Also:


Attachments
Fancy plugin: convert default font size from points to pixels. (926 bytes, patch)
2021-04-28 17:27 UTC, Steve Randall
Details | Diff
HTML message with no font size specified (17.84 KB, message/news)
2021-04-28 17:57 UTC, Steve Randall
Details

Description Steve Randall 2021-04-28 17:27:22 UTC
Created attachment 2200 [details]
Fancy plugin: convert default font size from points to pixels.

Default font size for fancy viewer needs to be converted from points to pixels, otherwise it is much too small.
Comment 1 Paul 2021-04-28 17:29:42 UTC
It works fine for me, in what circumstances is it much too small?
Comment 2 Pawel Pekala 2021-04-28 17:56:00 UTC
It's tricky situation:

webkit1 gtk2 -> default-font-size is in points
webkit2 gtk3 -> default-font-size is in pixels

My bad, didn't test with Gtk3 branch.
Comment 3 Steve Randall 2021-04-28 17:57:34 UTC
Created attachment 2201 [details]
HTML message with no font size specified

Of course, this can only be a problem when the message does not specify any font size. (Most do, it seems, but it can be hard to tell.) I have attached a (public) example message.
Comment 4 Pawel Pekala 2021-04-28 18:03:42 UTC
Also this patch will not work with gtk2 branch:

fancy_viewer.c: In function ‘fancy_apply_prefs’:
fancy_viewer.c:108:26: warning: implicit declaration of function ‘webkit_settings_font_size_to_pixels’ [-Wimplicit-function-declaration]
  108 |     "default-font-size", webkit_settings_font_size_to_pixels(msg_font_size), NULL);
Comment 5 Paul 2021-04-28 18:10:18 UTC
patch pushed to git. thanks

Note You need to log in before you can comment on or make changes to this bug.