Skip to content
This repository has been archived by the owner on Feb 17, 2023. It is now read-only.

Staleness of fontconfig 2.11.1 causing problems #58

Open
wlottoculus opened this issue Jun 12, 2020 · 0 comments
Open

Staleness of fontconfig 2.11.1 causing problems #58

wlottoculus opened this issue Jun 12, 2020 · 0 comments

Comments

@wlottoculus
Copy link

fontconfig 2.11.1 is confused by config files from newer versions of fontconfig, causing it to spew lots of warnings like:

Fontconfig warning: line 5: unknown element "its:rules"
Fontconfig warning: line 6: unknown element "its:translateRule"
Fontconfig error: line 6: invalid attribute 'translate'
Fontconfig error: line 6: invalid attribute 'selector'
Fontconfig error: line 7: invalid attribute 'xmlns:its'
Fontconfig error: line 7: invalid attribute 'version'
Fontconfig warning: line 9: unknown element "description"
Fontconfig warning: "/etc/fonts/conf.d/10-hinting-slight.conf", line 4: unknown element "its:rules"
Fontconfig warning: "/etc/fonts/conf.d/10-hinting-slight.conf", line 5: unknown element "its:translateRule"
Fontconfig error: "/etc/fonts/conf.d/10-hinting-slight.conf", line 5: invalid attribute 'translate'
Fontconfig error: "/etc/fonts/conf.d/10-hinting-slight.conf", line 5: invalid attribute 'selector'
Fontconfig error: "/etc/fonts/conf.d/10-hinting-slight.conf", line 6: invalid attribute 'xmlns:its'
Fontconfig error: "/etc/fonts/conf.d/10-hinting-slight.conf", line 6: invalid attribute 'version'
Fontconfig warning: "/etc/fonts/conf.d/10-hinting-slight.conf", line 8: unknown element "description"

and to take excessive time to initialize. A test program consisting of nothing but:

use fontconfig::fontconfig as ffi;

fn main() {
    unsafe {
        let d = ffi::FcInitLoadConfigAndFonts();
        ffi::FcConfigDestroy(d);
    }
}

takes more than 10 seconds on my machine running Fedora. Replacing the embedded fontconfig sources with version 2.13.92 causes the warnings to disappear and drop the runtime of said program to less than a tenth of a second.

I only hit this because I did not have the fontconfig-devel package installed. Installing that package causes build.rs to use my system fontconfig instead of using the embedded font config.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant