# Copyright © SixtyFPS GmbH <info@slint.dev>
# SPDX-License-Identifier: GPL-3.0-only OR LicenseRef-Slint-Royalty-free-1.2 OR LicenseRef-Slint-commercial

[package]
name = "i-slint-renderer-femtovg"
description = "FemtoVG based renderer for Slint"
authors.workspace = true
edition.workspace = true
homepage.workspace = true
license.workspace = true
repository.workspace = true
rust-version.workspace = true
version.workspace = true

[lib]
path = "lib.rs"

[features]
default = []

[dependencies]
i-slint-core = { workspace = true, features = ["default", "box-shadow-cache", "shared-fontdb"] }
i-slint-core-macros = { workspace = true, features = ["default"] }
i-slint-common = { workspace = true, features = ["default"] }

const-field-offset = { version = "0.1", path = "../../../helper_crates/const-field-offset" }

cfg-if = "1"
derive_more = "0.99.5"
lyon_path = "1.0"
once_cell = "1.5"
pin-weak = "1"
scoped-tls-hkt = "0.1"
raw-window-handle = { version = "0.5", features = ["alloc"] }
femtovg = { version = "0.9.0" }
ttf-parser = { version = "0.20.0" } # Use the same version was femtovg's rustybuzz, to avoid duplicate crates
unicode-script = { version = "0.5.4" } # Use the same version was femtovg's rustybuzz, to avoid duplicate crates
imgref = { version = "1.6.1" }
rgb = { version = "0.8.27" }

glow = { version = "0.13" }
unicode-segmentation = { version = "1.8.0" }

[target.'cfg(target_family = "windows")'.dependencies]
winapi = { version = "0.3", features = ["dwrite"] }
dwrote = { version = "0.11.0" }

[target.'cfg(target_os = "macos")'.dependencies]
# For GL rendering
core-foundation = { version = "0.9.1" }
core-text = { version = "20.1.0" }

[target.'cfg(target_arch = "wasm32")'.dependencies]
web-sys = { version = "0.3", features=["console", "WebGlContextAttributes", "CanvasRenderingContext2d", "HtmlInputElement", "HtmlCanvasElement", "Window", "Document"] }
wasm-bindgen = { version = "0.2" }
