Skip to content
Open
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
44 changes: 35 additions & 9 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,10 @@
name = "crossfont"
version = "0.8.0"
description = "Cross platform native font loading and rasterization"
authors = ["Christian Duerr <[email protected]>", "Joe Wilm <[email protected]>"]
authors = [
"Christian Duerr <[email protected]>",
"Joe Wilm <[email protected]>",
]
repository = "https://github.com/alacritty/crossfont.git"
documentation = "https://docs.rs/crossfont"
license = "Apache-2.0"
Expand All @@ -13,29 +16,52 @@ edition = "2021"
rust-version = "1.77.0"

[dependencies]
libc = "0.2"
foreign-types = "0.5"
log = "0.4"

[target.'cfg(not(any(target_os = "macos", windows)))'.dependencies]
yeslogic-fontconfig-sys = "6.0.0"
freetype-rs = "0.36.0"
foreign-types = "0.5"

[target.'cfg(not(any(target_os = "macos", windows)))'.build-dependencies]
pkg-config = "0.3"

[target.'cfg(target_os = "macos")'.dependencies]
core-foundation = "0.10.0"
core-text = "21.0.0"
core-graphics = "0.24.0"
core-foundation-sys = "0.8.4"
once_cell = "1.12"
objc2 = "0.5.1"
objc2-foundation = { version = "0.2.2", features = [
objc2 = "0.6.1"
objc2-foundation = { version = "0.3.1", default-features = false, features = [
"std",
"NSString",
"NSUserDefaults",
"NSValue",
] }
objc2-core-foundation = { version = "0.3.1", default-features = false, features = [
"std",
"CFArray",
"CFBase",
"CFCGTypes",
"CFDictionary",
"CFNumber",
"CFSet",
"CFString",
"CFURL",
] }
objc2-core-text = { version = "0.3.1", default-features = false, features = [
"std",
"objc2-core-graphics",
"CTFont",
"CTFontCollection",
"CTFontDescriptor",
"CTFontTraits",
] }
objc2-core-graphics = { version = "0.3.1", default-features = false, features = [
"std",
"CGBitmapContext",
"CGColorSpace",
"CGContext",
"CGFont",
"CGImage",
] }

[target.'cfg(windows)'.dependencies]
dwrote = { version = "0.11" }
Expand Down
10 changes: 0 additions & 10 deletions src/darwin/byte_order.rs
Original file line number Diff line number Diff line change
@@ -1,15 +1,5 @@
//! Constants for bitmap byte order.

#![allow(non_upper_case_globals)]
pub const kCGBitmapByteOrder32Little: u32 = 2 << 12;
pub const kCGBitmapByteOrder32Big: u32 = 4 << 12;

#[cfg(target_endian = "little")]
pub const kCGBitmapByteOrder32Host: u32 = kCGBitmapByteOrder32Little;

#[cfg(target_endian = "big")]
pub const kCGBitmapByteOrder32Host: u32 = kCGBitmapByteOrder32Big;

#[cfg(target_endian = "little")]
pub fn extract_rgba(bytes: &[u8]) -> Vec<u8> {
let pixels = bytes.len() / 4;
Expand Down
Loading
Loading