servo / servo/font-kit

servo-fontconfig causes issues with fontconfig 2.23 in ubuntu 20.06(or others)

Open
#181 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Rust
Stars
840
Forks
137
Avg merge
4h 56m
Merged PRs (30d)
1

Description

The dependency on servo-fontconfig causes issues because it was built with an earlier version of fontconfig
this tends to mess up with most linux systems causing runtime errors of the following:

Fontconfig warning: "/etc/fonts/fonts.conf", line 5: unknown element "its:rules"
Fontconfig warning: "/etc/fonts/fonts.conf", line 6: unknown element "its:translateRule"
Fontconfig error: "/etc/fonts/fonts.conf", line 6: invalid attribute 'translate'
Fontconfig error: "/etc/fonts/fonts.conf", line 6: invalid attribute 'selector'
Fontconfig error: "/etc/fonts/fonts.conf", line 7: invalid attribute 'xmlns:its'
Fontconfig error: "/etc/fonts/fonts.conf", line 7: invalid attribute 'version'
......

I changes the original toml file to the following replacing servo-fontconfig to fontconfig, now it runs properly.

THIS FILE IS AUTOMATICALLY GENERATED BY CARGO

When uploading crates to the registry Cargo will automatically

"normalize" Cargo.toml files for maximal compatibility

with all versions of Cargo and also rewrite path dependencies

to registry (e.g., crates.io) dependencies

If you believe there's an error in this file please file an

issue against the rust-lang/cargo repository. If you're

editing this file be aware that the upstream Cargo.toml

will likely look very different (and much more reasonable)

[package]
edition = "2018"
name = "font-kit"
version = "0.7.1"
authors = ["Patrick Walton pcwalton@mimiga.net"]
exclude = ["resources/**"]
description = "A cross-platform font loading library"
homepage = "https://github.com/servo/font-kit"
readme = "README.md"
license = "MIT/Apache-2.0"
repository = "https://github.com/servo/font-kit"
[dependencies.bitflags]
version = "1"

[dependencies.byteorder]
version = "1.2"

[dependencies.float-ord]
version = "0.2"

[dependencies.freetype]
version = "^0.4.1"
optional = true

[dependencies.lazy_static]
version = "1.1"

[dependencies.libc]
version = "0.2"

[dependencies.log]
version = "0.4"

[dependencies.pathfinder_geometry]
version = "0.5"

[dependencies.pathfinder_simd]
version = "0.5"

[dependencies.fontconfig]
version = "0.2.0"

[dev-dependencies.colored]
version = "1.6"

[dev-dependencies.pbr]
version = "1.0"

[dev-dependencies.prettytable-rs]
version = "0.8"

[features]
loader-freetype = ["freetype"]
loader-freetype-default = ["loader-freetype"]
[target."cfg(any(target_os = "macos", target_os = "ios"))".dependencies.core-foundation]
version = "0.7"

[target."cfg(any(target_os = "macos", target_os = "ios"))".dependencies.core-graphics]
version = "0.19"

[target."cfg(any(target_os = "macos", target_os = "ios"))".dependencies.core-text]
version = "15"
[target."cfg(not(any(target_arch = "wasm32", target_family = "windows", target_os = "android")))".dependencies.dirs]
version = "2.0"
[target."cfg(not(any(target_family = "windows", target_os = "macos", target_os = "ios")))".dependencies.freetype]
version = "^0.4.1"
[target."cfg(not(any(target_family = "windows", target_os = "macos", target_os = "ios", target_arch = "wasm32")))".dependencies.fontconfig]
version = "0.2.0"
[target."cfg(not(target_arch = "wasm32"))".dependencies.walkdir]
version = "2.1"
[target."cfg(target_family = "windows")".dependencies.dwrote]
version = "0.11"
default-features = false

[target."cfg(target_family = "windows")".dependencies.winapi]
version = "0.3"
features = ["dwrite", "minwindef", "sysinfoapi", "winbase", "winnt"]

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the generated Cargo.toml dependency declarations shown in the report, then reproduce the fontconfig warnings and runtime errors on Ubuntu or another Linux system. Compare the servo-fontconfig and fontconfig dependency choices and verify that the resulting font-kit build runs without those errors.

Written by the indexing model from the issue text.

Assessment

Tech stack
linux, rust
Domain
build-system, operating-systems
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.