[Commits] [SCM] claws branch, gtk3, updated. 3.99.0-56-g463ae3621

paul at claws-mail.org paul at claws-mail.org
Wed Mar 17 16:10:36 CET 2021


The branch, gtk3 has been updated
       via  463ae3621f682349102984ee60ee75cd2c62d0b7 (commit)
      from  40931bb8e5ffec5fd3ece6afe96ffdb508c471a5 (commit)

Summary of changes:
 AUTHORS                                        | 1 +
 src/gtk/authors.h                              | 1 +
 src/plugins/litehtml_viewer/lh_widget_text.cpp | 4 ++++
 3 files changed, 6 insertions(+)


- Log -----------------------------------------------------------------
commit 463ae3621f682349102984ee60ee75cd2c62d0b7
Author: paul <paul at claws-mail.org>
Date:   Wed Mar 17 15:10:30 2021 +0000

    fix bug 4326 'Xft.dpi != 96 messes with text display in litehtml viewer'
    
    patch by Ramin Yaghoubzadeh Torky

diff --git a/AUTHORS b/AUTHORS
index 0c33c2ab9..c854d100b 100644
--- a/AUTHORS
+++ b/AUTHORS
@@ -335,3 +335,4 @@ contributors (in addition to the above; based on Changelog)
 	Alvar Penning
 	Orivej Desh
 	Steve Randall
+	Ramin Yaghoubzadeh Torky
diff --git a/src/gtk/authors.h b/src/gtk/authors.h
index 25da7ea4f..863faac3c 100644
--- a/src/gtk/authors.h
+++ b/src/gtk/authors.h
@@ -307,6 +307,7 @@ static char *CONTRIBS_LIST[] = {
 "Masahiro Tomita",
 "Tomita",
 "Topia",
+"Ramin Yaghoubzadeh Torky",
 "Anders Troback",
 "Tsutsui",
 "Aleksandar Urošević",
diff --git a/src/plugins/litehtml_viewer/lh_widget_text.cpp b/src/plugins/litehtml_viewer/lh_widget_text.cpp
index ed290559f..a832700fc 100644
--- a/src/plugins/litehtml_viewer/lh_widget_text.cpp
+++ b/src/plugins/litehtml_viewer/lh_widget_text.cpp
@@ -100,6 +100,10 @@ void lh_widget::draw_text( litehtml::uint_ptr hdc, const litehtml::tchar_t* text
 	cairo_t *cr = (cairo_t *)hdc;
 	PangoLayout *layout = pango_cairo_create_layout(cr);
 	PangoContext *context = pango_layout_get_context(layout);
+	GdkScreen* screen = gdk_screen_get_default();
+	double dpi = gdk_screen_get_resolution(screen);
+
+	pango_cairo_context_set_resolution(context, dpi);
 
 	if (fnt != NULL) {
 		/* Set font */

-----------------------------------------------------------------------


hooks/post-receive
-- 
Claws Mail


More information about the Commits mailing list