[meld/windows-font-fixes: 2/2] Default Pango backend to fontconfig on Windows (#445, #453)
- From: Kai Willadsen <kaiw src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [meld/windows-font-fixes: 2/2] Default Pango backend to fontconfig on Windows (#445, #453)
- Date: Fri, 24 Apr 2020 23:13:12 +0000 (UTC)
commit 02afad4918b7d8c98ac157bbf3fa258d64fe890b
Author: Kai Willadsen <kai willadsen gmail com>
Date: Sat Apr 25 08:55:22 2020 +1000
Default Pango backend to fontconfig on Windows (#445, #453)
The Pango win32 font backend has some long-standing issues with fallback
fonts (#445) and also has a current problem with line heights for empty
lines (#453). While there have been problems in the past with fontconfig
on Windows, it looks like it's currently a better option for us.
See https://bugzilla.gnome.org/show_bug.cgi?id=785313 for an old bug
related to slowness with fontconfig. The fix there was to switch to the
native win32 fonts backend, but since that has issues, we're explicitly
switching the other direction for the moment.
This uses the environment variable method of switching backends rather
than manually setting the font map, partially for ease and partially
because it's something the user can then manually override.
bin/meld | 4 ++++
1 file changed, 4 insertions(+)
---
diff --git a/bin/meld b/bin/meld
index e193367d..1c769000 100755
--- a/bin/meld
+++ b/bin/meld
@@ -434,6 +434,10 @@ def environment_hacks():
except KeyError:
pass
+ # Force the fontconfig backend for font fallback and metric handling
+ if sys.platform == 'win32' and 'PANGOCAIRO_BACKEND' not in os.environ:
+ os.environ['PANGOCAIRO_BACKEND'] = 'fontconfig'
+
def run_application():
from meld.meldapp import MeldApp
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]