[package]
description = "A simple typography engine for CJK languages, especially designed for game rich-text."
edition = "2021"
exclude = [
  "examples",
]
license = "Apache-2.0"
name = "huozi"
repository = "https://github.com/Icemic/huozi-rs"
version = "0.4.2"

[features]
ab_glyph = ["dep:ab_glyph"]
charsets = []
default = ["fontdue", "wgpu", "charsets", "sdf", "layout", "parser"]
fontdue = ["dep:fontdue"]
layout = []
parser = ["dep:nom"]
sdf = []
wgpu = ["dep:wgpu"]

[dependencies]
ab_glyph = {version = "0.2", optional = true}
anyhow = "1"
bytemuck = {version = "1.4", features = ["derive"]}
csscolorparser = {version = "0.6", features = ["serde"]}
fontdue = {version = "0.7.2", optional = true}
image = {version = "0.24.6", default-features = false, features = ["png"]}
log = "0.4"
lru = "0.12.0"
nom = {version = "7.1", optional = true}
serde = {version = "1", features = ["derive"]}
wgpu = {version = "0.19.1", optional = true}

[dev-dependencies]
cfg-if = "1"
env_logger = "0.11"
pollster = "0.3"
wgpu = "0.19.1"
winit = "0.29"

[target.'cfg(target_arch = "wasm32")'.dev-dependencies]
console_error_panic_hook = "0.1"
console_log = "0.2"
wasm-bindgen = "0.2"
wasm-bindgen-futures = "0.4"
web-sys = {version = "0.3", features = [
  "Document",
  "Window",
  "Element",
]}
wgpu = {version = "0.19.1", features = ["webgl"]}
