mirror of
https://github.com/storytold/pdfcraft.git
synced 2026-10-25 18:47:22 -06:00
On wasm, detect_system_lang() always returned English, so Auto showed English whatever the browser's language. It now reads navigator.languages in order, then navigator.language, and takes the first tag with a catalog, as the desktop builds do with the system languages and as VectorCraft and FilmCraft do in their browser builds. Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
86 lines
3.8 KiB
TOML
86 lines
3.8 KiB
TOML
[package]
|
|
name = "pdfcraft-ui-egui"
|
|
description = "The egui shell of PdfCraft"
|
|
version.workspace = true
|
|
edition.workspace = true
|
|
license.workspace = true
|
|
rust-version = "1.95"
|
|
|
|
[lints]
|
|
workspace = true
|
|
|
|
[dependencies]
|
|
craft-ui = { workspace = true }
|
|
# macOS: a window close quits through `terminate:` (the Touch Bar crash, #1136); elsewhere a no-op.
|
|
craft-quit = { workspace = true, features = ["egui"] }
|
|
pdfcraft-fonts = { workspace = true }
|
|
pdfcraft-engine = { workspace = true }
|
|
pdfcraft-cos = { workspace = true }
|
|
pdfcraft-render = { workspace = true }
|
|
pdfcraft-model = { workspace = true }
|
|
pdfcraft-platform = { workspace = true }
|
|
egui = { workspace = true, features = ["bytemuck"] }
|
|
egui_extras = { workspace = true }
|
|
eframe = { workspace = true, features = ["default_fonts", "wgpu", "accesskit", "persistence", "links"] }
|
|
serde = { workspace = true }
|
|
serde_json = { workspace = true }
|
|
log = { workspace = true }
|
|
# Hands rendered rasters to egui as its pixels, without copying; already in the tree through egui and wgpu.
|
|
bytemuck = { version = "1", features = ["extern_crate_alloc"] }
|
|
|
|
rfd = { workspace = true }
|
|
png = "0.18"
|
|
base64 = "0.22"
|
|
# Right-to-left file names in the chrome (egui shapes but does not reorder); already in the tree.
|
|
unicode-bidi = "0.3"
|
|
# Checks that an installed fallback font parses and has the glyphs, and reads the vertical metrics
|
|
# that put fallback faces on the interface's baseline (#1676); the same skrifa egui uses.
|
|
skrifa = "0.44"
|
|
|
|
[target.'cfg(not(target_arch = "wasm32"))'.dependencies]
|
|
# Control-channel tokens.
|
|
getrandom = "0.4"
|
|
# Create ▸ Clipboard (images; already in the tree through egui-winit).
|
|
arboard = { version = "3.6", default-features = false, features = ["image-data"] }
|
|
# Waits for native file pickers off the UI thread (already in the tree through wgpu).
|
|
pollster = "1.0"
|
|
|
|
[target.'cfg(all(unix, not(target_os = "macos"), not(target_arch = "wasm32")))'.dependencies]
|
|
# Discover configured font directories without linking libfontconfig or running a subprocess.
|
|
fontconfig-parser = "0.5.8"
|
|
|
|
[target.'cfg(target_os = "macos")'.dependencies]
|
|
# Where the pointer is while files are dragged over the window (winit doesn't say): safe AppKit
|
|
# calls only. All three are already in the tree through arboard and rfd.
|
|
objc2 = "0.6"
|
|
objc2-app-kit = { version = "0.3", default-features = false, features = ["std", "NSEvent", "NSScreen"] }
|
|
objc2-foundation = { version = "0.3", default-features = false, features = ["std", "NSArray", "NSGeometry"] }
|
|
# A plain fsync where a volume refuses the full flush `sync_all` asks for (SMB, FUSE); already in
|
|
# the tree through pdfcraft-cli.
|
|
rustix = { version = "1", features = ["fs"] }
|
|
|
|
[target.'cfg(windows)'.dependencies]
|
|
# Auto interface language: the Windows display language, without starting a process.
|
|
sys-locale = "0.3"
|
|
# Region ▸ Measurement system for the default Units, read from the registry without starting reg.exe;
|
|
# where the pointer is while files are dragged over the window (winit doesn't say).
|
|
winsafe = { version = "0.0.29", default-features = false, features = ["advapi", "user"] }
|
|
|
|
[target.'cfg(target_arch = "wasm32")'.dependencies]
|
|
rfd = { workspace = true, features = ["file-handle-inner"] }
|
|
wasm-bindgen-futures = "0.4"
|
|
wasm-bindgen = "0.2"
|
|
js-sys = "0.3"
|
|
web-sys = { version = "0.3", features = ["Window", "Document", "Element", "HtmlElement", "HtmlAnchorElement", "Blob", "BlobPropertyBag", "Url", "HtmlIFrameElement", "HtmlImageElement", "HtmlCollection", "Node", "EventTarget", "Navigator"] }
|
|
|
|
[dev-dependencies]
|
|
pdfcraft-xfa = { workspace = true }
|
|
egui_kittest = { workspace = true, features = ["eframe", "wgpu"] }
|
|
image = { version = "0.25", default-features = false, features = ["png"] }
|
|
# Glyph-coverage test of the interface fonts; the same skrifa pdfcraft-fonts already uses.
|
|
skrifa = "0.44"
|
|
|
|
[build-dependencies]
|
|
serde_json = { workspace = true }
|
|
toml = "1"
|