From c9d3265890c6fcd4737ee10e3745c7d1563a7135 Mon Sep 17 00:00:00 2001 From: Federico Mena Quintero Date: Tue, 26 Oct 2021 17:56:23 -0500 Subject: [PATCH 1/4] Note on Pango internals for emitting text to PDF Part-of: --- devel-docs/text-layout.md | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/devel-docs/text-layout.md b/devel-docs/text-layout.md index 5e999c7c2..6f0f52c0d 100644 --- a/devel-docs/text-layout.md +++ b/devel-docs/text-layout.md @@ -182,6 +182,32 @@ Although currently Pango deals with underlining, it may be necessary to do that instead - I am not sure yet how `textPath` or individually-positioned `x/y/dx/dy/rotate` interact with underlining. +### Pango internals + +``` +/** + * pango_renderer_draw_glyph_item: + * @renderer: a `PangoRenderer` + * @text: (nullable): the UTF-8 text that @glyph_item refers to + * @glyph_item: a `PangoGlyphItem` + * @x: X position of left edge of baseline, in user space coordinates + * in Pango units + * @y: Y position of left edge of baseline, in user space coordinates + * in Pango units + * + * Draws the glyphs in @glyph_item with the specified `PangoRenderer`, + * embedding the text associated with the glyphs in the output if the + * output format supports it. + * + * This is useful for rendering text in PDF. + * ... + */ +``` + +Note that embedding text in PDF to make it selectable involves passing +a non-null `text` to pango_renderer_draw_glyph_item(). We'll have to +implement this by hand, probably. + ### Wrapped text in a content area This roadmap does not consider the implementation fo wrapped text yet. -- GitLab From 0e3c80ecb97a339fdf9c08f21f123a51b8ee2fc5 Mon Sep 17 00:00:00 2001 From: Federico Mena Quintero Date: Tue, 26 Oct 2021 18:20:49 -0500 Subject: [PATCH 2/4] Bump version to 2.52.3 Part-of: --- Cargo.lock | 116 +++++++++++++++++++++++++-------------------------- Cargo.toml | 2 +- configure.ac | 2 +- 3 files changed, 60 insertions(+), 60 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 54cc110ec..301d81bfd 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -125,9 +125,9 @@ dependencies = [ [[package]] name = "bumpalo" -version = "3.7.1" +version = "3.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d9df67f7bf9ef8498769f994239c45613ef0c5899415fb58e9add412d2c1a538" +checksum = "8f1e260c3a9040a7c19a12468758f4c16f31a81a1fe087482be9570ec864bb6c" [[package]] name = "bytemuck" @@ -143,9 +143,9 @@ checksum = "14c189c53d098945499cdfa7ecc63567cf3886b3332b312a5b4585d8d3a6a610" [[package]] name = "cairo-rs" -version = "0.14.7" +version = "0.14.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9164355c892b026d6257e696dde5f3cb39beb3718297f0f161b562fe2ee3ab86" +checksum = "33b5725979db0c586d98abad2193cdb612dd40ef95cd26bd99851bf93b3cb482" dependencies = [ "bitflags", "cairo-sys-rs", @@ -156,9 +156,9 @@ dependencies = [ [[package]] name = "cairo-sys-rs" -version = "0.14.0" +version = "0.14.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d7c9c3928781e8a017ece15eace05230f04b647457d170d2d9641c94a444ff80" +checksum = "b448b876970834fda82ba3aeaccadbd760206b75388fc5c1b02f1e343b697570" dependencies = [ "glib-sys", "libc", @@ -335,10 +335,10 @@ dependencies = [ "itoa", "matches", "phf", - "proc-macro2 1.0.30", + "proc-macro2 1.0.32", "quote 1.0.10", "smallvec", - "syn 1.0.80", + "syn 1.0.81", ] [[package]] @@ -348,7 +348,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "dfae75de57f2b2e85e8768c3ea840fd159c8f33e2b6522c7835b7abac81be16e" dependencies = [ "quote 1.0.10", - "syn 1.0.80", + "syn 1.0.81", ] [[package]] @@ -399,10 +399,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "40eebddd2156ce1bb37b20bbe5151340a31828b1f2d22ba4141f3531710e38df" dependencies = [ "convert_case", - "proc-macro2 1.0.30", + "proc-macro2 1.0.32", "quote 1.0.10", "rustc_version 0.3.3", - "syn 1.0.80", + "syn 1.0.81", ] [[package]] @@ -731,9 +731,9 @@ dependencies = [ "heck", "proc-macro-crate", "proc-macro-error", - "proc-macro2 1.0.30", + "proc-macro2 1.0.32", "quote 1.0.10", - "syn 1.0.80", + "syn 1.0.81", ] [[package]] @@ -765,9 +765,9 @@ dependencies = [ [[package]] name = "half" -version = "1.8.0" +version = "1.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ac5956d4e63858efaec57e0d6c1c2f6a41e1487f830314a324ccd7e2223a7ca0" +checksum = "eabb4a44450da02c90444cf74558da904edde8fb4e9035a9a6a4e15445af0bd7" [[package]] name = "heck" @@ -800,9 +800,9 @@ dependencies = [ [[package]] name = "instant" -version = "0.1.11" +version = "0.1.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "716d3d89f35ac6a34fd0eed635395f4c3b76fa889338a4632e5231a8684216bd" +checksum = "7a5bbe824c507c5da5956355e86a746d82e0e1464f65d862cc5e71da70e94b2c" dependencies = [ "cfg-if", ] @@ -854,13 +854,13 @@ checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" [[package]] name = "libc" -version = "0.2.103" +version = "0.2.105" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dd8f7255a17a627354f321ef0055d63b898c6fb27eff628af4d1b66b7331edf6" +checksum = "869d572136620d55835903746bcb5cdc54cb2851fd0aeec53220b4bb65ef3013" [[package]] name = "librsvg" -version = "2.52.2" +version = "2.52.3" dependencies = [ "assert_cmd", "cairo-rs", @@ -1066,9 +1066,9 @@ version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "01fcc0b8149b4632adc89ac3b7b31a12fb6099a0317a4eb2ebff574ef7de7218" dependencies = [ - "proc-macro2 1.0.30", + "proc-macro2 1.0.32", "quote 1.0.10", - "syn 1.0.80", + "syn 1.0.81", ] [[package]] @@ -1317,9 +1317,9 @@ dependencies = [ "phf_generator", "phf_shared", "proc-macro-hack", - "proc-macro2 1.0.30", + "proc-macro2 1.0.32", "quote 1.0.10", - "syn 1.0.80", + "syn 1.0.81", ] [[package]] @@ -1345,9 +1345,9 @@ checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" [[package]] name = "pkg-config" -version = "0.3.20" +version = "0.3.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7c9b1041b4387893b91ee6746cddfc28516aff326a3519fb2adf820932c5e6cb" +checksum = "12295df4f294471248581bc09bef3c38a5e46f1e36d6a37353621a0c6c357e1f" [[package]] name = "plotters" @@ -1397,9 +1397,9 @@ checksum = "07e2192780e9f8e282049ff9bffcaa28171e1cb0844f49ed5374e518ae6024ec" [[package]] name = "ppv-lite86" -version = "0.2.14" +version = "0.2.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c3ca011bd0129ff4ae15cd04c4eef202cadf6c51c21e47aba319b4e0501db741" +checksum = "ed0cfbc8191465bed66e1718596ee0b0b35d5ee1f41c5df2189d0fe8bde535ba" [[package]] name = "precomputed-hash" @@ -1454,9 +1454,9 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "da25490ff9892aab3fcf7c36f08cfb902dd3e71ca0f9f9517bea02a73a5ce38c" dependencies = [ "proc-macro-error-attr", - "proc-macro2 1.0.30", + "proc-macro2 1.0.32", "quote 1.0.10", - "syn 1.0.80", + "syn 1.0.81", "version_check", ] @@ -1466,7 +1466,7 @@ version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a1be40180e52ecc98ad80b184934baf3d0d29f979574e439af5a55274b35f869" dependencies = [ - "proc-macro2 1.0.30", + "proc-macro2 1.0.32", "quote 1.0.10", "version_check", ] @@ -1488,9 +1488,9 @@ dependencies = [ [[package]] name = "proc-macro2" -version = "1.0.30" +version = "1.0.32" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "edc3358ebc67bc8b7fa0c007f945b0b18226f78437d61bec735a9eb96b61ee70" +checksum = "ba508cc11742c0dc5c1659771673afbab7a0efab23aa17e854cbab0837ed0b43" dependencies = [ "unicode-xid 0.2.2", ] @@ -1536,7 +1536,7 @@ version = "1.0.10" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "38bc8cc6a5f2e3655e0899c1b848643b2562f853f114bfec7be120678e3ace05" dependencies = [ - "proc-macro2 1.0.30", + "proc-macro2 1.0.32", ] [[package]] @@ -1867,9 +1867,9 @@ version = "1.0.130" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d7bc1a1ab1961464eae040d96713baa5a724a8152c1222492465b54322ec508b" dependencies = [ - "proc-macro2 1.0.30", + "proc-macro2 1.0.32", "quote 1.0.10", - "syn 1.0.80", + "syn 1.0.81", ] [[package]] @@ -1964,11 +1964,11 @@ version = "0.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c87a60a40fccc84bef0652345bbbbbe20a605bf5d0ce81719fc476f5c03b50ef" dependencies = [ - "proc-macro2 1.0.30", + "proc-macro2 1.0.32", "quote 1.0.10", "serde", "serde_derive", - "syn 1.0.80", + "syn 1.0.81", ] [[package]] @@ -1978,13 +1978,13 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "58fa5ff6ad0d98d1ffa8cb115892b6e69d67799f6763e162a1c9db421dc22e11" dependencies = [ "base-x", - "proc-macro2 1.0.30", + "proc-macro2 1.0.32", "quote 1.0.10", "serde", "serde_derive", "serde_json", "sha1", - "syn 1.0.80", + "syn 1.0.81", ] [[package]] @@ -2015,7 +2015,7 @@ checksum = "f24c8e5e19d22a726626f1a5e16fe15b132dcf21d10177fa5a45ce7962996b97" dependencies = [ "phf_generator", "phf_shared", - "proc-macro2 1.0.30", + "proc-macro2 1.0.32", "quote 1.0.10", ] @@ -2038,9 +2038,9 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d06aaeeee809dbc59eb4556183dd927df67db1540de5be8d3ec0b6636358a5ec" dependencies = [ "heck", - "proc-macro2 1.0.30", + "proc-macro2 1.0.32", "quote 1.0.10", - "syn 1.0.80", + "syn 1.0.81", ] [[package]] @@ -2056,11 +2056,11 @@ dependencies = [ [[package]] name = "syn" -version = "1.0.80" +version = "1.0.81" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d010a1623fbd906d51d650a9916aaefc05ffa0e4053ff7fe601167f3e715d194" +checksum = "f2afee18b8beb5a596ecb4a2dce128c719b4ba399d34126b9e4396e3f9860966" dependencies = [ - "proc-macro2 1.0.30", + "proc-macro2 1.0.32", "quote 1.0.10", "unicode-xid 0.2.2", ] @@ -2110,9 +2110,9 @@ dependencies = [ [[package]] name = "termtree" -version = "0.2.1" +version = "0.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "78fbf2dd23e79c28ccfa2472d3e6b3b189866ffef1aeb91f17c2d968b6586378" +checksum = "13a4ec180a2de59b57434704ccfad967f789b12737738798fa08798cd5824c16" [[package]] name = "test-generator" @@ -2156,9 +2156,9 @@ version = "1.0.30" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "aa32fd3f627f367fe16f893e2597ae3c05020f8bba2666a4e6ea73d377e5714b" dependencies = [ - "proc-macro2 1.0.30", + "proc-macro2 1.0.32", "quote 1.0.10", - "syn 1.0.80", + "syn 1.0.81", ] [[package]] @@ -2203,10 +2203,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fd3c141a1b43194f3f56a1411225df8646c55781d5f26db825b3d98507eb482f" dependencies = [ "proc-macro-hack", - "proc-macro2 1.0.30", + "proc-macro2 1.0.32", "quote 1.0.10", "standback", - "syn 1.0.80", + "syn 1.0.81", ] [[package]] @@ -2381,9 +2381,9 @@ dependencies = [ "bumpalo", "lazy_static", "log", - "proc-macro2 1.0.30", + "proc-macro2 1.0.32", "quote 1.0.10", - "syn 1.0.80", + "syn 1.0.81", "wasm-bindgen-shared", ] @@ -2403,9 +2403,9 @@ version = "0.2.78" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7803e0eea25835f8abdc585cd3021b3deb11543c6fe226dcd30b228857c5c5ab" dependencies = [ - "proc-macro2 1.0.30", + "proc-macro2 1.0.32", "quote 1.0.10", - "syn 1.0.80", + "syn 1.0.81", "wasm-bindgen-backend", "wasm-bindgen-shared", ] @@ -2459,9 +2459,9 @@ checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" [[package]] name = "xml5ever" -version = "0.16.1" +version = "0.16.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b1b52e6e8614d4a58b8e70cf51ec0cc21b256ad8206708bcff8139b5bbd6a59" +checksum = "9234163818fd8e2418fcde330655e757900d4236acd8cc70fef345ef91f6d865" dependencies = [ "log", "mac", diff --git a/Cargo.toml b/Cargo.toml index 685468b17..aef206ae4 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "librsvg" -version = "2.52.2" +version = "2.52.3" authors = ["Federico Mena Quintero "] build = "build.rs" edition = "2018" diff --git a/configure.ac b/configure.ac index 85e60cc05..7b517372f 100644 --- a/configure.ac +++ b/configure.ac @@ -3,7 +3,7 @@ AC_PREREQ([2.69]) # Package version, the "human readable" version m4_define([rsvg_major_version],[2]) m4_define([rsvg_minor_version],[52]) -m4_define([rsvg_micro_version],[2]) # Keep this in sync with Cargo.toml +m4_define([rsvg_micro_version],[3]) # Keep this in sync with Cargo.toml m4_define([rsvg_version],[rsvg_major_version.rsvg_minor_version.rsvg_micro_version]) # Library version information. To make a release: -- GitLab From 4ac6ec73f46b9b1a75edf0809eba702dfa880e16 Mon Sep 17 00:00:00 2001 From: Federico Mena Quintero Date: Tue, 26 Oct 2021 18:27:22 -0500 Subject: [PATCH 3/4] Update NEWS Part-of: --- NEWS | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/NEWS b/NEWS index 5b23ecca4..27764311b 100644 --- a/NEWS +++ b/NEWS @@ -1,3 +1,24 @@ +============== +Version 2.52.3 +============== + +Bugfixes, mostly for text layout. Also, text links in PDF! + +- #17 - Support text-decoration=overline. + +- #249 - Basic support for the unicode-bidi property. Librsvg still + considers each tspan independently of others, which is incorrect, but + at least bidi-override works now for a single embedding level. + +- #804 - Fix placement of tspan that changes the text direction. + +- #805 - :lang() selector should now match lang attribute from an + element's parent. (Michael Howell) + +- #806 - Fix the text-anchor property for right-to-left text. + +- #807 - PDF now includes links inside text elements. (Michael Howell) + ============== Version 2.52.2 ============== -- GitLab From b1124ad1e26f5ad1337532e8edbc0135e553d7ee Mon Sep 17 00:00:00 2001 From: Federico Mena Quintero Date: Tue, 26 Oct 2021 18:36:08 -0500 Subject: [PATCH 4/4] Add texts/fixtures/text to Makefile.am Part-of: --- tests/Makefile.am | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/Makefile.am b/tests/Makefile.am index ecff2fffa..5fa2c08c2 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -71,6 +71,7 @@ test_fixtures = \ $(wildcard $(srcdir)/fixtures/reftests/svg2/*.svg) \ $(wildcard $(srcdir)/fixtures/reftests/svg2/*.png) \ $(wildcard $(srcdir)/fixtures/render-crash/*.svg) \ + $(wildcard $(srcdir)/fixtures/text/*.svg) \ $(wildcard $(srcdir)/fixtures/dimensions/*.svg) EXTRA_DIST += \ -- GitLab