diff --git a/ROADMAP.md b/ROADMAP.md index 2286b0c6e..db8ea3e69 100644 --- a/ROADMAP.md +++ b/ROADMAP.md @@ -366,6 +366,7 @@ Ranked; detail and milestones in [`docs/roadmap.md`](docs/roadmap.md). | Date | Change | Summary | |---|---|---| +| 2026-11-24 | minor | M7: New York, Apple's serif that macOS installs as the hidden `.New York`, is found and listed under its public name (it was a missing font). Numbers unchanged. | | 2026-11-18 | minor | M8: design context for AI agents. `inspect.designContext` and the MCP tool `design_context` read the selection (or `ids`, or a `scope`) in one call: a tree where each layer keeps apart `explicit` values, `derived` ones layout worked out and `unsupported` ones with no direct CSS equivalent, joined with the variables (every mode's stored and resolved value), styles, components, fonts and assets it uses, and what the design leaves `missing`. A connected instance gives its code instead of its layers, and a result that wouldn't fit the client asks for fewer layers. Numbers unchanged | | 2026-11-18 | minor | M3, gap 10: library analytics count insertions and detachments of styles and variables. Applying one, or copying or duplicating content that uses it, inserts it; the Detach button detaches it; an instance counts as its component alone. Show usage and `library.usage` give them per style and variable over the chosen period. Modes aren't counted. Numbers unchanged. Tests: `library_asset_counts_tests`, `library_assets_tests`. | | 2026-11-18 | minor | M9, gap 6: the browser build uses team libraries and plugin directories on a server, through its WebSocket requests: adding a library by its link, its styles and components, publishing to it, Show usage and the reports a file sends; browsing a directory and installing from it, for the page only. Scripts through `window.figcraft` still can't, as commands there don't wait for the server. Numbers unchanged. Tests: `exchange_tests`. | diff --git a/crates/text/src/fontdb.rs b/crates/text/src/fontdb.rs index fa29e2130..c236f74fb 100644 --- a/crates/text/src/fontdb.rs +++ b/crates/text/src/fontdb.rs @@ -1515,6 +1515,8 @@ fn public_family(family: &str) -> Option { match hidden { "SF Compact" | "SF Compact Rounded" => Some(hidden.to_string()), "SF NS Rounded" => Some("SF Pro Rounded".into()), + // Apple's serif, also published as a download; macOS installs it as `.New York`. + "New York" => Some(hidden.to_string()), _ => None, } } diff --git a/crates/text/src/fontdb_tests.rs b/crates/text/src/fontdb_tests.rs index 2585ced73..3921296f2 100644 --- a/crates/text/src/fontdb_tests.rs +++ b/crates/text/src/fontdb_tests.rs @@ -461,10 +461,31 @@ fn hidden_apple_families_take_public_names() { assert_eq!(public_family(".SF Compact").as_deref(), Some("SF Compact")); assert_eq!(public_family(".SF Compact Rounded").as_deref(), Some("SF Compact Rounded")); assert_eq!(public_family(".SF NS Rounded").as_deref(), Some("SF Pro Rounded")); + assert_eq!(public_family(".New York").as_deref(), Some("New York")); assert_eq!(public_family(".Keyboard"), None); assert_eq!(public_family("Inter").as_deref(), Some("Inter")); } +#[test] +fn new_york_is_found_under_its_public_name() { + // macOS installs New York as `.New York` (a dot keeps it out of font menus): it used to be + // skipped, so "New York" was a missing font. Only on a Mac that has the files. + let dir = std::path::Path::new("/System/Library/Fonts"); + if !dir.join("NewYork.ttf").is_file() || !dir.join("NewYorkItalic.ttf").is_file() { + return; + } + let mut pending = BTreeMap::new(); + scan_dir(dir, 0, &mut pending); + let mut db = FontDb { pending, ..FontDb::default() }; + let families = db.families(); + assert!(families.iter().any(|f| f == "New York"), "{families:?}"); + assert!(families.iter().all(|f| !f.starts_with('.')), "dot names stay out of the list: {families:?}"); + for (style, italic) in [("Regular", false), ("Italic", true)] { + let face = db.find("New York", style).expect("New York loads"); + assert_eq!((face.family.as_str(), face.italic), ("New York", italic), "{style}"); + } +} + /// A named style keeps its own optical size whatever the text size (existing documents render as /// before); a custom `opsz` value (what a `.sketch` import sets) wins. Needs a variable font with an /// optical size axis and named instances: macOS's or Windows' system font.