[Commits] [SCM] claws branch, master, updated. 3.17.8-34-g8c1a4c980

paul at claws-mail.org paul at claws-mail.org
Wed Mar 17 16:14:07 CET 2021


The branch, master has been updated
       via  8c1a4c98087d84292d4b617af3a9306f6bb2a4b7 (commit)
      from  fe607dfd50a3d9f91cc2a756d41c19a835e27197 (commit)

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


- Log -----------------------------------------------------------------
commit 8c1a4c98087d84292d4b617af3a9306f6bb2a4b7
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 f52bcaf31..478d93a1c 100644
--- a/AUTHORS
+++ b/AUTHORS
@@ -332,3 +332,8 @@ contributors (in addition to the above; based on Changelog)
 	Jean Delvare
 	Damian Poddebniak
 	Alvar Penning
+<<<<<<< HEAD
+=======
+	Orivej Desh
+	Steve Randall
+	Ramin Yaghoubzadeh Torky
diff --git a/src/gtk/authors.h b/src/gtk/authors.h
index 95ea5580f..4ddf79509 100644
--- a/src/gtk/authors.h
+++ b/src/gtk/authors.h
@@ -304,6 +304,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