Update to 2.57.0
- Backport upstream patch to fix self tests with newer pango
This commit is contained in:
parent
cd196a1e27
commit
fb8b9d7358
2
.gitignore
vendored
2
.gitignore
vendored
@ -103,3 +103,5 @@ librsvg-2.31.0.tar.bz2
|
|||||||
/librsvg-2.56.90-vendor.tar.xz
|
/librsvg-2.56.90-vendor.tar.xz
|
||||||
/librsvg-2.56.92.tar.xz
|
/librsvg-2.56.92.tar.xz
|
||||||
/librsvg-2.56.92-vendor.tar.xz
|
/librsvg-2.56.92-vendor.tar.xz
|
||||||
|
/librsvg-2.57.0.tar.xz
|
||||||
|
/librsvg-2.57.0-vendor.tar.xz
|
||||||
|
100
0001-1019-Fix-small-caps-and-bump-the-version-of-Pango-re.patch
Normal file
100
0001-1019-Fix-small-caps-and-bump-the-version-of-Pango-re.patch
Normal file
@ -0,0 +1,100 @@
|
|||||||
|
From 73c1ee7519555aa90c1c45828ffaa2f573812864 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Federico Mena Quintero <federico@gnome.org>
|
||||||
|
Date: Fri, 22 Sep 2023 11:04:38 -0600
|
||||||
|
Subject: [PATCH] (#1019): Fix small-caps and bump the version of Pango
|
||||||
|
required to 1.50.0
|
||||||
|
|
||||||
|
In https://gitlab.gnome.org/GNOME/pango/-/issues/566 it used to be
|
||||||
|
that PANGO_VARIANT_SMALL_CAPS didn't work, so librsvg had to request an
|
||||||
|
'smcp' feature from OpenType fonts that support it.
|
||||||
|
|
||||||
|
However, with
|
||||||
|
https://gitlab.gnome.org/GNOME/pango/-/merge_requests/497 Pango got
|
||||||
|
the ability to do that on its own, or to emulate small-caps for fonts
|
||||||
|
that don't have glyphs for them. From the caller's perspective,
|
||||||
|
PANGO_VARIANT_SMALL_CAPS now works out of the box.
|
||||||
|
|
||||||
|
This got introduced in Pango 1.49.3. So, let's bump the requirement
|
||||||
|
to Pango 1.50.0. It has been out since December 2021 anyway.
|
||||||
|
|
||||||
|
I still don't know why updating harfbuzz from 8.1.x ot 8.2.0 made
|
||||||
|
librsvg's 'smcp' code stop working. But now that Pango does smarter
|
||||||
|
things, I'd rather just require a newer Pango version.
|
||||||
|
|
||||||
|
Fixes https://gitlab.gnome.org/GNOME/librsvg/-/issues/1019
|
||||||
|
|
||||||
|
Part-of: <https://gitlab.gnome.org/GNOME/librsvg/-/merge_requests/896>
|
||||||
|
---
|
||||||
|
configure.ac | 2 +-
|
||||||
|
rsvg/Cargo.toml | 6 +++---
|
||||||
|
rsvg/src/text.rs | 11 +----------
|
||||||
|
3 files changed, 5 insertions(+), 14 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/configure.ac b/configure.ac
|
||||||
|
index 12e39452..f655ba10 100644
|
||||||
|
--- a/configure.ac
|
||||||
|
+++ b/configure.ac
|
||||||
|
@@ -66,7 +66,7 @@ GIO_REQUIRED=2.24.0
|
||||||
|
GLIB_REQUIRED=2.50.0
|
||||||
|
HARFBUZZ_REQUIRED=2.0.0
|
||||||
|
LIBXML_REQUIRED=2.9.0
|
||||||
|
-PANGO_REQUIRED=1.46.0
|
||||||
|
+PANGO_REQUIRED=1.50.0
|
||||||
|
|
||||||
|
dnl ===========================================================================
|
||||||
|
|
||||||
|
diff --git a/rsvg/Cargo.toml b/rsvg/Cargo.toml
|
||||||
|
index d95162bf..bc572e8a 100644
|
||||||
|
--- a/rsvg/Cargo.toml
|
||||||
|
+++ b/rsvg/Cargo.toml
|
||||||
|
@@ -28,15 +28,15 @@ gio = { name = "gio-2.0", version = "2.24" }
|
||||||
|
glib = { name = "glib-2.0", version = "2.50" }
|
||||||
|
harfbuzz = "2.0"
|
||||||
|
libxml2 = { name = "libxml-2.0", fallback-names = ["libxml2"], version = "2.9" }
|
||||||
|
-pangocairo = "1.46"
|
||||||
|
+pangocairo = "1.50"
|
||||||
|
|
||||||
|
[package.metadata.system-deps.'cfg(windows)']
|
||||||
|
fontconfig = { version = "1.7", optional = true }
|
||||||
|
-pangoft2 = { version = "1.46", optional = true }
|
||||||
|
+pangoft2 = { version = "1.50", optional = true }
|
||||||
|
|
||||||
|
[package.metadata.system-deps.'cfg(not(windows))']
|
||||||
|
fontconfig = { version = "1.7" }
|
||||||
|
-pangoft2 = { version = "1.46" }
|
||||||
|
+pangoft2 = { version = "1.50" }
|
||||||
|
|
||||||
|
[features]
|
||||||
|
c-api = []
|
||||||
|
diff --git a/rsvg/src/text.rs b/rsvg/src/text.rs
|
||||||
|
index 10843cdd..a810442c 100644
|
||||||
|
--- a/rsvg/src/text.rs
|
||||||
|
+++ b/rsvg/src/text.rs
|
||||||
|
@@ -1283,9 +1283,7 @@ fn add_pango_attributes(
|
||||||
|
font_desc.set_family(props.font_family.as_str());
|
||||||
|
font_desc.set_style(pango::Style::from(props.font_style));
|
||||||
|
|
||||||
|
- // PANGO_VARIANT_SMALL_CAPS does nothing: https://gitlab.gnome.org/GNOME/pango/-/issues/566
|
||||||
|
- // see below for using the "smcp" OpenType feature for fonts that support it.
|
||||||
|
- // font_desc.set_variant(pango::Variant::from(props.font_variant));
|
||||||
|
+ font_desc.set_variant(pango::Variant::from(props.font_variant));
|
||||||
|
|
||||||
|
font_desc.set_weight(pango::Weight::from(props.font_weight));
|
||||||
|
font_desc.set_stretch(pango::Stretch::from(props.font_stretch));
|
||||||
|
@@ -1308,13 +1306,6 @@ fn add_pango_attributes(
|
||||||
|
attributes.push(pango::AttrInt::new_strikethrough(true).upcast());
|
||||||
|
}
|
||||||
|
|
||||||
|
- // FIXME: Using the "smcp" OpenType feature only works for fonts that support it. We
|
||||||
|
- // should query if the font supports small caps, and synthesize them if it doesn't.
|
||||||
|
- if props.font_variant == FontVariant::SmallCaps {
|
||||||
|
- // smcp - small capitals - https://docs.microsoft.com/en-ca/typography/opentype/spec/features_pt#smcp
|
||||||
|
- attributes.push(pango::AttrFontFeatures::new("'smcp' 1").upcast());
|
||||||
|
- }
|
||||||
|
-
|
||||||
|
// Set the range in each attribute
|
||||||
|
|
||||||
|
for attr in &mut attributes {
|
||||||
|
--
|
||||||
|
2.41.0
|
||||||
|
|
@ -18,12 +18,12 @@
|
|||||||
|
|
||||||
Name: librsvg2
|
Name: librsvg2
|
||||||
Summary: An SVG library based on cairo
|
Summary: An SVG library based on cairo
|
||||||
Version: 2.56.92
|
Version: 2.57.0
|
||||||
Release: %autorelease
|
Release: %autorelease
|
||||||
|
|
||||||
License: LGPLv2+
|
License: LGPLv2+
|
||||||
URL: https://wiki.gnome.org/Projects/LibRsvg
|
URL: https://wiki.gnome.org/Projects/LibRsvg
|
||||||
Source0: https://download.gnome.org/sources/librsvg/2.56/librsvg-%{version}.tar.xz
|
Source0: https://download.gnome.org/sources/librsvg/2.57/librsvg-%{version}.tar.xz
|
||||||
# upstream dropped vendoring since 2.55.0 (GNOME/librsvg#718), to create:
|
# upstream dropped vendoring since 2.55.0 (GNOME/librsvg#718), to create:
|
||||||
# tar xf librsvg-%%{version}.tar.xz ; pushd librsvg-%%{version} ; \
|
# tar xf librsvg-%%{version}.tar.xz ; pushd librsvg-%%{version} ; \
|
||||||
# cargo vendor && tar Jcvf ../librsvg-%%{version}-vendor.tar.xz vendor/ ; popd
|
# cargo vendor && tar Jcvf ../librsvg-%%{version}-vendor.tar.xz vendor/ ; popd
|
||||||
@ -34,6 +34,9 @@ Source1: librsvg-%{version}-vendor.tar.xz
|
|||||||
Patch: 0001-Fedora-Drop-dependencies-required-for-benchmarking.patch
|
Patch: 0001-Fedora-Drop-dependencies-required-for-benchmarking.patch
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
|
# Fix self tests with newer pango
|
||||||
|
Patch: 0001-1019-Fix-small-caps-and-bump-the-version-of-Pango-re.patch
|
||||||
|
|
||||||
BuildRequires: chrpath
|
BuildRequires: chrpath
|
||||||
BuildRequires: gcc
|
BuildRequires: gcc
|
||||||
BuildRequires: gi-docgen
|
BuildRequires: gi-docgen
|
||||||
|
4
sources
4
sources
@ -1,2 +1,2 @@
|
|||||||
SHA512 (librsvg-2.56.92.tar.xz) = 2d797c7ab86c0e927126c458e345903bb6badef50dbc59dac7226a73f898585e9429ff0fea6f885f2b554cd242b1f91df7428c3f2befb5fbad7f4c2a663a423e
|
SHA512 (librsvg-2.57.0.tar.xz) = a80ac5e9207b50d35d9114ccd39cffbe1194a496b8375efba874b440b03b1312c5a660b4e423b48321ad5f94d581569ee2633786f1ae32aeaa7a4b213d3a27fa
|
||||||
SHA512 (librsvg-2.56.92-vendor.tar.xz) = a28ebbe7877a1d0609e020ea1e292ed3b42ca109a65991c355c8a2fc47ee6534daa854afd68402b087eb6d3e9baca4d32b7c78cf9121f3a744248b1befa07564
|
SHA512 (librsvg-2.57.0-vendor.tar.xz) = 93fb38cf63d49ef08cefb2e83136751552fca8018091e6198ad74baca51bdd3d81269430238d5f20b33ca6add50ae72fa54552e31d1782cd44c5ada643154b7e
|
||||||
|
Loading…
Reference in New Issue
Block a user