mirror of
https://github.com/storytold/vectorcraft.git
synced 2026-10-24 17:56:50 -06:00
Font services load their fonts with GDI at run time, from files in their own folders, without installing them: neither the font folders nor the registry list them, so the font scan never saw them. DirectWrite's system font collection holds them since Windows 10 1607. - vectorcraft-text: `set_platform_font_files` lets the app name font files the platform knows; each scan and each check for installed fonts asks again and reads those outside the font folders. A file named by itself is read whatever its extension (font services keep fonts in files without one). - The desktop app lists the local files of DirectWrite's system font collection on Windows (`system_fonts.rs`, through the windows crate already in the build), read in place. - The check for fonts installed while the app was in the background runs on a thread: DirectWrite's check for updates takes about 50 ms. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
58 lines
2.5 KiB
TOML
58 lines
2.5 KiB
TOML
[package]
|
|
name = "vectorcraft"
|
|
version.workspace = true
|
|
edition.workspace = true
|
|
license.workspace = true
|
|
publish = false
|
|
default-run = "vectorcraft"
|
|
|
|
[lints]
|
|
workspace = true
|
|
|
|
[features]
|
|
default = ["wgpu", "accessibility"]
|
|
wgpu = ["eframe/wgpu"]
|
|
accessibility = ["eframe/accesskit"]
|
|
# Build with --no-default-features --features windows7 and the win7 Rust target.
|
|
windows7 = ["eframe/glow"]
|
|
|
|
[dependencies]
|
|
vectorcraft-engine = { workspace = true }
|
|
vectorcraft-ui-egui = { workspace = true }
|
|
vectorcraft-text = { workspace = true }
|
|
eframe = { workspace = true, features = ["default_fonts", "wayland", "x11"] }
|
|
egui = { workspace = true }
|
|
serde_json = { workspace = true }
|
|
log = { workspace = true }
|
|
|
|
[target.'cfg(not(target_arch = "wasm32"))'.dependencies]
|
|
rfd = { workspace = true }
|
|
# wayland-data-control: native Wayland clipboard (Linux; X11 through XWayland only sees what X11 apps copied).
|
|
arboard = { workspace = true, features = ["image-data", "wayland-data-control"] }
|
|
image = { workspace = true }
|
|
webbrowser = { workspace = true }
|
|
# The window's monitors, size and position (the same winit eframe runs on).
|
|
winit = { version = "0.30", default-features = false }
|
|
|
|
[target.'cfg(windows)'.dependencies]
|
|
clipboard-win = { workspace = true }
|
|
|
|
# DirectWrite's system font collection (src/system_fonts.rs): fonts that font services such as
|
|
# Adobe Fonts load in place (#579). MIT OR Apache-2.0, already in the build through accesskit.
|
|
[target.'cfg(all(windows, not(target_vendor = "win7")))'.dependencies]
|
|
windows = { version = "0.62", features = ["Win32_Graphics_DirectWrite"] }
|
|
|
|
[target.'cfg(target_os = "macos")'.dependencies]
|
|
# The macOS menu bar (src/mac_menu.rs): Tauri's menu crate, AppKit menus behind a safe API (no GTK
|
|
# with default features off). Pinned exactly: review the diff before bumping.
|
|
muda = { version = "=0.21.1", default-features = false }
|
|
objc2 = "0.6"
|
|
objc2-app-kit = { version = "0.3", default-features = false, features = ["std", "NSApplication", "NSMenu", "NSEvent", "NSPasteboard", "NSResponder", "NSTextInputContext"] }
|
|
# Files opened from Finder and the Dock (src/open_documents.rs) and pasted bitmaps (src/clipboard.rs); both already come with winit, muda and rfd.
|
|
objc2-foundation = { version = "0.3", default-features = false, features = ["std", "block2", "NSArray", "NSData", "NSNotification", "NSOperation", "NSString", "NSURL"] }
|
|
block2 = "0.6"
|
|
|
|
[build-dependencies]
|
|
# Icon + VERSIONINFO for vectorcraft.exe; build.rs only uses it when targeting Windows.
|
|
winresource = "0.1"
|