Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update stable Rust and other dependencies. #66

Merged
merged 4 commits into from
May 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ env:
# version like 1.70. Note that we only specify MAJOR.MINOR and not PATCH so that bugfixes still
# come automatically. If the version specified here is no longer the latest stable version,
# then please feel free to submit a PR that adjusts it along with the potential clippy fixes.
RUST_STABLE_VER: "1.77" # In quotes because otherwise (e.g.) 1.70 would be interpreted as 1.7
RUST_STABLE_VER: "1.78" # In quotes because otherwise (e.g.) 1.70 would be interpreted as 1.7
# The purpose of checking with the minimum supported Rust toolchain is to detect its staleness.
# If the compilation fails, then the version specified here needs to be bumped up to reality.
# Be sure to also update the rust-version property in the workspace Cargo.toml file,
Expand Down
8 changes: 4 additions & 4 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion examples/tiny_skia_render/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ publish = false
parley = { workspace = true, default-features = true }
skrifa = { workspace = true }
peniko = { workspace = true }
tiny-skia = "0.11"
tiny-skia = "0.11.4"

[lints]
workspace = true
2 changes: 1 addition & 1 deletion fontique/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ smallvec = "1.13.2"
memmap2 = { version = "0.9.4", optional = true }
unicode-script = { version = "0.5.6", optional = true }
core_maths = { version = "0.1.0", optional = true }
icu_properties = "1.4.0"
icu_properties = "1.4.1"
icu_locid = "1.4.0"
hashbrown = "0.14.5"

Expand Down
10 changes: 5 additions & 5 deletions fontique/src/backend/fontconfig/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
//! Extremely naive fontconfig xml parser to extract the data we need.

use roxmltree::Node;
use std::path::Path;
use std::path::{Path, PathBuf};

pub trait ParserSink {
fn include_path(&mut self, path: &Path);
Expand Down Expand Up @@ -175,7 +175,7 @@ fn include_config(path: &Path, sink: &mut impl ParserSink) -> std::io::Result<()
Ok(())
}

fn resolve_dir(node: Node, config_file_path: impl AsRef<Path>) -> Option<std::path::PathBuf> {
fn resolve_dir(node: Node, config_file_path: impl AsRef<Path>) -> Option<PathBuf> {
let dir_path = node.text()?;
let (xdg_env, xdg_fallback) = match node.tag_name().name() {
"include" => ("XDG_CONFIG_HOME", "~/.config"),
Expand All @@ -184,7 +184,7 @@ fn resolve_dir(node: Node, config_file_path: impl AsRef<Path>) -> Option<std::pa
};
let path = match node.attribute("prefix") {
Some("xdg") => {
std::path::PathBuf::from(std::env::var(xdg_env).unwrap_or_else(|_| xdg_fallback.into()))
PathBuf::from(std::env::var(xdg_env).unwrap_or_else(|_| xdg_fallback.into()))
.join(dir_path)
}
_ => {
Expand All @@ -193,14 +193,14 @@ fn resolve_dir(node: Node, config_file_path: impl AsRef<Path>) -> Option<std::pa
} else {
match config_file_path.as_ref().parent() {
Some(parent) => parent.join(dir_path),
None => std::path::Path::new(".").join(dir_path),
None => Path::new(".").join(dir_path),
}
}
}
};
Some(if let Ok(stripped_path) = path.strip_prefix("~") {
let home = config_home().unwrap_or("/".to_string());
std::path::Path::new(&home).join(stripped_path)
Path::new(&home).join(stripped_path)
} else {
path
})
Expand Down
13 changes: 7 additions & 6 deletions fontique/src/backend/fontconfig/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@
// SPDX-License-Identifier: Apache-2.0 OR MIT

use hashbrown::HashMap;
use std::{path::PathBuf, sync::Arc};
use std::path::{Path, PathBuf};
use std::sync::Arc;

use super::{
super::{Stretch, Style, Weight},
Expand Down Expand Up @@ -91,15 +92,15 @@ impl SystemFonts {
config::parse_config("/etc/fonts/fonts.conf".as_ref(), &mut config);
if let Ok(xdg_config_home) = std::env::var("XDG_CONFIG_HOME") {
config::parse_config(
std::path::PathBuf::from(xdg_config_home)
PathBuf::from(xdg_config_home)
.as_path()
.join("fontconfig/fonts.conf")
.as_path(),
&mut config,
);
} else if let Ok(user_home) = std::env::var("HOME") {
config::parse_config(
std::path::PathBuf::from(user_home)
PathBuf::from(user_home)
.as_path()
.join(".config/fontconfig/fonts.conf")
.as_path(),
Expand Down Expand Up @@ -295,14 +296,14 @@ struct Config {

impl config::ParserSink for Config {
fn alias(&mut self, family: &str, prefer: &[&str]) {
if let Some(generic) = super::GenericFamily::parse(family) {
if let Some(generic) = GenericFamily::parse(family) {
self.generics[generic as usize].extend(prefer.iter().map(|s| s.to_string()));
}
}

fn include_path(&mut self, _path: &std::path::Path) {}
fn include_path(&mut self, _path: &Path) {}

fn cache_path(&mut self, path: &std::path::Path) {
fn cache_path(&mut self, path: &Path) {
self.cache_dirs.push(path.into());
}

Expand Down
2 changes: 1 addition & 1 deletion parley/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ libm = ["fontique/libm", "skrifa/libm", "peniko/libm"]
system = ["std", "fontique/system"]

[dependencies]
swash = "0.1.15"
swash = "0.1.16"
skrifa = { workspace = true }
peniko = { workspace = true }
fontique = { workspace = true }