pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/devel/pango pango: backport upstream commit (revert) t...
details: https://anonhg.NetBSD.org/pkgsrc/rev/42f5d5fb42e5
branches: trunk
changeset: 325520:42f5d5fb42e5
user: maya <maya%pkgsrc.org@localhost>
date: Tue Nov 20 08:34:43 2018 +0000
description:
pango: backport upstream commit (revert) to fix font scaling
with (Apple's) CoreText fonts.
Bump PKGREVISION.
>From Jonathan Schleifer in PR pkg/53730
diffstat:
devel/pango/Makefile | 4 +-
devel/pango/distinfo | 7 +-
devel/pango/patches/patch-pango_pangocairo-coretextfont.c | 58 ++++++++++++
devel/pango/patches/patch-pango_pangocairo-coretextfontmap.c | 18 +++
devel/pango/patches/patch-pango_pangocoretext-fontmap.c | 45 +++++++++
devel/pango/patches/patch-pango_pangocoretext-private.h | 19 +++
devel/pango/patches/patch-pango_pangocoretext.c | 22 ++++
7 files changed, 170 insertions(+), 3 deletions(-)
diffs (213 lines):
diff -r 60c529b064cb -r 42f5d5fb42e5 devel/pango/Makefile
--- a/devel/pango/Makefile Tue Nov 20 08:14:16 2018 +0000
+++ b/devel/pango/Makefile Tue Nov 20 08:34:43 2018 +0000
@@ -1,7 +1,7 @@
-# $NetBSD: Makefile,v 1.216 2018/11/14 22:21:19 kleink Exp $
+# $NetBSD: Makefile,v 1.217 2018/11/20 08:34:43 maya Exp $
DISTNAME= pango-1.42.4
-PKGREVISION= 2
+PKGREVISION= 3
CATEGORIES= devel fonts
MASTER_SITES= ${MASTER_SITE_GNOME:=sources/pango/${PKGVERSION_NOREV:R}/}
EXTRACT_SUFX= .tar.xz
diff -r 60c529b064cb -r 42f5d5fb42e5 devel/pango/distinfo
--- a/devel/pango/distinfo Tue Nov 20 08:14:16 2018 +0000
+++ b/devel/pango/distinfo Tue Nov 20 08:34:43 2018 +0000
@@ -1,8 +1,13 @@
-$NetBSD: distinfo,v 1.117 2018/09/02 08:44:36 wiz Exp $
+$NetBSD: distinfo,v 1.118 2018/11/20 08:34:43 maya Exp $
SHA1 (pango-1.42.4.tar.xz) = 240942b1307eaa3819e6e534596271c57cd75457
RMD160 (pango-1.42.4.tar.xz) = e91880e0e9a459bbc2c280ac747ab31f80352000
SHA512 (pango-1.42.4.tar.xz) = 993e97f647eba0c5ed90bcfcb8228bf67fa3f20b1f4331e4e40a30788d7c3ac55eee1209471bf21df125cb8fc6121acc8062a9da2f8a7d6cbe8e9ad13a9320dc
Size (pango-1.42.4.tar.xz) = 833876 bytes
+SHA1 (patch-pango_pangocairo-coretextfont.c) = cfef0e1372d5770d5988af411d435ee87fdfd0bd
+SHA1 (patch-pango_pangocairo-coretextfontmap.c) = 395cb1f8472a319c4b1c58ea137e36452bc44cc6
+SHA1 (patch-pango_pangocoretext-fontmap.c) = 643dfdb0e9672382d4d5259c90e451a829b9875e
+SHA1 (patch-pango_pangocoretext-private.h) = 554d80a4f9b63cda37745a6fbb3dcc348f986e9c
+SHA1 (patch-pango_pangocoretext.c) = 140ea81d008cec28d5e2b60a58e75c3eac5ff303
SHA1 (patch-pango_pangocoretext.h) = d6817eb02f0020c102ab95d63202f9508a70e647
SHA1 (patch-pangocairo-coretext.h) = 2f7c8efad48b58398070f48e71c16d99d3d59f57
diff -r 60c529b064cb -r 42f5d5fb42e5 devel/pango/patches/patch-pango_pangocairo-coretextfont.c
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/devel/pango/patches/patch-pango_pangocairo-coretextfont.c Tue Nov 20 08:34:43 2018 +0000
@@ -0,0 +1,58 @@
+$NetBSD: patch-pango_pangocairo-coretextfont.c,v 1.1 2018/11/20 08:34:43 maya Exp $
+
+From 60df2b006e5d4553abc7bb5fe9a99539c91b0022 Mon Sep 17 00:00:00 2001
+From: Tom Schoonjans <Tom.Schoonjans%diamond.ac.uk@localhost>
+Date: Fri, 20 Jul 2018 12:30:34 +0100
+Subject: [PATCH] Revert "Restore scaling of CoreText fonts."
+
+This reverts commit f661cdbf8cfbdb2ba7241d8dfa4a579c6dfe0a94.
+
+--- pango/pangocairo-coretextfont.c.orig 2018-07-16 00:50:43.000000000 +0000
++++ pango/pangocairo-coretextfont.c
+@@ -36,7 +36,6 @@ struct _PangoCairoCoreTextFont
+ {
+ PangoCoreTextFont font;
+ PangoCairoFontPrivate cf_priv;
+- int abs_size;
+ };
+
+ struct _PangoCairoCoreTextFontClass
+@@ -163,17 +162,6 @@ pango_cairo_core_text_font_create_base_m
+ return metrics;
+ }
+
+-static PangoFontDescription *
+-pango_cairo_core_text_font_describe_absolute (PangoFont *font)
+-{
+- PangoCairoCoreTextFont *cafont = (PangoCairoCoreTextFont *)font;
+- PangoFontDescription *desc = pango_font_describe (font);
+-
+- pango_font_description_set_absolute_size (desc, cafont->abs_size);
+-
+- return desc;
+-}
+-
+ static void
+ pango_cairo_core_text_font_finalize (GObject *object)
+ {
+@@ -191,10 +179,9 @@ pango_cairo_core_text_font_class_init (P
+ PangoFontClass *font_class = PANGO_FONT_CLASS (class);
+
+ object_class->finalize = pango_cairo_core_text_font_finalize;
+- /* font_class->describe defined by parent class PangoCoreTextFont. */
++
+ font_class->get_glyph_extents = pango_cairo_core_text_font_get_glyph_extents;
+ font_class->get_metrics = _pango_cairo_font_get_metrics;
+- font_class->describe_absolute = pango_cairo_core_text_font_describe_absolute;
+ }
+
+ static void
+@@ -232,8 +219,6 @@ _pango_cairo_core_text_font_new (PangoCa
+ cafont = g_object_new (PANGO_TYPE_CAIRO_CORE_TEXT_FONT, NULL);
+ cfont = PANGO_CORE_TEXT_FONT (cafont);
+
+- cafont->abs_size = pango_core_text_font_key_get_size (key);
+-
+ _pango_core_text_font_set_ctfont (cfont, font_ref);
+
+ if (synthesize_italic)
diff -r 60c529b064cb -r 42f5d5fb42e5 devel/pango/patches/patch-pango_pangocairo-coretextfontmap.c
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/devel/pango/patches/patch-pango_pangocairo-coretextfontmap.c Tue Nov 20 08:34:43 2018 +0000
@@ -0,0 +1,18 @@
+$NetBSD: patch-pango_pangocairo-coretextfontmap.c,v 1.1 2018/11/20 08:34:43 maya Exp $
+
+From 60df2b006e5d4553abc7bb5fe9a99539c91b0022 Mon Sep 17 00:00:00 2001
+From: Tom Schoonjans <Tom.Schoonjans%diamond.ac.uk@localhost>
+Date: Fri, 20 Jul 2018 12:30:34 +0100
+Subject: [PATCH] Revert "Restore scaling of CoreText fonts."
+
+This reverts commit f661cdbf8cfbdb2ba7241d8dfa4a579c6dfe0a94.
+
+--- pango/pangocairo-coretextfontmap.c.orig 2018-07-16 00:50:43.000000000 +0000
++++ pango/pangocairo-coretextfontmap.c
+@@ -186,5 +186,5 @@ static void
+ pango_cairo_core_text_font_map_init (PangoCairoCoreTextFontMap *cafontmap)
+ {
+ cafontmap->serial = 1;
+- cafontmap->dpi = 96.;
++ cafontmap->dpi = 72.;
+ }
diff -r 60c529b064cb -r 42f5d5fb42e5 devel/pango/patches/patch-pango_pangocoretext-fontmap.c
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/devel/pango/patches/patch-pango_pangocoretext-fontmap.c Tue Nov 20 08:34:43 2018 +0000
@@ -0,0 +1,45 @@
+$NetBSD: patch-pango_pangocoretext-fontmap.c,v 1.1 2018/11/20 08:34:43 maya Exp $
+From 60df2b006e5d4553abc7bb5fe9a99539c91b0022 Mon Sep 17 00:00:00 2001
+From: Tom Schoonjans <Tom.Schoonjans%diamond.ac.uk@localhost>
+Date: Fri, 20 Jul 2018 12:30:34 +0100
+Subject: [PATCH] Revert "Restore scaling of CoreText fonts."
+
+This reverts commit f661cdbf8cfbdb2ba7241d8dfa4a579c6dfe0a94.
+
+--- pango/pangocoretext-fontmap.c.orig 2018-08-06 02:47:22.000000000 +0000
++++ pango/pangocoretext-fontmap.c
+@@ -806,7 +806,6 @@ get_context_matrix (PangoContext *contex
+ /*
+ * Helper functions for PangoCoreTextFontsetKey
+ */
+-static const double ppi = 72.0; /* typographic points per inch */
+
+ static double
+ pango_core_text_font_map_get_resolution (PangoCoreTextFontMap *fontmap,
+@@ -818,7 +817,7 @@ pango_core_text_font_map_get_resolution
+ /* FIXME: acquire DPI from CoreText using some deafault font */
+ g_warning ("FIXME: returning default DPI");
+
+- return ppi;
++ return 72.0;
+ }
+
+ static int
+@@ -827,16 +826,8 @@ get_scaled_size (PangoCoreTextFontMap
+ const PangoFontDescription *desc)
+ {
+ double size = pango_font_description_get_size (desc);
+- PangoMatrix *matrix = pango_context_get_matrix (context);
+- double scale_factor = pango_matrix_get_font_scale_factor (matrix);
+-
+- if (!pango_font_description_get_size_is_absolute(desc))
+- {
+- double dpi = pango_core_text_font_map_get_resolution (fontmap, context);
+- size *= (dpi/ppi);
+- }
+
+- return .5 + scale_factor * size;
++ return .5 + pango_matrix_get_font_scale_factor (pango_context_get_matrix (context)) * size;
+ }
+
+
diff -r 60c529b064cb -r 42f5d5fb42e5 devel/pango/patches/patch-pango_pangocoretext-private.h
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/devel/pango/patches/patch-pango_pangocoretext-private.h Tue Nov 20 08:34:43 2018 +0000
@@ -0,0 +1,19 @@
+$NetBSD: patch-pango_pangocoretext-private.h,v 1.1 2018/11/20 08:34:43 maya Exp $
+From 60df2b006e5d4553abc7bb5fe9a99539c91b0022 Mon Sep 17 00:00:00 2001
+From: Tom Schoonjans <Tom.Schoonjans%diamond.ac.uk@localhost>
+Date: Fri, 20 Jul 2018 12:30:34 +0100
+Subject: [PATCH] Revert "Restore scaling of CoreText fonts."
+
+This reverts commit f661cdbf8cfbdb2ba7241d8dfa4a579c6dfe0a94.
+
+--- pango/pangocoretext-private.h.orig 2018-07-16 00:50:43.000000000 +0000
++++ pango/pangocoretext-private.h
+@@ -99,8 +99,6 @@ void _pango_core_text_f
+ PangoFontDescription *_pango_core_text_font_description_from_ct_font_descriptor (CTFontDescriptorRef desc);
+
+ _PANGO_EXTERN
+-int pango_core_text_font_key_get_size (const PangoCoreTextFontKey *key);
+-_PANGO_EXTERN
+ int pango_core_text_font_key_get_size (const PangoCoreTextFontKey *key);
+ _PANGO_EXTERN
+ double pango_core_text_font_key_get_resolution (const PangoCoreTextFontKey *key);
diff -r 60c529b064cb -r 42f5d5fb42e5 devel/pango/patches/patch-pango_pangocoretext.c
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/devel/pango/patches/patch-pango_pangocoretext.c Tue Nov 20 08:34:43 2018 +0000
@@ -0,0 +1,22 @@
+$NetBSD: patch-pango_pangocoretext.c,v 1.1 2018/11/20 08:34:43 maya Exp $
+From 60df2b006e5d4553abc7bb5fe9a99539c91b0022 Mon Sep 17 00:00:00 2001
+From: Tom Schoonjans <Tom.Schoonjans%diamond.ac.uk@localhost>
+Date: Fri, 20 Jul 2018 12:30:34 +0100
+Subject: [PATCH] Revert "Restore scaling of CoreText fonts."
+
+This reverts commit f661cdbf8cfbdb2ba7241d8dfa4a579c6dfe0a94.
+
+--- pango/pangocoretext.c.orig 2018-07-16 00:50:43.000000000 +0000
++++ pango/pangocoretext.c
+@@ -225,7 +225,10 @@ pango_core_text_font_class_init (PangoCo
+ object_class->finalize = pango_core_text_font_finalize;
+
+ font_class->describe = pango_core_text_font_describe;
+- /* font_class->describe_absolute is left virtual for PangoCairoCoreTextFont. */
++ /* In CoreText the device unit is points so describe_absoulute and
++ * describe are the same.
++ */
++ font_class->describe_absolute = pango_core_text_font_describe;
+ font_class->get_coverage = pango_core_text_font_get_coverage;
+ font_class->find_shaper = pango_core_text_font_find_shaper;
+ font_class->get_font_map = pango_core_text_font_get_font_map;
Home |
Main Index |
Thread Index |
Old Index