mirror of
https://github.com/storytold/figcraft.git
synced 2026-10-29 21:06:50 -06:00
M6: .fig import resolves library text styles linked by asset key and orders restated override rows by level (#1234) (#1515)
Style links that name a library style by its asset key and version resolve to the file's copy of the style, as variable links already did. The linked text style beats the copies of its values below the row that links it; rows above that one still win. Override rows that restate a nested level (overrideLevel) apply at that level instead of in wire order.
This commit is contained in:
+2
-1
@@ -2,7 +2,7 @@
|
||||
|
||||
**Stage: alpha** · next: beta, ~26 points and ~162–292 h away (one Opus 5.5 agent; ~33–67 h wall-clock with 5 agents)
|
||||
|
||||
> **Last reviewed:** 2026-10-10 · **Last updated:** 2026-10-29 · **Change:** minor (`.fig` import keeps the file's saved line breaks while the text and its box are unedited (#1236); Download a missing free font from the Missing fonts window (`font.download`, #754); the web build's wasm back under its 24 MiB gate (#1472); shadows of images with transparent pixels follow their alpha (#1289); Crop image: Object ▸ Crop image, the right-click menu and the image fill row enter crop mode (`image.crop`, #1464); offline Penpot 2.x import/export (#1143); optional batch continue-on-error with per-step outcomes (#1386); the Design panel's sections on one grid (#858); FigJam outer shape outlines and sticky body fallback beside author text (#1341, #1397); images placed at their own size, 2x screenshots in points (#1360); the toolbar on one 32 pt grid, without its Resources button (#1210); M4: zero-length round-capped dashes draw dots; dash expansion uses the existing safety budget; extracted from #1143; Arabic draft catalog; scaled instances keep their scale when their main is rebuilt (#922); .fig embedded images are copied once per blob, not once per hash (#1059); page ruler guides survive save and reopen (#1476); colour picker LCH and OKLCH models; non-ASCII layer names transliterate in code export (#1235); branches in live sessions and branch history entries, gap 17; plugin widgets take text input and a property menu (plugin API 4); boards: templates and tables; boards: a shared timer and voting sessions; boards: the dot grid, connector ends dragged to re-attach, curved connectors; Installed weights of an embedded font family (#1246); `.sketch` import, best effort (Sketch 48 and newer); CJK line breaking: JIS X 4051's line-start and line-end sets completed with the halfwidth small kana, the halfwidth and spacing (semi-)voiced sound marks, the iteration marks 〱–〵 and the halfwidth parentheses, with behaviour cases for each; Adobe Fonts found on macOS (#298); egui 0.37 hidden-capture deadline contract; Dev Mode measurements kept on the canvas and a read-only layers panel; boards: a board area row and progress entry; community fixes in #507, #510, #529 and #530: auto-save, a text box by dragging, batch step references, removing someone from a live session, Russian and Turkish catalogs reviewed, Czech and Indonesian drafts, the Japanese draft completed, zoom previews, the web clipboard, Alt-drag snapping and Cmd+D repeat, recovery copies, crash and rollback fixes, colour emoji, `.fig` import fixes; earlier changes are in the revision history below) · **Target:** Figma Design (desktop app 126.10.7)
|
||||
> **Last reviewed:** 2026-10-10 · **Last updated:** 2026-10-29 · **Change:** minor (`.fig` import: library text styles linked by asset key, and override rows restating a nested level (#1234); `.fig` import keeps the file's saved line breaks while the text and its box are unedited (#1236); Download a missing free font from the Missing fonts window (`font.download`, #754); the web build's wasm back under its 24 MiB gate (#1472); shadows of images with transparent pixels follow their alpha (#1289); Crop image: Object ▸ Crop image, the right-click menu and the image fill row enter crop mode (`image.crop`, #1464); offline Penpot 2.x import/export (#1143); optional batch continue-on-error with per-step outcomes (#1386); the Design panel's sections on one grid (#858); FigJam outer shape outlines and sticky body fallback beside author text (#1341, #1397); images placed at their own size, 2x screenshots in points (#1360); the toolbar on one 32 pt grid, without its Resources button (#1210); M4: zero-length round-capped dashes draw dots; dash expansion uses the existing safety budget; extracted from #1143; Arabic draft catalog; scaled instances keep their scale when their main is rebuilt (#922); .fig embedded images are copied once per blob, not once per hash (#1059); page ruler guides survive save and reopen (#1476); colour picker LCH and OKLCH models; non-ASCII layer names transliterate in code export (#1235); branches in live sessions and branch history entries, gap 17; plugin widgets take text input and a property menu (plugin API 4); boards: templates and tables; boards: a shared timer and voting sessions; boards: the dot grid, connector ends dragged to re-attach, curved connectors; Installed weights of an embedded font family (#1246); `.sketch` import, best effort (Sketch 48 and newer); CJK line breaking: JIS X 4051's line-start and line-end sets completed with the halfwidth small kana, the halfwidth and spacing (semi-)voiced sound marks, the iteration marks 〱–〵 and the halfwidth parentheses, with behaviour cases for each; Adobe Fonts found on macOS (#298); egui 0.37 hidden-capture deadline contract; Dev Mode measurements kept on the canvas and a read-only layers panel; boards: a board area row and progress entry; community fixes in #507, #510, #529 and #530: auto-save, a text box by dragging, batch step references, removing someone from a live session, Russian and Turkish catalogs reviewed, Czech and Indonesian drafts, the Japanese draft completed, zoom previews, the web clipboard, Alt-drag snapping and Cmd+D repeat, recovery copies, crash and rollback fixes, colour emoji, `.fig` import fixes; earlier changes are in the revision history below) · **Target:** Figma Design (desktop app 126.10.7)
|
||||
|
||||
FigCraft is a clean-room, open-source, pure-Rust reimplementation of the Figma design workflow,
|
||||
native on macOS, Windows, Linux and FreeBSD and in the browser, fully drivable by agents through
|
||||
@@ -355,6 +355,7 @@ Ranked; detail and milestones in [`docs/roadmap.md`](docs/roadmap.md).
|
||||
|
||||
| Date | Change | Summary |
|
||||
|---|---|---|
|
||||
| 2026-10-29 | minor | M6, #1234: `.fig` import resolves style links that name a library style by its asset key and version instead of a guid (the file's own copy of the style), as variable links already were; text in instances of library components kept a stale copy of the style's values and no link. The linked text style beats the copies of its values on the layer and on the override rows below the row that links it, and rows above that row (an outer instance's size, say) still win. Override rows that restate a nested level's overrides (`overrideLevel`) apply at that level, below the instance's own rows, instead of in wire order. Synthetic regression tests in `text_style_tests`. Numbers unchanged |
|
||||
| 2026-10-29 | minor | M6, #1236 (gap 1): imported `.fig` text keeps the line breaks the file saved with it (`derivedTextData`), so a font whose advances differ slightly from the file's (another build of the family, a stand-in) no longer wraps a word early or splits one in a narrow box. The breaks hold only while the box width and everything that moves a break are as saved (characters, fonts, sizes, spacing, case, axes, features, lists, paragraph settings; paints, links and vertical settings don't count), and are given up where a line would come out more than 3% (+1 px) wider than its box; they are kept in `.figcraft`. The line breaker was checked and is unchanged: trailing spaces and the letter spacing after a line's last glyph already stay out of the fit test, box widths aren't rounded and the tolerance is 1e-6 px, so the differences come from the fonts. Synthetic tests in `saved_breaks_tests` and `fig::text_wrap_tests`; not checked on real files. Numbers unchanged |
|
||||
| 2026-10-29 | minor | #754, #1025: the Missing fonts window offers Download for a family the suite's font store has (Google Fonts, Noto: craft-libs' `craft-font-store`, its pinned indexes compiled in). The first Download asks the user to allow downloading fonts (off until then; the setting is the Craft apps' shared one); the files download on a thread of their own, each checked against the index's size and sha256 before it is installed into the shared font folder, which the font scan now reads; the row shows progress or why it failed, and once installed the file's text fits the real font and the family leaves the list. `font.download {family}` and `font.downloads` are commands, but no command turns downloading on; agents install only while the user has it on. Desktop only. No cancel, no turning it off from FigCraft, no substitute picker. Tests: `fonts::download::tests`, `missing_fonts_tests`. Numbers unchanged |
|
||||
| 2026-10-29 | minor | Web wasm size (#1472): the release wasm is 23,915,213 bytes (22.8 MiB), down from 25,982,540 (24.8 MiB), 1.2 MiB under the gate. Catalog rows hold their plural forms behind a reference (two words, not eight) and the browser build compiles with wasm SIMD, so the glyph rasterizer's scalar fallback is left out; the 24 MiB gate in `packaging/web/package.sh` is restored. The browser now needs WebAssembly SIMD (Safari 16.4 or later). Numbers unchanged. |
|
||||
|
||||
@@ -183,12 +183,15 @@ impl<'a> View<'a> {
|
||||
v
|
||||
}
|
||||
|
||||
/// This view with `style` just above the node itself: the style beats the node's own copy of
|
||||
/// its fields (stale when the style changed since), and override rows beat both.
|
||||
fn styled(&self, style: Option<&'a Kv<'a>>) -> Self {
|
||||
/// This view with `style` just above the layer that links it in `key` (or `legacy`): the style
|
||||
/// beats that layer's and lower layers' copies of its fields (stale when the style changed
|
||||
/// since, or written for the style linked before), and override rows above the link beat it.
|
||||
fn styled(&self, style: Option<&'a Kv<'a>>, key: &str, legacy: &str) -> Self {
|
||||
let mut v = self.clone();
|
||||
if let Some(s) = style {
|
||||
v.layers.insert(v.layers.len().min(1), s);
|
||||
let linked_in = |k: &str| v.layers.iter().rposition(|l| l.get(k).is_some());
|
||||
let at = linked_in(key).or_else(|| linked_in(legacy)).map_or(1, |i| i + 1);
|
||||
v.layers.insert(at.min(v.layers.len()), s);
|
||||
}
|
||||
v
|
||||
}
|
||||
|
||||
@@ -36,10 +36,18 @@ pub(super) struct OverrideRow<'a> {
|
||||
/// How many mains are being expanded around the instance that wrote the row: the rows of
|
||||
/// the enclosing (outer) instances win over those of the inner ones.
|
||||
source_depth: usize,
|
||||
/// How many levels below the writing instance the row restates (`overrideLevel`; 0 for the
|
||||
/// instance's own rows).
|
||||
level: usize,
|
||||
/// Position among the rows of the instance that wrote it; later rows win.
|
||||
ordinal: usize,
|
||||
}
|
||||
|
||||
/// The nested level an override row restates: its `overrideLevel`, capped; 0 when it has none.
|
||||
fn override_level(row: &Kv) -> usize {
|
||||
row.get("overrideLevel").and_then(Kv::f64).filter(|l| l.is_finite() && *l > 0.0).map_or(0, |l| l.min(MAX_DEPTH as f64) as usize)
|
||||
}
|
||||
|
||||
/// The layers of a main by current GUID, and the old `overrideKey` of each that has one
|
||||
/// (`None` when two layers claim the same key).
|
||||
pub(super) struct OverrideScope {
|
||||
@@ -351,6 +359,7 @@ impl<'a> Mapper<'a> {
|
||||
row: ov,
|
||||
entry,
|
||||
source_depth,
|
||||
level: override_level(ov),
|
||||
ordinal: row_ordinal,
|
||||
});
|
||||
}
|
||||
@@ -359,8 +368,10 @@ impl<'a> Mapper<'a> {
|
||||
overrides.entry(path).or_default().extend(rows);
|
||||
}
|
||||
for rows in overrides.values_mut() {
|
||||
// Deeper source rows apply first; outer rows win, with wire order preserved per source.
|
||||
rows.sort_by_key(|row| (std::cmp::Reverse(row.source_depth), row.ordinal));
|
||||
// Deeper rows apply first and outer rows win: a row restating a nested level counts at
|
||||
// that level's depth, wherever it sits on the wire. Equal depths keep the outer source
|
||||
// last, then wire order.
|
||||
rows.sort_by_key(|row| (std::cmp::Reverse(row.source_depth + row.level), std::cmp::Reverse(row.source_depth), row.ordinal));
|
||||
}
|
||||
let mut all_props: BTreeMap<String, &'a Kv<'a>> = outer.map(|i| (*i.props).clone()).unwrap_or_default();
|
||||
let mut slot_contents: BTreeMap<String, String> = outer.map(|i| (*i.slot_contents).clone()).unwrap_or_default();
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
use super::component::{Entry, Inst, OverrideRow, prop_ref};
|
||||
use super::connector::connector_has_saved_label;
|
||||
use super::layout::{layout_grid, tracks};
|
||||
use super::paint::{effect, export_setting, has_bound_variables, paint, paint_bound, stroke, style_link};
|
||||
use super::paint::{effect, export_setting, has_bound_variables, paint, paint_bound, stroke};
|
||||
use super::{
|
||||
Affine, BTreeMap, BTreeSet, Kv, MAX_COMMANDS, MAX_DEPTH, Mapper, Obj, Value, View, copy_num, copy_str, generated_record, guid, json, matrix,
|
||||
network, num, rows, size,
|
||||
@@ -684,7 +684,8 @@ impl<'a> Mapper<'a> {
|
||||
if own_fills.list().iter().any(paint_bound) {
|
||||
return Some(own_fills);
|
||||
}
|
||||
let linked_style = style_link(&View::of(s), "styleIdForFill", "inheritFillStyleID")
|
||||
let linked_style = self
|
||||
.style_link(&View::of(s), "styleIdForFill", "inheritFillStyleID")
|
||||
.and_then(|id| self.nodes.get(&id).copied())
|
||||
.filter(|style| style.get("styleType").and_then(Kv::str) == Some("FILL"));
|
||||
match linked_style {
|
||||
|
||||
@@ -12,25 +12,29 @@ fn filter_number(value: &Kv) -> Option<f64> {
|
||||
number.is_finite().then_some(number)
|
||||
}
|
||||
|
||||
/// The style a layer links in `key`, or in the older `legacy` field when `key` names none. An
|
||||
/// explicit NO_STYLE in `key` is a detach and wins over the legacy field.
|
||||
pub(super) fn style_link(v: &View, key: &str, legacy: &str) -> Option<String> {
|
||||
match v.get(key).and_then(|r| r.get("guid")).and_then(guid) {
|
||||
Some(id) => Some(id).filter(|g| g != NO_STYLE),
|
||||
None => v.get(legacy).and_then(guid).filter(|g| g != NO_STYLE),
|
||||
}
|
||||
}
|
||||
|
||||
pub(super) fn color(c: &Kv) -> Value {
|
||||
let ch = |k: &str| num(c, k).unwrap_or(0.0);
|
||||
json!({"r": ch("r"), "g": ch("g"), "b": ch("b"), "a": num(c, "a").unwrap_or(1.0)})
|
||||
}
|
||||
|
||||
impl<'a> Mapper<'a> {
|
||||
/// The style a layer links in `key`, by guid or by library asset (the file's copy of a library
|
||||
/// style), or in the older `legacy` field when `key` names none. An explicit NO_STYLE guid in
|
||||
/// `key` with no asset is a detach and wins over the legacy field.
|
||||
pub(super) fn style_link(&self, v: &View, key: &str, legacy: &str) -> Option<String> {
|
||||
let fallback = || v.get(legacy).and_then(guid).filter(|g| g != NO_STYLE);
|
||||
let Some(link) = v.get(key) else { return fallback() };
|
||||
match (self.resource_id(link), link.get("guid").and_then(guid)) {
|
||||
(Some(id), _) => Some(id),
|
||||
(None, Some(_)) => None,
|
||||
(None, None) => fallback(),
|
||||
}
|
||||
}
|
||||
|
||||
/// The style node a layer links in `key` (or the older `legacy` field), recorded for the REST
|
||||
/// `styles` map under `slot`.
|
||||
pub(super) fn style(&mut self, v: &View<'a>, key: &str, legacy: &str, slot: &str, out: &mut Obj) -> Option<&'a Kv<'a>> {
|
||||
let id = style_link(v, key, legacy)?;
|
||||
let id = self.style_link(v, key, legacy)?;
|
||||
let node = *self.nodes.get(&id)?;
|
||||
node.get("styleType").and_then(Kv::str)?;
|
||||
out.insert(slot.into(), json!(id));
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
use super::paint::{paint, style_link};
|
||||
use super::paint::paint;
|
||||
use super::{Kv, Mapper, Obj, Value, View, copy_num, copy_str, json, network, num};
|
||||
|
||||
/// The value from the last override layer holding a valid one for an optional text setting; invalid instance rows fall through.
|
||||
@@ -75,9 +75,10 @@ fn saved_line_starts(v: &View, chars: &str) -> Option<Vec<usize>> {
|
||||
|
||||
impl<'a> Mapper<'a> {
|
||||
pub(super) fn text(&mut self, o: &mut Obj, v: &View<'a>) {
|
||||
let style_node = style_link(v, "styleIdForText", "inheritTextStyleID").and_then(|s| self.nodes.get(&s).copied());
|
||||
// Instance overrides beat the shared style; the style beats the layer's own copy.
|
||||
let sv = v.styled(style_node.filter(|s| s.get("styleType").and_then(Kv::str) == Some("TEXT")));
|
||||
let (key, legacy) = ("styleIdForText", "inheritTextStyleID");
|
||||
let style_node = self.style_link(v, key, legacy).and_then(|s| self.nodes.get(&s).copied());
|
||||
// Overrides above the one that links the style beat it; it beats the copies below.
|
||||
let sv = v.styled(style_node.filter(|s| s.get("styleType").and_then(Kv::str) == Some("TEXT")), key, legacy);
|
||||
let td = v.get("textData");
|
||||
let chars = td.and_then(|t| t.get("characters")).and_then(Kv::str).unwrap_or("");
|
||||
o.insert("characters".into(), json!(chars));
|
||||
|
||||
@@ -182,6 +182,112 @@ fn an_instance_override_beats_the_shared_style_and_a_detach_unlinks_it() {
|
||||
assert_eq!(detached["style"]["fontSize"].as_f64(), Some(40.0));
|
||||
}
|
||||
|
||||
/// A link naming a library style by its asset `key` and `version` instead of a guid.
|
||||
fn asset_link(key: &str, version: &str) -> Kv<'static> {
|
||||
object(vec![("assetRef", object(vec![("key", Kv::Str(key.into())), ("version", Kv::Str(version.into()))]))])
|
||||
}
|
||||
|
||||
/// The file's copy of library text style "Heading" (Inter 24, asset `lib-heading` version 3).
|
||||
fn library_heading() -> Kv<'static> {
|
||||
node(
|
||||
10,
|
||||
"TEXT",
|
||||
"Heading",
|
||||
Some(2),
|
||||
vec![
|
||||
("styleType", Kv::Enum("TEXT")),
|
||||
("key", Kv::Str("lib-heading".into())),
|
||||
("version", Kv::Str("3".into())),
|
||||
("fontName", font("Inter")),
|
||||
("fontSize", Kv::Float(24.0)),
|
||||
],
|
||||
)
|
||||
}
|
||||
|
||||
/// An override row for the layer at `path` (guids) with `fields`.
|
||||
fn row(path: &[u64], mut fields: Fields) -> Kv<'static> {
|
||||
let mut all = vec![("guidPath", object(vec![("guids", Kv::Array(path.iter().map(|g| guid(*g)).collect()))]))];
|
||||
all.append(&mut fields);
|
||||
object(all)
|
||||
}
|
||||
|
||||
fn instance(id: u64, name: &str, parent: u64, main: u64, rows: Vec<Kv<'static>>) -> Kv<'static> {
|
||||
node(id, "INSTANCE", name, Some(parent), vec![("symbolData", object(vec![("symbolID", guid(main)), ("symbolOverrides", Kv::Array(rows))]))])
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn a_library_text_style_linked_by_asset_key_is_resolved() {
|
||||
let layer = vec![
|
||||
("fontName", font("Stale copy")),
|
||||
("fontSize", Kv::Float(40.0)),
|
||||
("styleIdForText", asset_link("lib-heading", "3")),
|
||||
("textData", chars("Hi")),
|
||||
];
|
||||
let doc = import(&rest(vec![library_heading(), node(11, "TEXT", "Label", Some(2), layer)]));
|
||||
let label = doc.nodes().find(|n| n.name == "Label").unwrap();
|
||||
assert_eq!(doc.style(label.styles.text.as_deref().unwrap()).unwrap().name, "Heading");
|
||||
let text = label.kind.text().unwrap();
|
||||
assert_eq!((text.style.font_family.as_str(), text.style.font_size), ("Inter", 24.0), "the style beats the stale copy");
|
||||
// A version the file holds no copy of names nothing: the layer keeps its own values, unlinked.
|
||||
let layer = vec![
|
||||
("fontName", font("Roboto")),
|
||||
("fontSize", Kv::Float(40.0)),
|
||||
("styleIdForText", asset_link("lib-heading", "9")),
|
||||
("textData", chars("Hi")),
|
||||
];
|
||||
let value = rest(vec![library_heading(), node(11, "TEXT", "Label", Some(2), layer)]);
|
||||
let label = find(&value["document"], "Label").unwrap();
|
||||
assert!(label["styles"].get("text").is_none(), "{}", label["styles"]);
|
||||
assert_eq!(label["style"]["fontSize"].as_f64(), Some(40.0));
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn a_library_text_style_an_instance_links_beats_the_copies_below_it_and_outer_overrides_beat_it() {
|
||||
let value = rest(vec![
|
||||
library_heading(),
|
||||
node(11, "TEXT", "Body", Some(2), vec![("styleType", Kv::Enum("TEXT")), ("fontName", font("Inter")), ("fontSize", Kv::Float(14.0))]),
|
||||
node(20, "SYMBOL", "Main", Some(2), vec![]),
|
||||
node(
|
||||
21,
|
||||
"TEXT",
|
||||
"Label",
|
||||
Some(20),
|
||||
vec![("fontName", font("Inter")), ("fontSize", Kv::Float(14.0)), ("styleIdForText", link(11)), ("textData", chars("Hi"))],
|
||||
),
|
||||
// The instance relinks the label to the library style; its row keeps a stale copy (40).
|
||||
instance(30, "Linked", 2, 20, vec![row(&[21], vec![("styleIdForText", asset_link("lib-heading", "3")), ("fontSize", Kv::Float(40.0))])]),
|
||||
node(40, "SYMBOL", "Card", Some(2), vec![]),
|
||||
instance(41, "Nested", 40, 20, vec![row(&[21], vec![("styleIdForText", asset_link("lib-heading", "3")), ("fontSize", Kv::Float(40.0))])]),
|
||||
// An instance of the card sets the size on top of the nested instance's style.
|
||||
instance(50, "Outer", 2, 40, vec![row(&[41, 21], vec![("fontSize", Kv::Float(30.0))])]),
|
||||
]);
|
||||
let linked = find(find(&value["document"], "Linked").unwrap(), "Label").unwrap();
|
||||
assert_eq!(linked["styles"]["text"], "9:10");
|
||||
assert_eq!(linked["style"]["fontSize"].as_f64(), Some(24.0), "the linked style beats the copies below it");
|
||||
let outer = find(find(&value["document"], "Outer").unwrap(), "Label").unwrap();
|
||||
assert_eq!(outer["styles"]["text"], "9:10");
|
||||
assert_eq!(outer["style"]["fontSize"].as_f64(), Some(30.0), "an override above the link is kept");
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn a_row_restating_a_nested_level_loses_to_the_instances_own_row() {
|
||||
let label = vec![("fontName", font("Inter")), ("fontSize", Kv::Float(14.0)), ("textData", chars("Hi"))];
|
||||
let value = rest(vec![
|
||||
node(20, "SYMBOL", "Main", Some(2), vec![]),
|
||||
node(21, "TEXT", "Label", Some(20), label),
|
||||
// The own row comes first on the wire; the restated nested-level row after it.
|
||||
instance(
|
||||
30,
|
||||
"Inst",
|
||||
2,
|
||||
20,
|
||||
vec![row(&[21], vec![("fontSize", Kv::Float(30.0))]), row(&[21], vec![("fontSize", Kv::Float(12.0)), ("overrideLevel", Kv::Int(1))])],
|
||||
),
|
||||
]);
|
||||
let label = find(find(&value["document"], "Inst").unwrap(), "Label").unwrap();
|
||||
assert_eq!(label["style"]["fontSize"].as_f64(), Some(30.0));
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn a_text_property_value_drops_the_run_styles_made_for_the_main_text() {
|
||||
let ids = [0u64, 0, 0, 1, 1, 1].map(Kv::Uint).to_vec();
|
||||
|
||||
File diff suppressed because one or more lines are too long
+2
-1
@@ -1,6 +1,6 @@
|
||||
# FigCraft roadmap: milestones and what's next
|
||||
|
||||
> **Last reviewed:** 2026-10-10 · **Last updated:** 2026-10-28 · **Change:** minor (`.fig` import keeps the file's saved line breaks while the text and its box are unedited (#1236); Download a missing free font from the Missing fonts window (`font.download`, #754); the web build's wasm back under its 24 MiB gate (#1472); shadows of images with transparent pixels follow their alpha (#1289); Crop image: Object ▸ Crop image, the right-click menu and the image fill row enter crop mode (`image.crop`, #1464); M0.9: optional batch continue-on-error with per-step outcomes (#1386); Alt pressed during a drag duplicates (#1385); variables in paint props (M3, #1000); finding layers without selecting them (M0.9, part of #996); the attached MCP server reads the app's replies with a 512 MiB bound (#1113); a failed batch keeps the undo steps it undid (#1410); Arabic draft catalog; Android Vector Drawable export; a selected unfilled shape drags over a filled layer below it (#1370); text truncation fills the last line, survives resizing, and auto height takes Max lines (#1375, #1376, #1377); M11 widget fields and property menus; M12 Boards: timer and voting; Installed weights of an embedded font family (#1246); `.sketch` import, best effort; Adobe Fonts found on macOS (#298); M12 Boards; community fixes in #507, #510, #529 and #530: auto-save, a text box by dragging, batch step references, removing someone from a live session, Russian and Turkish catalogs reviewed, Czech and Indonesian drafts, the Japanese draft completed, zoom previews, the web clipboard, Alt-drag snapping and Cmd+D repeat, recovery copies, crash and rollback fixes, colour emoji, `.fig` import fixes; earlier changes are in the revision history below) · **Target:** Figma Design (desktop app 126.10.7)
|
||||
> **Last reviewed:** 2026-10-10 · **Last updated:** 2026-10-28 · **Change:** minor (`.fig` import: library text styles linked by asset key, and override rows restating a nested level (#1234); `.fig` import keeps the file's saved line breaks while the text and its box are unedited (#1236); Download a missing free font from the Missing fonts window (`font.download`, #754); the web build's wasm back under its 24 MiB gate (#1472); shadows of images with transparent pixels follow their alpha (#1289); Crop image: Object ▸ Crop image, the right-click menu and the image fill row enter crop mode (`image.crop`, #1464); M0.9: optional batch continue-on-error with per-step outcomes (#1386); Alt pressed during a drag duplicates (#1385); variables in paint props (M3, #1000); finding layers without selecting them (M0.9, part of #996); the attached MCP server reads the app's replies with a 512 MiB bound (#1113); a failed batch keeps the undo steps it undid (#1410); Arabic draft catalog; Android Vector Drawable export; a selected unfilled shape drags over a filled layer below it (#1370); text truncation fills the last line, survives resizing, and auto height takes Max lines (#1375, #1376, #1377); M11 widget fields and property menus; M12 Boards: timer and voting; Installed weights of an embedded font family (#1246); `.sketch` import, best effort; Adobe Fonts found on macOS (#298); M12 Boards; community fixes in #507, #510, #529 and #530: auto-save, a text box by dragging, batch step references, removing someone from a live session, Russian and Turkish catalogs reviewed, Czech and Indonesian drafts, the Japanese draft completed, zoom previews, the web clipboard, Alt-drag snapping and Cmd+D repeat, recovery copies, crash and rollback fixes, colour emoji, `.fig` import fixes; earlier changes are in the revision history below) · **Target:** Figma Design (desktop app 126.10.7)
|
||||
|
||||
Forward-looking plan. Where FigCraft stands today: [`ROADMAP.md`](../ROADMAP.md) and
|
||||
[`target-app-parity.md`](target-app-parity.md); the full ranked list: [`gaps.md`](gaps.md). Hours
|
||||
@@ -75,6 +75,7 @@ blockers.
|
||||
|
||||
| Date | Change | Summary |
|
||||
|---|---|---|
|
||||
| 2026-10-29 | minor | M6, #1234: `.fig` import resolves style links that name a library style by its asset key and version instead of a guid (the file's own copy of the style), as variable links already were; text in instances of library components kept a stale copy of the style's values and no link. The linked text style beats the copies of its values on the layer and on the override rows below the row that links it, and rows above that row (an outer instance's size, say) still win. Override rows that restate a nested level's overrides (`overrideLevel`) apply at that level, below the instance's own rows, instead of in wire order. Synthetic regression tests in `text_style_tests`. Numbers unchanged |
|
||||
| 2026-10-29 | minor | M6, #1236 (gap 1): imported `.fig` text keeps the line breaks the file saved with it (`derivedTextData`), so a font whose advances differ slightly from the file's (another build of the family, a stand-in) no longer wraps a word early or splits one in a narrow box. The breaks hold only while the box width and everything that moves a break are as saved (characters, fonts, sizes, spacing, case, axes, features, lists, paragraph settings; paints, links and vertical settings don't count), and are given up where a line would come out more than 3% (+1 px) wider than its box; they are kept in `.figcraft`. The line breaker was checked and is unchanged: trailing spaces and the letter spacing after a line's last glyph already stay out of the fit test, box widths aren't rounded and the tolerance is 1e-6 px, so the differences come from the fonts. Synthetic tests in `saved_breaks_tests` and `fig::text_wrap_tests`; not checked on real files. Numbers unchanged |
|
||||
| 2026-10-29 | minor | #754, #1025: the Missing fonts window offers Download for a family the suite's font store has (Google Fonts, Noto: craft-libs' `craft-font-store`, its pinned indexes compiled in). The first Download asks the user to allow downloading fonts (off until then; the setting is the Craft apps' shared one); the files download on a thread of their own, each checked against the index's size and sha256 before it is installed into the shared font folder, which the font scan now reads; the row shows progress or why it failed, and once installed the file's text fits the real font and the family leaves the list. `font.download {family}` and `font.downloads` are commands, but no command turns downloading on; agents install only while the user has it on. Desktop only. No cancel, no turning it off from FigCraft, no substitute picker. Tests: `fonts::download::tests`, `missing_fonts_tests`. Numbers unchanged |
|
||||
| 2026-10-29 | minor | Web wasm size (#1472): the release wasm is 23,915,213 bytes (22.8 MiB), down from 25,982,540 (24.8 MiB), 1.2 MiB under the gate. Catalog rows hold their plural forms behind a reference (two words, not eight) and the browser build compiles with wasm SIMD, so the glyph rasterizer's scalar fallback is left out; the 24 MiB gate in `packaging/web/package.sh` is restored. The browser now needs WebAssembly SIMD (Safari 16.4 or later). Numbers unchanged. |
|
||||
|
||||
Reference in New Issue
Block a user