Skip to content

PhotoCraft: An open-source, photo editor written by scratch in pure Rust

Type: variable font axis sliders; optical size follows the type size (#2985) (#2996)

Valentin Klein139df7ae8560
diff --git a/crates/engine/src/type_cmds.rs b/crates/engine/src/type_cmds.rs
index bc52c51fa..0593be040 100644
--- a/crates/engine/src/type_cmds.rs
+++ b/crates/engine/src/type_cmds.rs
@@ -133,6 +133,9 @@ pub fn apply_char_props(s: &mut CharStyle, p: &Value) -> bool {
if let Some(v) = p.get("fontStyle").and_then(Value::as_str) {
s.font_style = v.to_string();
s.postscript_name = None;
+ // The style sets the weight, so a weight slider value set earlier stops overriding it
+ // (`variations` in the same call apply after this).
+ s.variations.retain(|f| f.axis != "wght");
let l = v.to_lowercase();
s.italic = l.contains("italic") || l.contains("oblique");
let g = photocraft_text::fonts::guess_from_postscript(&format!("X-{}", v.replace(' ', "")));
@@ -150,6 +153,7 @@ pub fn apply_char_props(s: &mut CharStyle, p: &Value) -> bool {
s.postscript_name = None;
s.font_style.clear();
}
+ s.variations.retain(|f| f.axis != "wght");
s.weight = weight;
hit(true);
}
@@ -986,6 +990,21 @@ mod tests {
assert_eq!(style.postscript_name.as_deref(), Some("ExplicitFace"));
}
+ /// Picking a style or weight resets the weight axis to it; other axes keep their values (#2985).
+ #[test]
+ fn a_style_or_weight_resets_the_weight_axis() {
+ let mut style = CharStyle::default();
+ apply_char_props(&mut style, &json!({"variations": {"wght": 650, "wdth": 80}}));
+ apply_char_props(&mut style, &json!({"fontStyle": "Bold"}));
+ let axes = |s: &CharStyle| s.variations.iter().map(|v| (v.axis.clone(), v.value)).collect::<Vec<_>>();
+ assert_eq!(axes(&style), [("wdth".to_string(), 80.0)]);
+ apply_char_props(&mut style, &json!({"variations": {"wght": 650}}));
+ apply_char_props(&mut style, &json!({"weight": 300}));
+ assert_eq!(axes(&style), [("wdth".to_string(), 80.0)]);
+ apply_char_props(&mut style, &json!({"fontStyle": "Light", "variations": {"wght": 350}}));
+ assert_eq!(axes(&style), [("wdth".to_string(), 80.0), ("wght".to_string(), 350.0)], "same-call values apply after the style");
+ }
+
#[test]
fn absurd_type_size_and_tracking_are_rejected_as_bad_params() {
let mut s = session();
diff --git a/crates/text/src/layout.rs b/crates/text/src/layout.rs
index c95a5a064..6ba13ef9e 100644
--- a/crates/text/src/layout.rs
+++ b/crates/text/src/layout.rs
@@ -1213,6 +1213,18 @@ fn feature_list(st: &CharStyle, small_caps: SmallCapsMode) -> Vec<String> {
feats
}
+/// The font variations for a run: the explicit axis values, plus `opsz` at the type size when the
+/// style doesn't set it (as CSS `font-optical-sizing: auto`). A font without an `opsz` axis
+/// ignores it.
+fn variation_list(st: &CharStyle) -> Vec<String> {
+ let mut vars: Vec<String> =
+ st.variations.iter().filter(|v| v.axis.len() == 4 && v.axis.is_ascii() && v.value.is_finite()).map(|v| format!("\"{}\" {}", v.axis, v.value)).collect();
+ if st.size_pt.is_finite() && !st.variations.iter().any(|v| v.axis == "opsz") {
+ vars.push(format!("\"opsz\" {}", st.size_pt.max(0.01)));
+ }
+ vars
+}
+
fn style_props(st: &CharStyle, k: f32, fallback: &[String], idx: u32, small_caps: SmallCapsMode) -> Vec<StyleProperty<'static, RunBrush>> {
let px = (st.size_pt * k).max(0.01);
let mut fam: Vec<String> = Vec::new();
@@ -1227,7 +1239,7 @@ fn style_props(st: &CharStyle, k: f32, fallback: &[String], idx: u32, small_caps
}
fam.push("sans-serif".into());
let feats = feature_list(st, small_caps);
- let vars: Vec<String> = st.variations.iter().filter(|v| v.axis.len() == 4 && v.axis.is_ascii()).map(|v| format!("\"{}\" {}", v.axis, v.value)).collect();
+ let vars = variation_list(st);
vec![
StyleProperty::FontFamily(FontFamily::Source(Cow::Owned(fam.join(", ")))),
StyleProperty::FontSize(px),
@@ -1331,8 +1343,17 @@ fn first_ascent(line: &parley::Line<'_, RunBrush>) -> Option<f32> {
#[cfg(test)]
mod tests {
- use super::{SmallCapsMode, feature_list, small_caps_mode};
- use photocraft_doc::text::{Caps, CharStyle};
+ use super::{SmallCapsMode, feature_list, small_caps_mode, variation_list};
+ use photocraft_doc::text::{Caps, CharStyle, FontVariation};
+
+ /// A variable font's optical size follows the type size unless the style sets `opsz` (#2985).
+ #[test]
+ fn optical_size_follows_the_type_size_unless_set() {
+ let style = CharStyle { size_pt: 36.0, variations: vec![FontVariation { axis: "wght".into(), value: 650.0 }], ..Default::default() };
+ assert_eq!(variation_list(&style), ["\"wght\" 650", "\"opsz\" 36"]);
+ let set = CharStyle { size_pt: 36.0, variations: vec![FontVariation { axis: "opsz".into(), value: 12.0 }], ..Default::default() };
+ assert_eq!(variation_list(&set), ["\"opsz\" 12"]);
+ }
#[test]
fn uses_real_small_caps_only_when_the_selected_face_supports_smcp() {
diff --git a/crates/ui-egui/src/i18n/cs.tsv b/crates/ui-egui/src/i18n/cs.tsv
index 93f8fd595..01ee01392 100644
--- a/crates/ui-egui/src/i18n/cs.tsv
+++ b/crates/ui-egui/src/i18n/cs.tsv
@@ -1543,6 +1543,7 @@
White Balance: As Shot Vyvážení bílé: jako při snímání
Whites Bílé
Width Šířka
+ Slant Sklon
Width: Šířka:
Work Path Pracovní cesta
Yellow Žlutá
diff --git a/crates/ui-egui/src/i18n/de.tsv b/crates/ui-egui/src/i18n/de.tsv
index 26871a1e6..e0cb3cdcc 100644
--- a/crates/ui-egui/src/i18n/de.tsv
+++ b/crates/ui-egui/src/i18n/de.tsv
@@ -1522,6 +1522,7 @@
White Balance: As Shot Weißabgleich: Wie Aufnahme
Whites Weiß
Width Breite
+ Slant Neigung
Width: Breite:
Work Path Arbeitspfad
Yellow Gelb
diff --git a/crates/ui-egui/src/i18n/el.tsv b/crates/ui-egui/src/i18n/el.tsv
index dc39a3415..e7250c3a4 100644
--- a/crates/ui-egui/src/i18n/el.tsv
+++ b/crates/ui-egui/src/i18n/el.tsv
@@ -305,6 +305,7 @@
Scale Κλίμακα
Size Μέγεθος
Width Πλάτος
+ Slant Κλίση
Height Ύψος
Resolution Ανάλυση
Pixels Εικονοστοιχεία
diff --git a/crates/ui-egui/src/i18n/es.tsv b/crates/ui-egui/src/i18n/es.tsv
index c65d4dd08..d2b4e7cf8 100644
--- a/crates/ui-egui/src/i18n/es.tsv
+++ b/crates/ui-egui/src/i18n/es.tsv
@@ -1528,6 +1528,7 @@
White Balance: As Shot Balance de blancos: como se tomó
Whites Blancos
Width Ancho
+ Slant Inclinación
Width: Ancho:
Work Path Trazado de trabajo
Yellow Amarillo
diff --git a/crates/ui-egui/src/i18n/fr.tsv b/crates/ui-egui/src/i18n/fr.tsv
index 6a20c3521..b569dfb87 100644
--- a/crates/ui-egui/src/i18n/fr.tsv
+++ b/crates/ui-egui/src/i18n/fr.tsv
@@ -1509,6 +1509,7 @@
White Balance: As Shot Balance des blancs : telle quelle
Whites Blancs
Width Largeur
+ Slant Inclinaison
Width: Largeur :
Work Path Tracé de travail
Yellow Jaune
diff --git a/crates/ui-egui/src/i18n/id.tsv b/crates/ui-egui/src/i18n/id.tsv
index 9f1b970db..e6be90d82 100644
--- a/crates/ui-egui/src/i18n/id.tsv
+++ b/crates/ui-egui/src/i18n/id.tsv
@@ -1503,6 +1503,7 @@
White Balance: As Shot White Balance: Sesuai Pemotretan
Whites Putih
Width Lebar
+ Slant Kemiringan
Width: Lebar:
Work Path Work Path
Yellow Kuning
diff --git a/crates/ui-egui/src/i18n/it.tsv b/crates/ui-egui/src/i18n/it.tsv
index 4924ecfc7..a0896ba5a 100644
--- a/crates/ui-egui/src/i18n/it.tsv
+++ b/crates/ui-egui/src/i18n/it.tsv
@@ -1527,6 +1527,7 @@
White Balance: As Shot Bilanciamento bianco: Come scattato
Whites Bianchi
Width Larghezza
+ Slant Inclinazione
Width: Larghezza:
Work Path Tracciato di lavoro
Yellow Giallo
diff --git a/crates/ui-egui/src/i18n/ja.tsv b/crates/ui-egui/src/i18n/ja.tsv
index be6169e80..8b82462fe 100644
--- a/crates/ui-egui/src/i18n/ja.tsv
+++ b/crates/ui-egui/src/i18n/ja.tsv
@@ -1527,6 +1527,7 @@
White Balance: As Shot ホワイトバランス: 撮影時の設定
Whites 白レベル
Width 幅
+ Slant 傾斜
Width: 幅:
Work Path 作業用パス
Yellow イエロー
diff --git a/crates/ui-egui/src/i18n/ko.tsv b/crates/ui-egui/src/i18n/ko.tsv
index b9ee70a4e..8734bcc30 100644
--- a/crates/ui-egui/src/i18n/ko.tsv
+++ b/crates/ui-egui/src/i18n/ko.tsv
@@ -1498,6 +1498,7 @@
White Balance: As Shot 화이트 밸런스: 촬영 시 설정
Whites 흰색 계열
Width 너비
+ Slant 기울기
Width: 너비:
Work Path 작업 패스
Yellow 노랑
diff --git a/crates/ui-egui/src/i18n/nl.tsv b/crates/ui-egui/src/i18n/nl.tsv
index 00d793cbf..dc1397f94 100644
--- a/crates/ui-egui/src/i18n/nl.tsv
+++ b/crates/ui-egui/src/i18n/nl.tsv
@@ -1509,6 +1509,7 @@
White Balance: As Shot Witbalans: zoals opgenomen
Whites Witten
Width Breedte
+ Slant Helling
Width: Breedte:
Work Path Werkpad
Yellow Geel
diff --git a/crates/ui-egui/src/i18n/pl.tsv b/crates/ui-egui/src/i18n/pl.tsv
index d6018ec9a..83b18a410 100644
--- a/crates/ui-egui/src/i18n/pl.tsv
+++ b/crates/ui-egui/src/i18n/pl.tsv
@@ -1522,6 +1522,7 @@
White Balance: As Shot Balans bieli: jak w zdjęciu
Whites Biele
Width Szerokość
+ Slant Pochylenie
Width: Szerokość:
Work Path Ścieżka robocza
Yellow Żółty
diff --git a/crates/ui-egui/src/i18n/pt-br.tsv b/crates/ui-egui/src/i18n/pt-br.tsv
index 7373a3a8a..3caf7e7bf 100644
--- a/crates/ui-egui/src/i18n/pt-br.tsv
+++ b/crates/ui-egui/src/i18n/pt-br.tsv
@@ -1507,6 +1507,7 @@
White Balance: As Shot Equilíbrio de branco: como fotografado
Whites Brancos
Width Largura
+ Slant Inclinação
Width: Largura:
Work Path Demarcador de trabalho
Yellow Amarelo
diff --git a/crates/ui-egui/src/i18n/ru.tsv b/crates/ui-egui/src/i18n/ru.tsv
index 25e240377..f7b6f4312 100644
--- a/crates/ui-egui/src/i18n/ru.tsv
+++ b/crates/ui-egui/src/i18n/ru.tsv
@@ -662,6 +662,7 @@
Efficiency: 100% Эффективность: 100%
Dimensions: Габариты:
Width Ширина
+ Slant Наклон
Height Высота
Width: Ширина:
Height: Высота:
diff --git a/crates/ui-egui/src/i18n/uk.tsv b/crates/ui-egui/src/i18n/uk.tsv
index a28efb4a5..9f3085e88 100644
--- a/crates/ui-egui/src/i18n/uk.tsv
+++ b/crates/ui-egui/src/i18n/uk.tsv
@@ -640,6 +640,7 @@
Efficiency: 100% Ефективність: 100%
Dimensions: Розміри:
Width Ширина
+ Slant Нахил
Height Висота
Width: Ширина:
Height: Висота:
diff --git a/crates/ui-egui/src/i18n/zh-hans.tsv b/crates/ui-egui/src/i18n/zh-hans.tsv
index 5c7caba0f..96e1ee7a5 100644
--- a/crates/ui-egui/src/i18n/zh-hans.tsv
+++ b/crates/ui-egui/src/i18n/zh-hans.tsv
@@ -1540,6 +1540,7 @@
White Balance: As Shot 白平衡:拍摄时设置
Whites 白色色阶
Width 宽度
+ Slant 倾斜
Width: 宽度:
Work Path 工作路径
Yellow 黄色
diff --git a/crates/ui-egui/src/i18n/zh-hant.tsv b/crates/ui-egui/src/i18n/zh-hant.tsv
index 08a7c3bee..6dc45ae3d 100644
--- a/crates/ui-egui/src/i18n/zh-hant.tsv
+++ b/crates/ui-egui/src/i18n/zh-hant.tsv
@@ -1534,6 +1534,7 @@
White Balance: As Shot 白平衡:原始拍攝
Whites 白色
Width 寬度
+ Slant 傾斜
Width: 寬度:
Work Path 工作路徑
Yellow 黃色
diff --git a/crates/ui-egui/src/type_tool.rs b/crates/ui-egui/src/type_tool.rs
index 3166caff4..a8d5b83fb 100644
--- a/crates/ui-egui/src/type_tool.rs
+++ b/crates/ui-egui/src/type_tool.rs
@@ -1026,6 +1026,83 @@ fn style_names(faces: &[photocraft_text::FaceInfo]) -> Vec<String> {
names
}
+/// A variable-font axis: (tag, min, default, max), as [`photocraft_text::FaceInfo::axes`].
+pub(crate) type Axis = (String, f32, f32, f32);
+
+/// The axes the Character section shows as sliders (#2985): those of the faces matching the
+/// style's italic, else of any face. Optical size has none: it follows the type size.
+pub(crate) fn slider_axes(faces: &[photocraft_text::FaceInfo], italic: bool) -> Vec<Axis> {
+ let pick = |want: Option<bool>| {
+ let mut v: Vec<Axis> = Vec::new();
+ for f in faces.iter().filter(|f| want.is_none_or(|w| f.italic == w)) {
+ for a in &f.axes {
+ let usable = a.0 != "opsz" && a.1.is_finite() && a.3.is_finite() && a.1 < a.3;
+ if usable && !v.iter().any(|b| b.0 == a.0) {
+ v.push(a.clone());
+ }
+ }
+ }
+ v
+ };
+ let v = pick(Some(italic));
+ if v.is_empty() { pick(None) } else { v }
+}
+
+/// The value an axis slider shows: the style's own value for the axis, else what the layout
+/// draws (the style's weight on `wght`, the axis default otherwise), within the axis range.
+pub(crate) fn axis_value(c: &photocraft_doc::text::CharStyle, (tag, min, default, max): &Axis) -> f32 {
+ let v = c.variations.iter().find(|v| &v.axis == tag).map(|v| v.value).unwrap_or_else(|| match tag.as_str() {
+ "wght" => f32::from(c.weight),
+ "ital" if c.italic => *max,
+ _ => *default,
+ });
+ let d = default.clamp(*min, *max);
+ if v.is_finite() { v.clamp(*min, *max) } else { d }
+}
+
+/// Slider label for an axis: the registered axes by name, others by their tag (as the font
+/// names them in its `fvar` table, e.g. `GRAD`).
+fn axis_label(tag: &str) -> String {
+ match tag {
+ "wght" => tl!("Weight").to_string(),
+ "wdth" => tl!("Width").to_string(),
+ "slnt" => tl!("Slant").to_string(),
+ "ital" => tl!("Italic").to_string(),
+ _ => tag.to_string(),
+ }
+}
+
+/// One slider row per variable-font axis of the style's font, below the font style (#2985).
+fn axis_sliders(app: &mut PhotocraftApp, ui: &mut egui::Ui, c: &photocraft_doc::text::CharStyle) {
+ let axes = {
+ let faces = photocraft_text::shared().lock().unwrap_or_else(PoisonError::into_inner).fonts.faces(&c.font_family);
+ slider_axes(&faces, c.italic)
+ };
+ let t = crate::theme::Tokens::get(ui.ctx());
+ for axis in &axes {
+ let (min, max) = (axis.1, axis.3);
+ let mut v = axis_value(c, axis);
+ let mut changed = false;
+ ui.push_id(("type-axis", &axis.0), |ui| {
+ ui.horizontal(|ui| {
+ ui.label(egui::RichText::new(axis_label(&axis.0)).color(t.text_dim));
+ ui.with_layout(egui::Layout::right_to_left(egui::Align::Center), |ui| {
+ changed |= crate::widgets::value_field(ui, &mut v, min..=max, "", 74.0).changed();
+ });
+ });
+ changed |= crate::widgets::slider(ui, &mut v, min..=max, None).changed();
+ });
+ ui.add_space(crate::theme::ROW_GAP);
+ if changed {
+ // Whole units on wide axes (weight 100–900), hundredths on narrow ones (ital 0–1).
+ let v = if max - min >= 10.0 { v.round() } else { (v * 100.0).round() / 100.0 };
+ let mut m = serde_json::Map::new();
+ m.insert(axis.0.clone(), json!(v));
+ apply(app, ui.ctx(), json!({ "variations": m }));
+ }
+ }
+}
+
/// PSD text can identify a face only by its PostScript name. Show its real subfamily too.
pub(crate) fn selected_style(style: &photocraft_doc::text::CharStyle) -> String {
if let Some(ps) = &style.postscript_name {
@@ -1652,6 +1729,7 @@ fn type_sections(app: &mut PhotocraftApp, ui: &mut egui::Ui, character: bool, pa
apply(app, ui.ctx(), json!({"fontStyle": style}));
}
});
+ axis_sliders(app, ui, &c);
row(ui, &mut |ui| {
let k = shown_scale(app);
if let Some(v) = num_field(ui, "tT", "Font size", c.size_pt * k, 0.1..=1296.0, "pt", w) {
diff --git a/crates/ui-egui/src/type_tool_tests.rs b/crates/ui-egui/src/type_tool_tests.rs
index d9bd9148f..7e2a17412 100644
--- a/crates/ui-egui/src/type_tool_tests.rs
+++ b/crates/ui-egui/src/type_tool_tests.rs
@@ -1242,6 +1242,33 @@ fn variable_faces_list_the_weights_of_their_axis() {
assert_eq!(super::style_names(&[face(700.0, false, Vec::new())]), ["Bold"]);
}
+/// A variable font's axes become sliders (optical size excepted: it follows the type size), and
+/// each shows the style's value for it, or what the layout draws without one (#2985).
+#[test]
+fn variable_font_axes_become_sliders_with_the_drawn_value() {
+ use photocraft_doc::text::{CharStyle, FontVariation};
+ let face = |italic: bool, axes: Vec<super::Axis>| photocraft_text::FaceInfo {
+ family: "Roboto Flex".into(),
+ style: "Regular".into(),
+ postscript_name: None,
+ weight: 400.0,
+ italic,
+ axes,
+ };
+ let ax = |tag: &str, min: f32, def: f32, max: f32| (tag.to_string(), min, def, max);
+ let faces = [
+ face(false, vec![ax("opsz", 8.0, 14.0, 144.0), ax("wght", 100.0, 400.0, 1000.0), ax("wdth", 25.0, 100.0, 151.0)]),
+ face(true, vec![ax("slnt", -10.0, 0.0, 0.0)]),
+ ];
+ let tags = |v: Vec<super::Axis>| v.into_iter().map(|a| a.0).collect::<Vec<_>>();
+ assert_eq!(tags(super::slider_axes(&faces, false)), ["wght", "wdth"]);
+ assert_eq!(tags(super::slider_axes(&faces, true)), ["slnt"]);
+ let c = CharStyle { weight: 700, variations: vec![FontVariation { axis: "wdth".into(), value: 300.0 }], ..Default::default() };
+ assert_eq!(super::axis_value(&c, &ax("wght", 100.0, 400.0, 1000.0)), 700.0, "the style's weight");
+ assert_eq!(super::axis_value(&c, &ax("wdth", 25.0, 100.0, 151.0)), 151.0, "its own value, within the range");
+ assert_eq!(super::axis_value(&c, &ax("GRAD", -200.0, 0.0, 150.0)), 0.0, "the axis default");
+}
+
/// Families the host serves are in the font menu before they are fetched.
#[test]
fn the_font_menu_lists_served_families() {
diff --git a/docs/scorecard.md b/docs/scorecard.md
index 4adb32232..9374ed74a 100644
--- a/docs/scorecard.md
+++ b/docs/scorecard.md
@@ -10,7 +10,7 @@ Generated by `cargo xtask scorecard` from `perf/budgets.toml`, `perf/baseline.js
| [File compatibility](#file-compatibility) | 6 | 12 | 9 | io corpus: oracle ≥ 146/170, round trip ≥ 169/170; psd-tools corpus: oracle ≥ 236/309, round trip ≥ 308/309; photoshop oracles: oracle ≥ 133/256, round trip ≥ 258/256 |
| [Tools](#tools) | 25 | 16 | 2 | |
| [Workspace and UI](#workspace-and-ui) | 9 | 8 | 6 | settings that do nothing: 32 of 154 (target 0) |
-| [Type](#type) | 1 | 4 | 4 | |
+| [Type](#type) | 2 | 3 | 4 | |
| [Automation](#automation) | 3 | 2 | 6 | 631 of 631 menu items live (100.0%) |
| [Reliability](#reliability) | 5 | 2 | 0 | never-crash lints on 28 of 28 crates; panic_hunt present |
| [Distribution](#distribution) | 5 | 4 | 2 | |
@@ -213,7 +213,7 @@ Unread: `general.color_picker`, `general.animated_zoom`, `general.zoom_resizes_w
| TYPE-218-1 | Type on a path: path shape, glyphs along the curve, caret follows, PSD round trip | missing | [#218](https://github.com/storytold/photocraft/issues/218) | doc text.rs:209 TextShape has Point and Box only |
| TYPE-218-2 | Paragraph direction (Auto/LTR/RTL) in the panel and options bar; visual RTL caret | missing | [#218](https://github.com/storytold/photocraft/issues/218) | Engine has TextDirection (text.rs:155); no UI |
| TYPE-218-3 | Thai/Khmer/Indic fallback fonts; golden shaping tests for complex scripts and RTL | partial | [#218](https://github.com/storytold/photocraft/issues/218) | Thai is covered: THAI_FAMILIES (fonts.rs) lists the Windows, macOS and Linux families and thai_in_latin_font_falls_back_to_installed_thai_font checks a sample with above and below marks (#1909); Arabic and Hebrew fall back too. Khmer and Indic have no fallback list, and there are no per-script golden shaping tests (only a bidi test) |
-| TYPE-218-4 | Variable font axis sliders from the font's axes; opsz follows the point size | partial | [#218](https://github.com/storytold/photocraft/issues/218) | type_cmds.rs:184 accepts variations; FaceInfo.axes unused in the UI |
+| TYPE-218-4 | Variable font axis sliders from the font's axes; opsz follows the point size | done | [#218](https://github.com/storytold/photocraft/issues/218) | One slider per axis of the style's font in the Character section (Properties and Window > Character), setting type.setStyle variations; opsz follows the type size unless set (layout.rs variation_list); a style or weight resets the wght axis (#2985). PSD does not round-trip axis values yet |
| TYPE-218-5 | OpenType UI: Character panel buttons, Numerals and Stylistic Sets submenus | partial | [#218](https://github.com/storytold/photocraft/issues/218) | Type > OpenType toggles (type_extra_cmds.rs:512); no panel buttons or submenus |
| TYPE-218-6 | Manual pair kerning (Alt+arrows), optical kerning rendered, both round-trip PSD (#206) | done | [#218](https://github.com/storytold/photocraft/issues/218) | Alt+Left/Right at a collapsed caret kerns the pair (type_tool.rs kern_pair, 20 per step and 100 with Cmd; type_tool_alt_arrows_kern_the_pair). Optical kerning is computed from the glyph outlines in text/src/optical.rs and applied by layout.rs when the run's mode is Optical (optical_matches_photoshop, optical_kerning_tightens_open_pairs). Both modes and manual values round-trip through PSD (io/tests/psd_kerning.rs; the optical mode travels in Txt2, txt2_carries_optical_kerning) |
| TYPE-218-7 | Warp Text dialog previews live and opens with the layer's current warp | missing | [#218](https://github.com/storytold/photocraft/issues/218) | view_cmds.rs:834 always seeds arc, bend 50 |
diff --git a/scorecard/type.toml b/scorecard/type.toml
index faf1f88dc..98d3da07b 100644
--- a/scorecard/type.toml
+++ b/scorecard/type.toml
@@ -28,9 +28,9 @@ note = "Thai is covered: THAI_FAMILIES (fonts.rs) lists the Windows, macOS and L
[[item]]
id = "TYPE-218-4"
target = "Variable font axis sliders from the font's axes; opsz follows the point size"
-status = "partial"
+status = "done"
issue = 218
-note = "type_cmds.rs:184 accepts variations; FaceInfo.axes unused in the UI"
+note = "One slider per axis of the style's font in the Character section (Properties and Window > Character), setting type.setStyle variations; opsz follows the type size unless set (layout.rs variation_list); a style or weight resets the wght axis (#2985). PSD does not round-trip axis values yet"
[[item]]
id = "TYPE-218-5"