mirror of
https://github.com/storytold/vectorcraft.git
synced 2026-10-24 09:46:59 -06:00
Part of #868: legacy .ai options Hidden Objects and Text, and docs
The Legacy .ai Options dialog gains Hidden Objects (Hidden Layer, Omit, Make Visible) and Text (Editable, Outlines), translated in every catalog. Docs: type and hidden objects in the legacy .ai paragraphs, the restored revision rows and roadmap row.
This commit is contained in:
@@ -211,7 +211,7 @@ and what's next; [`docs/target-app-parity.md`](docs/target-app-parity.md) the fu
|
||||
all of Illustrator): everyday
|
||||
vector illustration is close to usable: drawing and path tools,
|
||||
Pathfinder and Shape Builder, paint, gradients, appearance and transparency, type with styles, threading and Hebrew/Arabic bidirectional layout, and
|
||||
files (SVG, PDF and PDF-compatible `.ai` with PDF/X, legacy version 7 `.ai` keeping layers and groups, EPS, DXF, EMF/WMF, raster formats, PSD out and PSD/PSB in as their merged image, Print, Package).
|
||||
files (SVG, PDF and PDF-compatible `.ai` with PDF/X, legacy version 7 `.ai` keeping layers, groups and type, EPS, DXF, EMF/WMF, raster formats, PSD out and PSD/PSB in as their merged image, Print, Package).
|
||||
Affinity documents (`.af` from Affinity 3, `.afdesign`, `.afpub` and, by their content, `.afphoto` from Affinity 1 and 2) open
|
||||
and place natively: layers, groups, artboards and pages, curves and shapes, fills, gradients and strokes, clipping
|
||||
and masks, text and images, with what didn't come in (effects, adjustments, brushes, master pages…) listed in the
|
||||
|
||||
@@ -9,8 +9,10 @@
|
||||
//! artboard to a separate file, with `all` (true: every artboard) or `range`, Include Linked Files,
|
||||
//! Embed ICC Profiles, Create PDF-Compatible File and Use Compression. A `.ai` file's Version comes
|
||||
//! first: PDF-compatible, or legacy version 7 (`aiVersion: "7"`, a file per artboard), which takes
|
||||
//! only Transparent Images and, with several artboards, a picker of the artboards to save
|
||||
//! (thumbnails to check, field `boards`, saved as `range`).
|
||||
//! only Transparent Images (`transparentImages`), Hidden Objects (`hiddenObjects`: a hidden layer,
|
||||
//! omitted or made visible), Text (`outlineText`: editable or outlines) and, with several
|
||||
//! artboards, a picker of the artboards to save (thumbnails to check, field `boards`, saved as
|
||||
//! `range`).
|
||||
|
||||
use std::sync::OnceLock;
|
||||
|
||||
@@ -163,7 +165,7 @@ fn body(app: &mut VectorcraftApp, ui: &mut egui::Ui, d: &mut Dialog) -> bool {
|
||||
|
||||
/// The `.ai` options only the legacy version takes (and the only ones it takes, besides the
|
||||
/// version).
|
||||
const LEGACY_ONLY: &[&str] = &["transparentImages"];
|
||||
const LEGACY_ONLY: &[&str] = &["transparentImages", "hiddenObjects", "outlineText"];
|
||||
|
||||
/// Is a `.ai` file to be saved in the legacy version 7 (`aiVersion: "7"`)?
|
||||
fn legacy_ai(d: &Dialog) -> bool {
|
||||
@@ -335,6 +337,30 @@ fn option_row(app: &VectorcraftApp, ui: &mut egui::Ui, d: &mut Dialog, o: &Forma
|
||||
ui.end_row();
|
||||
return;
|
||||
}
|
||||
if o.name == "hiddenObjects" {
|
||||
ui.label(egui::RichText::new(tl!("Hidden Objects:")).color(t.text_dim)).on_hover_text(o.description);
|
||||
let choices = [tl!("Hidden Layer"), tl!("Omit"), tl!("Make Visible")];
|
||||
let at = match d.str("hiddenObjects").trim() {
|
||||
"omit" => 1,
|
||||
"visible" => 2,
|
||||
_ => 0,
|
||||
};
|
||||
if let Some(i) = widgets::dropdown(ui, ("save-option", o.name), choices.get(at).copied().unwrap_or_default(), &choices, 254.0) {
|
||||
d.fields.insert(o.name.into(), json!(["layer", "omit", "visible"].get(i).copied().unwrap_or("layer")));
|
||||
}
|
||||
ui.end_row();
|
||||
return;
|
||||
}
|
||||
if o.name == "outlineText" && legacy_ai(d) {
|
||||
ui.label(egui::RichText::new(tl!("Text:")).color(t.text_dim)).on_hover_text(o.description);
|
||||
let choices = [tl!("Editable"), tl!("Outlines")];
|
||||
let at = usize::from(value.as_bool().unwrap_or(false));
|
||||
if let Some(i) = widgets::dropdown(ui, ("save-option", o.name), choices.get(at).copied().unwrap_or_default(), &choices, 254.0) {
|
||||
d.fields.insert(o.name.into(), json!(i == 1));
|
||||
}
|
||||
ui.end_row();
|
||||
return;
|
||||
}
|
||||
if o.ty == "boolean" {
|
||||
ui.label("");
|
||||
let on = value.as_bool().unwrap_or(false);
|
||||
@@ -540,9 +566,13 @@ mod tests {
|
||||
assert_eq!(app.run("file.saveAs", json!({})).unwrap()["pending"], KIND);
|
||||
assert_eq!(dialog(&app).str("aiVersion"), "pdf", "PDF-compatible unless asked");
|
||||
assert_eq!(dialog(&app).str("transparentImages"), "flatten");
|
||||
assert_eq!(dialog(&app).str("hiddenObjects"), "layer");
|
||||
assert!(!dialog(&app).bool("outlineText"));
|
||||
frame(&mut app, false);
|
||||
app.ui.dialog.as_mut().unwrap().fields.insert("aiVersion".into(), json!("7"));
|
||||
app.ui.dialog.as_mut().unwrap().fields.insert("transparentImages".into(), json!("omit"));
|
||||
app.ui.dialog.as_mut().unwrap().fields.insert("hiddenObjects".into(), json!("visible"));
|
||||
app.ui.dialog.as_mut().unwrap().fields.insert("outlineText".into(), json!(true));
|
||||
frame(&mut app, false);
|
||||
frame(&mut app, true);
|
||||
assert!(app.ui.dialog.is_none());
|
||||
@@ -552,6 +582,7 @@ mod tests {
|
||||
let st = app.session.active().unwrap();
|
||||
assert_eq!((st.format, st.save_options["aiVersion"].clone()), ("ai", json!("7")), "Save remembers the version");
|
||||
assert_eq!(st.save_options["transparentImages"], json!("omit"));
|
||||
assert_eq!((st.save_options["hiddenObjects"].clone(), st.save_options["outlineText"].clone()), (json!("visible"), json!(true)));
|
||||
}
|
||||
|
||||
/// An Illustrator file opened, then saved as `.ai`: the options dialog stays open through the
|
||||
|
||||
@@ -3186,6 +3186,11 @@ theme Appearance Motiv
|
||||
A legacy .ai file holds one artboard: each artboard you check is saved as a separate file. Soubor .ai ve starší verzi obsahuje jedinou kreslicí plochu: každá zaškrtnutá kreslicí plocha se uloží jako samostatný soubor.
|
||||
{count} of {total} artboards {count} z {total} kreslicích ploch
|
||||
Check an artboard to save. Zaškrtněte kreslicí plochu, kterou chcete uložit.
|
||||
Hidden Objects: Skryté objekty:
|
||||
Hidden Layer Skrytá vrstva
|
||||
Make Visible Zviditelnit
|
||||
Text: Text:
|
||||
Editable Upravitelný
|
||||
PDF-compatible Kompatibilní s PDF
|
||||
Legacy vector clipboard (no transparency) Starší vektorová schránka (bez průhlednosti)
|
||||
Line Color Barva čar
|
||||
|
||||
|
Can't render this file because it contains an unexpected character in line 2 and column 73.
|
@@ -1469,6 +1469,11 @@
|
||||
A legacy .ai file holds one artboard: each artboard you check is saved as a separate file. Eine ältere .ai-Datei enthält eine Zeichenfläche: Jede aktivierte Zeichenfläche wird als eigene Datei gespeichert.
|
||||
{count} of {total} artboards {count} von {total} Zeichenflächen
|
||||
Check an artboard to save. Aktivieren Sie eine Zeichenfläche zum Speichern.
|
||||
Hidden Objects: Ausgeblendete Objekte:
|
||||
Hidden Layer Ausgeblendete Ebene
|
||||
Make Visible Einblenden
|
||||
Text: Text:
|
||||
Editable Bearbeitbar
|
||||
PDF-compatible PDF-kompatibel
|
||||
Legacy vector clipboard (no transparency) Ältere Vektorzwischenablage (ohne Transparenz)
|
||||
Less Weniger
|
||||
|
||||
|
Can't render this file because it contains an unexpected character in line 2 and column 73.
|
@@ -1485,6 +1485,11 @@
|
||||
A legacy .ai file holds one artboard: each artboard you check is saved as a separate file. Un archivo .ai heredado contiene una mesa de trabajo: cada mesa de trabajo marcada se guarda como un archivo independiente.
|
||||
{count} of {total} artboards {count} de {total} mesas de trabajo
|
||||
Check an artboard to save. Marque una mesa de trabajo para guardarla.
|
||||
Hidden Objects: Objetos ocultos:
|
||||
Hidden Layer Capa oculta
|
||||
Make Visible Hacer visibles
|
||||
Text: Texto:
|
||||
Editable Editable
|
||||
PDF-compatible Compatible con PDF
|
||||
Legacy vector clipboard (no transparency) Portapapeles vectorial heredado (sin transparencia)
|
||||
Less Menos
|
||||
|
||||
|
Can't render this file because it contains an unexpected character in line 2 and column 73.
|
@@ -1484,6 +1484,11 @@
|
||||
A legacy .ai file holds one artboard: each artboard you check is saved as a separate file. Un fichier .ai hérité contient un seul plan de travail : chaque plan de travail coché est enregistré dans un fichier distinct.
|
||||
{count} of {total} artboards {count} plans de travail sur {total}
|
||||
Check an artboard to save. Cochez un plan de travail à enregistrer.
|
||||
Hidden Objects: Objets masqués :
|
||||
Hidden Layer Calque masqué
|
||||
Make Visible Rendre visibles
|
||||
Text: Texte :
|
||||
Editable Modifiable
|
||||
PDF-compatible Compatible PDF
|
||||
Legacy vector clipboard (no transparency) Presse-papiers vectoriel hérité (sans transparence)
|
||||
Less Moins
|
||||
|
||||
|
Can't render this file because it contains an unexpected character in line 2 and column 73.
|
@@ -1888,6 +1888,11 @@
|
||||
A legacy .ai file holds one artboard: each artboard you check is saved as a separate file. A régi .ai fájl egy rajztáblát tartalmaz: minden bejelölt rajztábla külön fájlba kerül.
|
||||
{count} of {total} artboards {count} / {total} rajztábla
|
||||
Check an artboard to save. Jelöljön be egy mentendő rajztáblát.
|
||||
Hidden Objects: Rejtett objektumok:
|
||||
Hidden Layer Rejtett réteg
|
||||
Make Visible Láthatóvá tétel
|
||||
Text: Szöveg:
|
||||
Editable Szerkeszthető
|
||||
PDF-compatible PDF-kompatibilis
|
||||
Legacy vector clipboard (no transparency) Régi vektoros vágólap (átlátszóság nélkül)
|
||||
Legal Legal
|
||||
|
||||
|
Can't render this file because it contains an unexpected character in line 2 and column 73.
|
@@ -1487,6 +1487,11 @@
|
||||
A legacy .ai file holds one artboard: each artboard you check is saved as a separate file. Un file .ai tradizionale contiene una tavola da disegno: ogni tavola selezionata viene salvata come file separato.
|
||||
{count} of {total} artboards {count} di {total} tavole da disegno
|
||||
Check an artboard to save. Seleziona una tavola da disegno da salvare.
|
||||
Hidden Objects: Oggetti nascosti:
|
||||
Hidden Layer Livello nascosto
|
||||
Make Visible Rendi visibili
|
||||
Text: Testo:
|
||||
Editable Modificabile
|
||||
PDF-compatible Compatibile PDF
|
||||
Legacy vector clipboard (no transparency) Appunti vettoriali tradizionali (senza trasparenza)
|
||||
Less Meno
|
||||
|
||||
|
Can't render this file because it contains an unexpected character in line 2 and column 73.
|
@@ -1674,6 +1674,11 @@
|
||||
A legacy .ai file holds one artboard: each artboard you check is saved as a separate file. 従来の .ai ファイルにはアートボードが 1 つしか入りません。チェックした各アートボードは別々のファイルとして保存されます。
|
||||
{count} of {total} artboards {total} 個中 {count} 個のアートボード
|
||||
Check an artboard to save. 保存するアートボードをチェックしてください。
|
||||
Hidden Objects: 非表示のオブジェクト:
|
||||
Hidden Layer 非表示レイヤー
|
||||
Make Visible 表示する
|
||||
Text: テキスト:
|
||||
Editable 編集可能
|
||||
PDF-compatible PDF 互換
|
||||
Legacy vector clipboard (no transparency) 従来のベクタークリップボード (透明なし)
|
||||
Less 少なく
|
||||
|
||||
|
Can't render this file because it contains an unexpected character in line 2 and column 73.
|
@@ -1669,6 +1669,11 @@
|
||||
A legacy .ai file holds one artboard: each artboard you check is saved as a separate file. 레거시 .ai 파일에는 대지가 하나만 들어갑니다. 선택한 각 대지는 별도의 파일로 저장됩니다.
|
||||
{count} of {total} artboards 대지 {total}개 중 {count}개
|
||||
Check an artboard to save. 저장할 대지를 선택하십시오.
|
||||
Hidden Objects: 숨겨진 개체:
|
||||
Hidden Layer 숨겨진 레이어
|
||||
Make Visible 표시
|
||||
Text: 텍스트:
|
||||
Editable 편집 가능
|
||||
PDF-compatible PDF 호환
|
||||
Legacy vector clipboard (no transparency) 레거시 벡터 클립보드 (투명도 없음)
|
||||
Less 간단히
|
||||
|
||||
|
Can't render this file because it contains an unexpected character in line 2 and column 73.
|
@@ -4659,6 +4659,11 @@ mark-style Japanese Japońskie
|
||||
A legacy .ai file holds one artboard: each artboard you check is saved as a separate file. Starszy plik .ai zawiera jeden obszar kompozycji: każdy zaznaczony obszar kompozycji jest zapisywany jako osobny plik.
|
||||
{count} of {total} artboards {count} z {total} obszarów kompozycji
|
||||
Check an artboard to save. Zaznacz obszar kompozycji, aby zapisać.
|
||||
Hidden Objects: Ukryte obiekty:
|
||||
Hidden Layer Ukryta warstwa
|
||||
Make Visible Uwidocznij
|
||||
Text: Tekst:
|
||||
Editable Edytowalny
|
||||
PDF-compatible Zgodny z PDF
|
||||
# Dimension tool and Object › Dimensions (dimension groups, their dialog and messages).
|
||||
Dimension Wymiar
|
||||
|
||||
|
Can't render this file because it contains an unexpected character in line 2 and column 73.
|
@@ -1233,6 +1233,11 @@
|
||||
A legacy .ai file holds one artboard: each artboard you check is saved as a separate file. Um arquivo .ai legado contém uma prancheta: cada prancheta marcada é salva como um arquivo separado.
|
||||
{count} of {total} artboards {count} de {total} pranchetas
|
||||
Check an artboard to save. Marque uma prancheta para salvar.
|
||||
Hidden Objects: Objetos ocultos:
|
||||
Hidden Layer Camada oculta
|
||||
Make Visible Tornar visíveis
|
||||
Text: Texto:
|
||||
Editable Editável
|
||||
PDF-compatible Compatível com PDF
|
||||
Legacy vector clipboard (no transparency) Área de transferência vetorial legada (sem transparência)
|
||||
Less Menos
|
||||
|
||||
|
Can't render this file because it contains an unexpected character in line 6 and column 47.
|
@@ -1485,6 +1485,11 @@
|
||||
A legacy .ai file holds one artboard: each artboard you check is saved as a separate file. Устаревший файл .ai содержит одну монтажную область: каждая отмеченная монтажная область сохраняется в отдельный файл.
|
||||
{count} of {total} artboards {count} из {total} монтажных областей
|
||||
Check an artboard to save. Отметьте монтажную область для сохранения.
|
||||
Hidden Objects: Скрытые объекты:
|
||||
Hidden Layer Скрытый слой
|
||||
Make Visible Сделать видимыми
|
||||
Text: Текст:
|
||||
Editable Редактируемый
|
||||
PDF-compatible Совместимый с PDF
|
||||
Legacy vector clipboard (no transparency) Устаревший векторный буфер обмена (без прозрачности)
|
||||
Less Меньше
|
||||
|
||||
|
Can't render this file because it contains an unexpected character in line 2 and column 73.
|
@@ -1481,6 +1481,11 @@
|
||||
A legacy .ai file holds one artboard: each artboard you check is saved as a separate file. Застарілий файл .ai містить одну монтажну область: кожна позначена монтажна область зберігається в окремий файл.
|
||||
{count} of {total} artboards {count} з {total} монтажних областей
|
||||
Check an artboard to save. Позначте монтажну область для збереження.
|
||||
Hidden Objects: Приховані об’єкти:
|
||||
Hidden Layer Прихований шар
|
||||
Make Visible Зробити видимими
|
||||
Text: Текст:
|
||||
Editable Редагований
|
||||
PDF-compatible Сумісний із PDF
|
||||
Legacy vector clipboard (no transparency) Застарілий векторний буфер обміну (без прозорості)
|
||||
Less Менше
|
||||
|
||||
|
Can't render this file because it contains an unexpected character in line 713 and column 40.
|
@@ -1702,6 +1702,11 @@
|
||||
A legacy .ai file holds one artboard: each artboard you check is saved as a separate file. Một tệp .ai cũ chỉ chứa một bảng vẽ: mỗi bảng vẽ bạn chọn được lưu thành một tệp riêng.
|
||||
{count} of {total} artboards {count} trên {total} bảng vẽ
|
||||
Check an artboard to save. Hãy chọn một bảng vẽ để lưu.
|
||||
Hidden Objects: Đối tượng ẩn:
|
||||
Hidden Layer Lớp ẩn
|
||||
Make Visible Hiện ra
|
||||
Text: Văn bản:
|
||||
Editable Có thể chỉnh sửa
|
||||
PDF-compatible Tương thích PDF
|
||||
Legacy Macintosh RGB (Gamma 1.8) RGB Macintosh cũ (Gamma 1.8)
|
||||
Legacy vector clipboard Bảng tạm vector cũ
|
||||
|
||||
|
@@ -1389,6 +1389,11 @@
|
||||
A legacy .ai file holds one artboard: each artboard you check is saved as a separate file. 旧版 .ai 文件只包含一个画板:勾选的每个画板都会存储为单独的文件。
|
||||
{count} of {total} artboards {total} 个画板中的 {count} 个
|
||||
Check an artboard to save. 请勾选要存储的画板。
|
||||
Hidden Objects: 隐藏的对象:
|
||||
Hidden Layer 隐藏图层
|
||||
Make Visible 设为可见
|
||||
Text: 文本:
|
||||
Editable 可编辑
|
||||
PDF-compatible 与 PDF 兼容
|
||||
Legacy vector clipboard (no transparency) 旧版矢量剪贴板 (无透明度)
|
||||
Less 较少
|
||||
|
||||
|
Can't render this file because it contains an unexpected character in line 2 and column 73.
|
@@ -1463,6 +1463,11 @@
|
||||
A legacy .ai file holds one artboard: each artboard you check is saved as a separate file. 舊版 .ai 檔案只包含一個工作區域:勾選的每個工作區域都會儲存為獨立的檔案。
|
||||
{count} of {total} artboards {total} 個工作區域中的 {count} 個
|
||||
Check an artboard to save. 請勾選要儲存的工作區域。
|
||||
Hidden Objects: 隱藏的物件:
|
||||
Hidden Layer 隱藏圖層
|
||||
Make Visible 設為可見
|
||||
Text: 文字:
|
||||
Editable 可編輯
|
||||
PDF-compatible 與 PDF 相容
|
||||
Legacy vector clipboard (no transparency) 舊版向量剪貼簿 (無透明度)
|
||||
Less 較少
|
||||
|
||||
|
Can't render this file because it contains an unexpected character in line 6 and column 47.
|
@@ -622,7 +622,8 @@ Native save options: File → Save As to a native or `.ai` file opens the `saveO
|
||||
artboard; false: `range`, such as "1-3, 5"), `includeLinked`, `embedProfiles`, `pdfCompatible`, `compress`, and for
|
||||
native files `version` and `preview`. A bad range keeps the dialog open; `ui.dialog.confirm` writes the file and the
|
||||
artboards' files. A `.ai` file's `aiVersion` comes first: `"pdf"` (the default) or `"7"` (legacy, heading "Legacy .ai
|
||||
Options"), which takes only `transparentImages` (`"flatten"` or `"omit"`) and, with several artboards, the artboard
|
||||
Options"), which takes only `transparentImages` (`"flatten"` or `"omit"`), `hiddenObjects` (`"layer"`, `"omit"` or
|
||||
`"visible"`, the Hidden Objects menu), `outlineText` (the Text menu: false Editable, true Outlines) and, with several artboards, the artboard
|
||||
picker: `boards`, one bool per artboard (default: those last saved, else all), saved as `range`, one file per checked
|
||||
artboard. OK is disabled with none checked.
|
||||
|
||||
|
||||
File diff suppressed because one or more lines are too long
+8
-6
File diff suppressed because one or more lines are too long
+3
-1
@@ -597,7 +597,9 @@ document, takes the PDF options and keeps its path when reopened, so Save writes
|
||||
without giving the document a path. `options: {aiVersion: "7"}` writes legacy `.ai` files of version 7 instead (the
|
||||
PostScript form, which keeps layers, groups, compound paths and clipping groups in apps that read it), one per artboard
|
||||
of `range` (default all; `{name}-{artboard}.ai` when several, listed in the result's `files`), with
|
||||
`transparentImages: "flatten"` (default) or `"omit"` for images with see-through pixels, opacity or a blending mode.
|
||||
`transparentImages: "flatten"` (default) or `"omit"` for images with see-through pixels, opacity or a blending mode,
|
||||
`hiddenObjects: "layer"` (default: a hidden layer of each layer's hidden objects), `"omit"` or `"visible"`, and
|
||||
`outlineText: true` to write type as outlines instead of text objects.
|
||||
|
||||
Drive a tool like a mouse:
|
||||
|
||||
|
||||
+3
-2
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user