mirror of
https://github.com/storytold/vectorcraft.git
synced 2026-10-14 19:26:56 -04:00
The font scan read only the macOS font folders and the Additional Fonts Folder, so fonts that apps and font managers register with CoreText from their own folders were missing from the font menus, and exports set such type in the fallback font. CoreText's font manager lists them with the installed fonts. - `mac_fonts.rs` lists the files of the fonts the font manager has available (`CTFontManagerCopyAvailableFontURLs`, through objc2-core-text), keeping only file URLs as `open_documents.rs` does (#433). The desktop app and `vectorcraft-cli` install it as they install the DirectWrite lister on Windows, and the scan reads the files outside the font folders in place. - The scan leaves out faces with no outlines the font engine draws (no glyf, CFF, CFF2 or VARC table), on every platform. CoreText lists Apple's PingFang UI interface font (macOS 27), whose outlines are in an hvgl table; if the scan cataloged it, PingFang SC would count as installed, and Chinese characters in fallback text, Japanese kanji included, would draw blank. - Tests: the list holds the installed fonts by full path, a font registered from another folder is listed while it is registered, and a face without outlines the engine draws isn't cataloged.
43 lines
1.6 KiB
TOML
43 lines
1.6 KiB
TOML
[package]
|
|
name = "vectorcraft-cli"
|
|
version.workspace = true
|
|
edition.workspace = true
|
|
license.workspace = true
|
|
publish = false
|
|
description = "VectorCraft command line: MCP server (stdio) and headless batch runs"
|
|
|
|
[[bin]]
|
|
name = "vectorcraft-cli"
|
|
path = "src/main.rs"
|
|
|
|
[lints]
|
|
workspace = true
|
|
|
|
[dependencies]
|
|
vectorcraft-color = { workspace = true }
|
|
vectorcraft-doc = { workspace = true }
|
|
vectorcraft-engine = { workspace = true }
|
|
vectorcraft-format = { workspace = true }
|
|
vectorcraft-geom = { workspace = true }
|
|
vectorcraft-svg = { workspace = true }
|
|
vectorcraft-mcp = { workspace = true }
|
|
vectorcraft-render = { workspace = true }
|
|
vectorcraft-text = { workspace = true }
|
|
serde_json = { workspace = true }
|
|
log = { workspace = true }
|
|
|
|
# DirectWrite's system font collection (the desktop app's src/system_fonts.rs, shared): fonts that
|
|
# font services such as Adobe Fonts load in place (#579). MIT OR Apache-2.0.
|
|
[target.'cfg(all(windows, not(target_vendor = "win7")))'.dependencies]
|
|
windows = { version = "0.62", features = ["Win32_Graphics_DirectWrite"] }
|
|
|
|
# CoreText's font manager (the desktop app's src/mac_fonts.rs, shared): fonts that apps and font
|
|
# managers register from their own folders (#579). Zlib OR Apache-2.0 OR MIT.
|
|
[target.'cfg(target_os = "macos")'.dependencies]
|
|
objc2-core-foundation = { version = "0.3", default-features = false, features = ["std", "CFArray", "CFString", "CFURL"] }
|
|
objc2-core-text = { version = "0.3", default-features = false, features = ["std", "CTFontManager"] }
|
|
|
|
[dev-dependencies]
|
|
vectorcraft-testkit = { workspace = true }
|
|
serde_json = { workspace = true }
|