Closed Be-ing closed 2 years ago
This is a draft until https://github.com/yeslogic/fontconfig-rs/pull/12 is merged upstream.
See also: https://github.com/servo/libfontconfig/issues/65 https://github.com/yeslogic/fontconfig-rs/issues/11
Having two different -sys crates for fontconfig has created a messy situation because Cargo will refuse to build if two -sys crates link the same library by specifying link = "fontconfig"
in Cargo.toml. It would be great if we could converge on one and deprecate the other. If you agree to drop servo-fontconfig, I'd be happy to make pull request's for servo-fontconfig's other reverse dependencies to switch them to yeslogic-fontconfig-sys.
PR to switch Slint to yeslogic-fontconfig-sys from servo-fontconfig: https://github.com/slint-ui/slint/pull/956
This is a draft until https://github.com/yeslogic/fontconfig-rs/pull/12 is merged upstream.
That was merged and released upstream. This is ready for review.
Hi @jdm are you still maintaining this crate?
This seems like a reasonable path forwards. Thanks! @bors-servo r+
:pushpin: Commit 68d461e has been approved by jdm
:hourglass: Testing commit 68d461eb205e84f2b52a85976ed8d545e57f73c1 with merge 60812fd2633aad876f4b8723443e18369d622f2c...
:broken_heart: Test failed - checks-github
Can you run cargo fmt
?
Okay, I ran cargo fmt
.
@bors-servo r+
:pushpin: Commit 4130e14 has been approved by jdm
:hourglass: Testing commit 4130e14f0e262cf065f3bc71630492808948f463 with merge 75f99cf648885c180c7ccfb9b6d55eae259e1d71...
:sunny: Test successful - checks-github Approved by: jdm Pushing 75f99cf648885c180c7ccfb9b6d55eae259e1d71 to master...
Thanks for merging. Could you publish a new release of the crate?
Done.
servo-fontconfig statically links a vendored fontconfig library if fontconfig is not found by pkgconfig. Using a vendored fontconfig library instead of the system fontconfig library doesn't actually work well though: https://github.com/slint-ui/slint/issues/88 Building a vendored copy of fontconfig is also problematic because fontconfig has a lot of C dependencies, which makes it difficult to cross compile the vendored copy of fontconfig:
Instead of using a vendored copy, with https://github.com/yeslogic/fontconfig-rs/pull/12 yeslogic-fontconfig-sys will have a Cargo feature to dlopen fontconfig at runtime instead of linking it at build time. This is exposed in font-kit with the new source-fontconfig-dlopen feature, which is disabled by default. This feature makes it considerably easier to cross compile by avoiding the need to cross compile fontconfig and all its dependencies.