Skip to content

The truly free, open-source, local-first, cross-platform CapCut replacement. Scriptable through a JSON-RPC API & MCP.

feat(text): a searchable font picker that says when a font is missing

Jareeraee2d614ebf9
diff --git a/src/crates/concat/locales/de.json b/src/crates/concat/locales/de.json
index 980ce9af..24029742 100644
--- a/src/crates/concat/locales/de.json
+++ b/src/crates/concat/locales/de.json
@@ -941,6 +941,8 @@
"textPanel.dropShadow": "Schlagschatten",
"textPanel.editingTitles": "{0} Titel werden bearbeitet",
"textPanel.font": "Schrift",
+ "textPanel.fontNotFound": "SCHRIFT NICHT GEFUNDEN",
+ "textPanel.fontNotFoundTip": "Diese Schrift ist auf diesem Gerät nicht installiert, daher wird der Titel in einer Ersatzschrift gezeichnet. Installiere sie oder wähle eine andere.",
"textPanel.fontWeight": "Schriftstärke",
"textPanel.horizontal": "Horizontal",
"textPanel.importFont": "Schrift importieren…",
@@ -949,9 +951,11 @@
"textPanel.lineHeight": "Zeilenhöhe",
"textPanel.lockThePaddingsTogether": "Beide Abstände koppeln",
"textPanel.newTitlesUseThisStyle": "Neue Titel und Untertitel verwenden diesen Stil",
+ "textPanel.noFontsMatch": "Keine passenden Schriften",
"textPanel.padding": "Innenabstand",
"textPanel.position": "Position",
"textPanel.regular": "Normal",
+ "textPanel.searchFonts": "Schriften suchen",
"textPanel.semibold": "Halbfett",
"textPanel.softShadowUnderWords": "Ein weicher Schatten unter den Wörtern, für Titel über Material, das du nicht steuern kannst.",
"textPanel.solidBoxBehindWords": "Ein durchgehender Kasten hinter den Wörtern. Wo ein Schatten das Material weichzeichnet, ersetzt es ein Hintergrund — für Material, das so unruhig ist, dass weder Schriftstärke noch Kontur ausreichen.",
diff --git a/src/crates/concat/locales/en.json b/src/crates/concat/locales/en.json
index 3693fdb5..1760b69c 100644
--- a/src/crates/concat/locales/en.json
+++ b/src/crates/concat/locales/en.json
@@ -941,6 +941,8 @@
"textPanel.dropShadow": "Drop shadow",
"textPanel.editingTitles": "Editing {0} titles",
"textPanel.font": "Font",
+ "textPanel.fontNotFound": "FONT NOT FOUND",
+ "textPanel.fontNotFoundTip": "This font is not installed on this machine, so the title is drawn in a fallback face. Install it, or pick another.",
"textPanel.fontWeight": "Font Weight",
"textPanel.horizontal": "Horizontal",
"textPanel.importFont": "Import a font…",
@@ -949,9 +951,11 @@
"textPanel.lineHeight": "Line height",
"textPanel.lockThePaddingsTogether": "Lock the paddings together",
"textPanel.newTitlesUseThisStyle": "New titles and captions will use this style",
+ "textPanel.noFontsMatch": "No fonts match",
"textPanel.padding": "Padding",
"textPanel.position": "Position",
"textPanel.regular": "Regular",
+ "textPanel.searchFonts": "Search fonts",
"textPanel.semibold": "SemiBold",
"textPanel.softShadowUnderWords": "A soft shadow under the words, for titles that have to sit over footage you do not control.",
"textPanel.solidBoxBehindWords": "A solid box behind the words. Where a shadow softens the footage, a background replaces it — use it when what is underneath is busy enough that neither weight nor outline will hold.",
diff --git a/src/crates/concat/locales/es.json b/src/crates/concat/locales/es.json
index 6e8074de..7136b6e2 100644
--- a/src/crates/concat/locales/es.json
+++ b/src/crates/concat/locales/es.json
@@ -941,6 +941,8 @@
"textPanel.dropShadow": "Sombra paralela",
"textPanel.editingTitles": "Editando {0} títulos",
"textPanel.font": "Fuente",
+ "textPanel.fontNotFound": "FUENTE NO ENCONTRADA",
+ "textPanel.fontNotFoundTip": "Esta fuente no está instalada en este equipo, así que el título se dibuja con una fuente de reserva. Instálala o elige otra.",
"textPanel.fontWeight": "Grosor de fuente",
"textPanel.horizontal": "Horizontal",
"textPanel.importFont": "Importar una fuente…",
@@ -949,9 +951,11 @@
"textPanel.lineHeight": "Interlineado",
"textPanel.lockThePaddingsTogether": "Vincular ambos rellenos",
"textPanel.newTitlesUseThisStyle": "Los títulos y subtítulos nuevos usarán este estilo",
+ "textPanel.noFontsMatch": "Ninguna fuente coincide",
"textPanel.padding": "Relleno",
"textPanel.position": "Posición",
"textPanel.regular": "Regular",
+ "textPanel.searchFonts": "Buscar fuentes",
"textPanel.semibold": "Seminegrita",
"textPanel.softShadowUnderWords": "Una sombra suave bajo las palabras, para títulos que van sobre metraje que no controlas.",
"textPanel.solidBoxBehindWords": "Una caja sólida detrás de las palabras. Donde una sombra suaviza el metraje, un fondo lo sustituye: úsalo cuando lo que hay debajo sea tan cargado que ni el grosor ni el contorno aguanten.",
diff --git a/src/crates/concat/locales/fa.json b/src/crates/concat/locales/fa.json
index 7d28fad3..b5d668fb 100644
--- a/src/crates/concat/locales/fa.json
+++ b/src/crates/concat/locales/fa.json
@@ -941,6 +941,8 @@
"textPanel.dropShadow": "سایه افتاده",
"textPanel.editingTitles": "در حال ویرایش {0} عنوان",
"textPanel.font": "فونت",
+ "textPanel.fontNotFound": "فونت پیدا نشد",
+ "textPanel.fontNotFoundTip": "این فونت روی این دستگاه نصب نیست، پس عنوان با فونت جایگزین کشیده می‌شود. آن را نصب کنید یا فونت دیگری انتخاب کنید.",
"textPanel.fontWeight": "وزن فونت",
"textPanel.horizontal": "افقی",
"textPanel.importFont": "وارد کردن قلم…",
@@ -949,9 +951,11 @@
"textPanel.lineHeight": "ارتفاع خط",
"textPanel.lockThePaddingsTogether": "قفل کردن دو حاشیه به هم",
"textPanel.newTitlesUseThisStyle": "عنوان‌ها و زیرنویس‌های جدید از این سبک استفاده می‌کنند",
+ "textPanel.noFontsMatch": "هیچ فونتی پیدا نشد",
"textPanel.padding": "حاشیهٔ داخلی",
"textPanel.position": "موقعیت",
"textPanel.regular": "معمولی",
+ "textPanel.searchFonts": "جستجوی فونت‌ها",
"textPanel.semibold": "نیمه‌پررنگ",
"textPanel.softShadowUnderWords": "یک سایه نرم زیر نوشته‌ها؛ مناسب عنوانهایی که روی ویدئوی خام غیرقابل‌کنترل قرار می‌گیرند.",
"textPanel.solidBoxBehindWords": "یک کادر یکدست پشت نوشته‌ها. سایه تصویر را نرم می‌کند اما پس‌زمینه آن را می‌پوشاند؛ وقتی آنچه زیر متن است آن‌قدر شلوغ است که نه ضخامت و نه خط دور خوانایی کافی نمی‌دهند، از این گزینه استفاده کنید.",
diff --git a/src/crates/concat/locales/fr.json b/src/crates/concat/locales/fr.json
index 4764b79f..c6f4724a 100644
--- a/src/crates/concat/locales/fr.json
+++ b/src/crates/concat/locales/fr.json
@@ -941,6 +941,8 @@
"textPanel.dropShadow": "Ombre portée",
"textPanel.editingTitles": "Modification de {0} titres",
"textPanel.font": "Police",
+ "textPanel.fontNotFound": "POLICE INTROUVABLE",
+ "textPanel.fontNotFoundTip": "Cette police n'est pas installée sur cet appareil : le titre est dessiné avec une police de secours. Installez-la ou choisissez-en une autre.",
"textPanel.fontWeight": "Graisse de la police",
"textPanel.horizontal": "Horizontal",
"textPanel.importFont": "Importer une police…",
@@ -949,9 +951,11 @@
"textPanel.lineHeight": "Interligne",
"textPanel.lockThePaddingsTogether": "Lier les deux marges",
"textPanel.newTitlesUseThisStyle": "Les nouveaux titres et sous-titres utiliseront ce style",
+ "textPanel.noFontsMatch": "Aucune police ne correspond",
"textPanel.padding": "Marge intérieure",
"textPanel.position": "Position",
"textPanel.regular": "Normal",
+ "textPanel.searchFonts": "Rechercher des polices",
"textPanel.semibold": "Demi-gras",
"textPanel.softShadowUnderWords": "Une ombre douce sous les mots, pour les titres posés sur des images que vous ne maîtrisez pas.",
"textPanel.solidBoxBehindWords": "Un cadre plein derrière les mots. Là où une ombre adoucit l'image, un arrière-plan la remplace : utilisez-le quand ce qui est en dessous est trop chargé pour que la graisse ou le contour suffisent.",
diff --git a/src/crates/concat/locales/hr.json b/src/crates/concat/locales/hr.json
index 495fc7ff..fda783f8 100644
--- a/src/crates/concat/locales/hr.json
+++ b/src/crates/concat/locales/hr.json
@@ -941,6 +941,8 @@
"textPanel.dropShadow": "Sjena",
"textPanel.editingTitles": "Uređivanje {0} naslova",
"textPanel.font": "Font",
+ "textPanel.fontNotFound": "FONT NIJE PRONAĐEN",
+ "textPanel.fontNotFoundTip": "Ovaj font nije instaliran na ovom uređaju, pa se naslov crta zamjenskim fontom. Instalirajte ga ili odaberite drugi.",
"textPanel.fontWeight": "Debljina fonta",
"textPanel.horizontal": "Vodoravno",
"textPanel.importFont": "Uvezi font…",
@@ -949,9 +951,11 @@
"textPanel.lineHeight": "Visina retka",
"textPanel.lockThePaddingsTogether": "Zaključaj oba razmaka zajedno",
"textPanel.newTitlesUseThisStyle": "Novi naslovi i titlovi koristit će ovaj stil",
+ "textPanel.noFontsMatch": "Nijedan font ne odgovara",
"textPanel.padding": "Unutarnji razmak",
"textPanel.position": "Položaj",
"textPanel.regular": "Obično",
+ "textPanel.searchFonts": "Pretraži fontove",
"textPanel.semibold": "Polupodebljano",
"textPanel.softShadowUnderWords": "Meka sjena ispod riječi, za naslove koji moraju stajati preko snimke koju ne kontrolirate.",
"textPanel.solidBoxBehindWords": "Puni okvir iza riječi. Gdje sjena omekšava snimku, pozadina je zamjenjuje — koristite je kada je ono ispod dovoljno bučno da ni debljina ni kontura ne drže.",
diff --git a/src/crates/concat/locales/it.json b/src/crates/concat/locales/it.json
index f210ee73..bfa8eb09 100644
--- a/src/crates/concat/locales/it.json
+++ b/src/crates/concat/locales/it.json
@@ -941,6 +941,8 @@
"textPanel.dropShadow": "Ombra esterna",
"textPanel.editingTitles": "Modifica di {0} titoli",
"textPanel.font": "Carattere",
+ "textPanel.fontNotFound": "FONT NON TROVATO",
+ "textPanel.fontNotFoundTip": "Questo font non è installato su questo dispositivo, quindi il titolo usa un font di ripiego. Installalo o scegline un altro.",
"textPanel.fontWeight": "Peso del carattere",
"textPanel.horizontal": "Orizzontale",
"textPanel.importFont": "Importa un font…",
@@ -949,9 +951,11 @@
"textPanel.lineHeight": "Interlinea",
"textPanel.lockThePaddingsTogether": "Blocca le due spaziature insieme",
"textPanel.newTitlesUseThisStyle": "I nuovi titoli e sottotitoli useranno questo stile",
+ "textPanel.noFontsMatch": "Nessun font corrisponde",
"textPanel.padding": "Spaziatura interna",
"textPanel.position": "Posizione",
"textPanel.regular": "Normale",
+ "textPanel.searchFonts": "Cerca font",
"textPanel.semibold": "Semigrassetto",
"textPanel.softShadowUnderWords": "Un'ombra morbida sotto le parole, per titoli che stanno su riprese che non controlli.",
"textPanel.solidBoxBehindWords": "Un riquadro pieno dietro le parole. Dove un'ombra ammorbidisce la ripresa, uno sfondo la sostituisce: usalo quando ciò che sta sotto è così movimentato che né il peso né il contorno bastano.",
diff --git a/src/crates/concat/locales/ja.json b/src/crates/concat/locales/ja.json
index 9fde2853..67cc4c7f 100644
--- a/src/crates/concat/locales/ja.json
+++ b/src/crates/concat/locales/ja.json
@@ -941,6 +941,8 @@
"textPanel.dropShadow": "ドロップシャドウ",
"textPanel.editingTitles": "{0} 件のタイトルを編集中",
"textPanel.font": "フォント",
+ "textPanel.fontNotFound": "フォントが見つかりません",
+ "textPanel.fontNotFoundTip": "このフォントはこの端末にインストールされていないため、代替フォントで表示しています。インストールするか、別のフォントを選んでください。",
"textPanel.fontWeight": "フォントの太さ",
"textPanel.horizontal": "水平",
"textPanel.importFont": "フォントを読み込む…",
@@ -949,9 +951,11 @@
"textPanel.lineHeight": "行の高さ",
"textPanel.lockThePaddingsTogether": "2つの余白を連動する",
"textPanel.newTitlesUseThisStyle": "新しいタイトルと字幕にこのスタイルを使います",
+ "textPanel.noFontsMatch": "一致するフォントがありません",
"textPanel.padding": "余白",
"textPanel.position": "位置",
"textPanel.regular": "標準",
+ "textPanel.searchFonts": "フォントを検索",
"textPanel.semibold": "セミボールド",
"textPanel.softShadowUnderWords": "文字の下の柔らかな影。制御できない映像の上に置くタイトルに。",
"textPanel.solidBoxBehindWords": "文字の後ろの塗りつぶした箱。影が映像を和らげるのに対し、背景は映像を置き換えます。太さも縁取りも効かないほど下の映像が騒がしいときに。",
diff --git a/src/crates/concat/locales/ko.json b/src/crates/concat/locales/ko.json
index 07db0945..35efca4d 100644
--- a/src/crates/concat/locales/ko.json
+++ b/src/crates/concat/locales/ko.json
@@ -941,6 +941,8 @@
"textPanel.dropShadow": "그림자",
"textPanel.editingTitles": "제목 {0}개 편집 중",
"textPanel.font": "글꼴",
+ "textPanel.fontNotFound": "글꼴을 찾을 수 없음",
+ "textPanel.fontNotFoundTip": "이 글꼴이 이 기기에 설치되어 있지 않아 대체 글꼴로 표시됩니다. 설치하거나 다른 글꼴을 선택하세요.",
"textPanel.fontWeight": "글꼴 굵기",
"textPanel.horizontal": "가로",
"textPanel.importFont": "글꼴 가져오기…",
@@ -949,9 +951,11 @@
"textPanel.lineHeight": "줄 높이",
"textPanel.lockThePaddingsTogether": "두 여백을 함께 잠그기",
"textPanel.newTitlesUseThisStyle": "새 제목과 자막에 이 스타일을 사용합니다",
+ "textPanel.noFontsMatch": "일치하는 글꼴 없음",
"textPanel.padding": "여백",
"textPanel.position": "위치",
"textPanel.regular": "보통",
+ "textPanel.searchFonts": "글꼴 검색",
"textPanel.semibold": "세미볼드",
"textPanel.softShadowUnderWords": "글자 아래의 부드러운 그림자. 통제할 수 없는 영상 위에 놓이는 자막용.",
"textPanel.solidBoxBehindWords": "글자 뒤의 단색 상자. 그림자가 영상을 부드럽게 하는 대신 배경은 영상을 대체합니다. 아래 영상이 너무 복잡해 굵기나 외곽선으로도 안 될 때 쓰세요.",
diff --git a/src/crates/concat/locales/pt-BR.json b/src/crates/concat/locales/pt-BR.json
index dfb20dd6..704419b9 100644
--- a/src/crates/concat/locales/pt-BR.json
+++ b/src/crates/concat/locales/pt-BR.json
@@ -941,6 +941,8 @@
"textPanel.dropShadow": "Sombra projetada",
"textPanel.editingTitles": "Editando {0} títulos",
"textPanel.font": "Fonte",
+ "textPanel.fontNotFound": "FONTE NÃO ENCONTRADA",
+ "textPanel.fontNotFoundTip": "Esta fonte não está instalada neste dispositivo, então o título usa uma fonte substituta. Instale-a ou escolha outra.",
"textPanel.fontWeight": "Peso da fonte",
"textPanel.horizontal": "Horizontal",
"textPanel.importFont": "Importar uma fonte…",
@@ -949,9 +951,11 @@
"textPanel.lineHeight": "Altura da linha",
"textPanel.lockThePaddingsTogether": "Vincular os dois preenchimentos",
"textPanel.newTitlesUseThisStyle": "Novos títulos e legendas usarão este estilo",
+ "textPanel.noFontsMatch": "Nenhuma fonte encontrada",
"textPanel.padding": "Preenchimento",
"textPanel.position": "Posição",
"textPanel.regular": "Regular",
+ "textPanel.searchFonts": "Buscar fontes",
"textPanel.semibold": "Seminegrito",
"textPanel.softShadowUnderWords": "Uma sombra suave sob as palavras, para títulos que ficam sobre imagens que você não controla.",
"textPanel.solidBoxBehindWords": "Uma caixa sólida atrás das palavras. Onde uma sombra suaviza a imagem, um fundo a substitui — use quando o que está abaixo for tão agitado que nem o peso nem o contorno bastem.",
diff --git a/src/crates/concat/locales/ru.json b/src/crates/concat/locales/ru.json
index 8926db62..ac9a2803 100644
--- a/src/crates/concat/locales/ru.json
+++ b/src/crates/concat/locales/ru.json
@@ -941,6 +941,8 @@
"textPanel.dropShadow": "Тень",
"textPanel.editingTitles": "Редактирование {0} титров",
"textPanel.font": "Шрифт",
+ "textPanel.fontNotFound": "ШРИФТ НЕ НАЙДЕН",
+ "textPanel.fontNotFoundTip": "Этот шрифт не установлен на этом устройстве, поэтому заголовок отображается запасным шрифтом. Установите его или выберите другой.",
"textPanel.fontWeight": "Насыщенность шрифта",
"textPanel.horizontal": "По горизонтали",
"textPanel.importFont": "Импортировать шрифт…",
@@ -949,9 +951,11 @@
"textPanel.lineHeight": "Высота строки",
"textPanel.lockThePaddingsTogether": "Связать оба отступа",
"textPanel.newTitlesUseThisStyle": "Новые титры и субтитры будут использовать этот стиль",
+ "textPanel.noFontsMatch": "Шрифты не найдены",
"textPanel.padding": "Отступы",
"textPanel.position": "Положение",
"textPanel.regular": "Обычный",
+ "textPanel.searchFonts": "Поиск шрифтов",
"textPanel.semibold": "Полужирный",
"textPanel.softShadowUnderWords": "Мягкая тень под словами — для титров поверх кадров, которыми вы не управляете.",
"textPanel.solidBoxBehindWords": "Сплошной прямоугольник за словами. Где тень смягчает кадр, фон его заменяет — используйте его, когда то, что под текстом, настолько пёстрое, что ни жирность, ни обводка не спасают.",
diff --git a/src/crates/concat/locales/tr.json b/src/crates/concat/locales/tr.json
index 423e9427..35d87f2f 100644
--- a/src/crates/concat/locales/tr.json
+++ b/src/crates/concat/locales/tr.json
@@ -941,6 +941,8 @@
"textPanel.dropShadow": "Gölge",
"textPanel.editingTitles": "{0} başlık düzenleniyor",
"textPanel.font": "Yazı tipi",
+ "textPanel.fontNotFound": "YAZI TİPİ BULUNAMADI",
+ "textPanel.fontNotFoundTip": "Bu yazı tipi bu cihazda yüklü değil, bu yüzden başlık yedek bir yazı tipiyle çiziliyor. Yükleyin ya da başka birini seçin.",
"textPanel.fontWeight": "Yazı kalınlığı",
"textPanel.horizontal": "Yatay",
"textPanel.importFont": "Yazı tipi içe aktar…",
@@ -949,9 +951,11 @@
"textPanel.lineHeight": "Satır yüksekliği",
"textPanel.lockThePaddingsTogether": "İki boşluğu birlikte kilitle",
"textPanel.newTitlesUseThisStyle": "Yeni başlıklar ve altyazılar bu stili kullanacak",
+ "textPanel.noFontsMatch": "Eşleşen yazı tipi yok",
"textPanel.padding": "İç boşluk",
"textPanel.position": "Konum",
"textPanel.regular": "Normal",
+ "textPanel.searchFonts": "Yazı tipi ara",
"textPanel.semibold": "Yarı kalın",
"textPanel.softShadowUnderWords": "Kelimelerin altında yumuşak bir gölge; kontrol edemediğiniz görüntülerin üzerine oturan yazılar için.",
"textPanel.solidBoxBehindWords": "Kelimelerin arkasında dolu bir kutu. Gölge görüntüyü yumuşatırken arka plan onun yerini alır; alttaki görüntü kalınlığın da dış çizginin de yetmeyeceği kadar karışıksa kullanın.",
diff --git a/src/crates/concat/locales/zh-Hans.json b/src/crates/concat/locales/zh-Hans.json
index 6b4d1cb1..4b4e9aed 100644
--- a/src/crates/concat/locales/zh-Hans.json
+++ b/src/crates/concat/locales/zh-Hans.json
@@ -941,6 +941,8 @@
"textPanel.dropShadow": "投影",
"textPanel.editingTitles": "正在编辑 {0} 个标题",
"textPanel.font": "字体",
+ "textPanel.fontNotFound": "未找到字体",
+ "textPanel.fontNotFoundTip": "此设备未安装该字体,标题以替代字体显示。请安装它,或选择其他字体。",
"textPanel.fontWeight": "字重",
"textPanel.horizontal": "水平",
"textPanel.importFont": "导入字体…",
@@ -949,9 +951,11 @@
"textPanel.lineHeight": "行高",
"textPanel.lockThePaddingsTogether": "锁定两个内边距一致",
"textPanel.newTitlesUseThisStyle": "新标题和字幕将使用此样式",
+ "textPanel.noFontsMatch": "没有匹配的字体",
"textPanel.padding": "内边距",
"textPanel.position": "位置",
"textPanel.regular": "常规",
+ "textPanel.searchFonts": "搜索字体",
"textPanel.semibold": "半粗体",
"textPanel.softShadowUnderWords": "文字下方的柔和阴影,适合必须叠在无法掌控的素材之上的标题。",
"textPanel.solidBoxBehindWords": "文字后方的实色方块。阴影只是柔化画面,背景则直接替换它——当下方素材杂乱到粗细和描边都压不住时使用。",
diff --git a/src/crates/concat/locales/zh-TW.json b/src/crates/concat/locales/zh-TW.json
index d545b682..3b32ae77 100644
--- a/src/crates/concat/locales/zh-TW.json
+++ b/src/crates/concat/locales/zh-TW.json
@@ -941,6 +941,8 @@
"textPanel.dropShadow": "投影",
"textPanel.editingTitles": "正在編輯 {0} 個標題",
"textPanel.font": "字型",
+ "textPanel.fontNotFound": "找不到字型",
+ "textPanel.fontNotFoundTip": "此裝置未安裝該字型,標題以替代字型顯示。請安裝它,或選擇其他字型。",
"textPanel.fontWeight": "字重",
"textPanel.horizontal": "水平",
"textPanel.importFont": "匯入字型…",
@@ -949,9 +951,11 @@
"textPanel.lineHeight": "行高",
"textPanel.lockThePaddingsTogether": "鎖定兩個內邊距一致",
"textPanel.newTitlesUseThisStyle": "新標題和字幕將使用此樣式",
+ "textPanel.noFontsMatch": "沒有符合的字型",
"textPanel.padding": "內邊距",
"textPanel.position": "位置",
"textPanel.regular": "標準",
+ "textPanel.searchFonts": "搜尋字型",
"textPanel.semibold": "半粗體",
"textPanel.softShadowUnderWords": "文字下方的柔和陰影,適合必須疊在無法掌控的素材之上的標題。",
"textPanel.solidBoxBehindWords": "文字後方的實色方塊。陰影只是柔化畫面,背景則直接取代它——當下方素材雜亂到粗細和描邊都壓不住時使用。",
diff --git a/src/crates/concat/src/lib.rs b/src/crates/concat/src/lib.rs
index d1ba86b9..0b439a24 100644
--- a/src/crates/concat/src/lib.rs
+++ b/src/crates/concat/src/lib.rs
@@ -286,6 +286,8 @@ pub fn run() -> Result<(), slint::PlatformError> {
app.set_recents(ModelRc::from(models.recents.clone()));
editor.set_text_presets(ModelRc::from(models.text_presets.clone()));
editor.set_font_families(ModelRc::from(models.font_families.clone()));
+ app.global::<FontSearch>()
+ .set_matches(ModelRc::from(models.font_matches.clone()));
}
// Settings > About's block, gathered once: nothing in it changes while
@@ -1124,6 +1126,10 @@ pub fn run() -> Result<(), slint::PlatformError> {
editor.on_play_toggled(on_window!(|state| {
state.play_toggle();
}));
+ app.global::<FontSearch>()
+ .on_query_changed(on_window!(|state, text: SharedString| {
+ state.font_query = text.to_string();
+ }));
app.global::<SourcePreview>().on_closed(on_window!(|state| {
state.close_source();
}));
diff --git a/src/crates/concat/src/studio.rs b/src/crates/concat/src/studio.rs
index 601261d8..3365e3ba 100644
--- a/src/crates/concat/src/studio.rs
+++ b/src/crates/concat/src/studio.rs
@@ -616,6 +616,8 @@ pub struct Models {
pub text_presets: Rc<VecModel<TextPresetData>>,
/// The families a title can be set in; see `Studio::font_families`.
pub font_families: Rc<VecModel<SharedString>>,
+ /// Those of them the font picker's search lets through.
+ pub font_matches: Rc<VecModel<SharedString>>,
}
impl Models {
@@ -673,6 +675,7 @@ impl Models {
recents: Rc::new(VecModel::default()),
text_presets: Rc::new(VecModel::default()),
font_families: Rc::new(VecModel::default()),
+ font_matches: Rc::new(VecModel::default()),
}
}
}
@@ -913,6 +916,11 @@ pub struct Studio {
/// A fingerprint of what `font_families` was last published from, so
/// a publish that changes none of it leaves the picker's list alone.
fonts_published: std::cell::Cell<Option<u64>>,
+ /// What the font picker's search box holds.
+ pub font_query: String,
+ /// The families and the query the search's matches were last
+ /// published from, hashed.
+ font_search_published: std::cell::Cell<Option<u64>>,
/// The languages Settings › General offers, in its order; see `i18n`.
pub languages: Vec<i18n::Language>,
@@ -2002,6 +2010,8 @@ impl Studio {
installed_fonts: presets::installed_fonts(&host.dirs),
system_fonts: Vec::new(),
fonts_published: std::cell::Cell::new(None),
+ font_query: String::new(),
+ font_search_published: std::cell::Cell::new(None),
languages,
brush: 0,
brush_size: 0.06,
@@ -7628,15 +7638,29 @@ impl Studio {
keys.set_available(!rows.is_empty());
sync(&models.key_rows, rows);
let fonts = Some(self.fonts_fingerprint());
- if self.fonts_published.get() != fonts {
+ let searched = Some({
+ use std::hash::{Hash, Hasher};
+ let mut hasher = std::collections::hash_map::DefaultHasher::new();
+ (fonts, &self.font_query).hash(&mut hasher);
+ hasher.finish()
+ });
+ if self.fonts_published.get() != fonts || self.font_search_published.get() != searched {
self.fonts_published.set(fonts);
+ self.font_search_published.set(searched);
+ let families = self.font_families();
+ let query = self.font_query.trim().to_lowercase();
sync(
- &models.font_families,
- self.font_families()
- .into_iter()
+ &models.font_matches,
+ families
+ .iter()
+ .filter(|family| query.is_empty() || family.to_lowercase().contains(&query))
.map(SharedString::from)
.collect(),
);
+ sync(
+ &models.font_families,
+ families.into_iter().map(SharedString::from).collect(),
+ );
}
editor.set_inspector_jump_token(self.inspector_jump.0);
editor.set_library_audition(self.audition_of().unwrap_or("").into());
@@ -8696,6 +8720,12 @@ impl Studio {
// what the knob edits.
let at = place_in(clip, self.playhead);
let text = clip.text.clone().unwrap_or_default();
+ // Where the family sits in the picker's list; none when nothing on
+ // this machine has it, which the picker shows in red.
+ let family_row = self
+ .font_families()
+ .iter()
+ .position(|family| family.eq_ignore_ascii_case(text.font_family.trim_matches('"')));
let fill = colour_of(&text.color);
let stroke = colour_of(&text.stroke_color);
let plate = colour_of(&text.background);
@@ -8762,11 +8792,9 @@ impl Studio {
fade_out: clip.fade_out as f32,
content: text.content.as_str().into(),
font_family: text.font_family.trim_matches('"').into(),
- family_row: self
- .font_families()
- .iter()
- .position(|family| family.eq_ignore_ascii_case(text.font_family.trim_matches('"')))
- .unwrap_or(0) as i32,
+ family_row: family_row.unwrap_or(0) as i32,
+ font_missing: family_row.is_none()
+ && !text.font_family.trim_matches('"').trim().is_empty(),
font_size: text.font_size as f32,
font_weight: text.font_weight as f32,
italic: text.italic,
diff --git a/src/crates/concat/ui/app.slint b/src/crates/concat/ui/app.slint
index cf36e477..130c44bb 100644
--- a/src/crates/concat/ui/app.slint
+++ b/src/crates/concat/ui/app.slint
@@ -40,6 +40,7 @@ import {
import { ParamFormat } from "inspector/controls.slint";
import { ToastData, ToastLayer } from "primitives/toast.slint";
import { TooltipLayer } from "primitives/tooltip.slint";
+import { FontSearch } from "inspector/font-picker.slint";
import { Workspace } from "workspace/workspace.slint";
import {
ClipData, ClipField, ClipKeyData, ClipKind, ClipTextField, DropData, Keyframes,
@@ -54,7 +55,7 @@ export {
Curves, Fmt, Focus, Payload, Theme, Bezier, Editor, I18n,
AppliedEntryData, AppliedParamData, CatalogueEntryData, Library, LibraryViewData, ParamFormat,
DockDivider, DockSide, PaneKind, SeatBox,
- EffectData, MediaFilter, MediaItemData, MediaKind, SourcePreview, TextPresetData,
+ EffectData, FontSearch, MediaFilter, MediaItemData, MediaKind, SourcePreview, TextPresetData,
ClipData, ClipField, ClipKeyData, ClipKind, ClipTextField, DropData, Keyframes,
KeyEditor, KeyMarkData, KeyRowData,
SelectedClipData, SelectedTransitionData, StageGuideData, StageItemData, TextAlignment, TimelineTabData,
diff --git a/src/crates/concat/ui/inspector/controls.slint b/src/crates/concat/ui/inspector/controls.slint
index fd2d69b9..af289db2 100644
--- a/src/crates/concat/ui/inspector/controls.slint
+++ b/src/crates/concat/ui/inspector/controls.slint
@@ -704,6 +704,9 @@ export component SearchField inherits Rectangle {
callback edited(text: string);
+ // A caller's `focus()` lands in the field, so a list that opens on a
+ // search can be typed into at once.
+ forward-focus: input;
height: Theme.h;
border-radius: Theme.r-sm;
background: Theme.field;
diff --git a/src/crates/concat/ui/inspector/font-picker.slint b/src/crates/concat/ui/inspector/font-picker.slint
new file mode 100644
index 00000000..40c19238
--- /dev/null
+++ b/src/crates/concat/ui/inspector/font-picker.slint
@@ -0,0 +1,145 @@
+// SPDX-License-Identifier: AGPL-3.0-or-later
+// SPDX-FileCopyrightText: 2026 Jareer and Concat contributors
+
+// The font picker: the title's family on the trigger, and a list of every
+// family the title can be set in, searched as it is typed into, each name
+// drawn in its own face. A family this machine does not have - a preset
+// or a project shared from one that did - turns the trigger red and says
+// so, rather than quietly showing the face it fell back to.
+
+import { I18n } from "../i18n.slint";
+import { Theme } from "../theme/theme.slint";
+import { Glyph, Icon } from "../icons.slint";
+import { SearchField } from "controls.slint";
+import { Tip } from "../primitives/tooltip.slint";
+import { ListView } from "std-widgets.slint";
+
+/// The list the picker shows, searched by Rust: Slint cannot filter a model,
+/// so the query goes out and the families that match come back.
+export global FontSearch {
+ in property <[string]> matches;
+ callback query-changed(text: string);
+}
+
+export component FontPicker inherits Rectangle {
+ /// The family the title names, as written.
+ in property <string> family;
+ /// Nothing on this machine has that family.
+ in property <bool> missing;
+ callback picked(family: string);
+
+ height: Theme.h;
+ horizontal-stretch: 1;
+ border-radius: Theme.r;
+ background: root.missing ? Theme.danger-wash
+ : touch.has-hover ? Theme.field-hover : Theme.field;
+ border-width: 1px;
+ border-color: root.missing ? Theme.danger : Theme.line;
+
+ HorizontalLayout {
+ padding-left: 8px;
+ padding-right: 6px;
+ spacing: 6px;
+
+ Text {
+ horizontal-stretch: 1;
+ text: root.missing
+ ? I18n.t("textPanel.fontNotFound") + " · " + root.family
+ : root.family;
+ color: root.missing ? Theme.danger : Theme.fg;
+ // The name in its own face, unless there is no such face.
+ font-family: root.missing ? "" : root.family;
+ font-size: Theme.fs;
+ font-weight: root.missing ? Theme.weight-title : 400;
+ vertical-alignment: center;
+ overflow: elide;
+ }
+ VerticalLayout {
+ alignment: center;
+ Icon {
+ glyph: Glyph.chevron-down;
+ size: 12px;
+ tint: root.missing ? Theme.danger : Theme.fg-muted;
+ }
+ }
+ }
+
+ touch := TouchArea {
+ mouse-cursor: pointer;
+ clicked => {
+ FontSearch.query-changed("");
+ list.show();
+ }
+ }
+
+ Tip {
+ text: root.missing ? I18n.t("textPanel.fontNotFoundTip") : "";
+ active: touch.has-hover;
+ }
+
+ list := PopupWindow {
+ x: 0;
+ y: root.height + 4px;
+ width: Math.max(root.width, 220px);
+ height: 300px;
+ close-policy: close-on-click-outside;
+
+ Rectangle {
+ background: Theme.raised;
+ border-width: 1px;
+ border-color: Theme.line-strong;
+ border-radius: Theme.r;
+ clip: true;
+
+ VerticalLayout {
+ padding: 6px;
+ spacing: 6px;
+
+ search := SearchField {
+ placeholder: I18n.t("textPanel.searchFonts");
+ edited(text) => { FontSearch.query-changed(text); }
+ init => { self.focus(); }
+ }
+
+ if FontSearch.matches.length == 0: Text {
+ text: I18n.t("textPanel.noFontsMatch");
+ color: Theme.fg-dim;
+ font-size: Theme.fs;
+ horizontal-alignment: center;
+ vertical-stretch: 1;
+ }
+
+ // Virtual: a machine can have hundreds of families, and
+ // each row is set in its own face.
+ if FontSearch.matches.length > 0: ListView {
+ vertical-stretch: 1;
+ for name in FontSearch.matches: Rectangle {
+ height: 28px;
+ border-radius: Theme.r-sm;
+ background: row.has-hover ? Theme.field-hover : transparent;
+
+ Text {
+ x: 8px;
+ width: parent.width - 16px;
+ height: parent.height;
+ text: name;
+ font-family: name;
+ font-size: Theme.fs;
+ color: name == root.family ? Theme.accent : Theme.fg;
+ vertical-alignment: center;
+ overflow: elide;
+ }
+
+ row := TouchArea {
+ mouse-cursor: pointer;
+ clicked => {
+ root.picked(name);
+ list.close();
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+}
diff --git a/src/crates/concat/ui/inspector/text-panel.slint b/src/crates/concat/ui/inspector/text-panel.slint
index f47aeaf8..8f779caa 100644
--- a/src/crates/concat/ui/inspector/text-panel.slint
+++ b/src/crates/concat/ui/inspector/text-panel.slint
@@ -7,6 +7,7 @@ import { Glyph } from "../icons.slint";
import { IconButton, Row, Section, SectionBody, SectionHeader } from "../primitives/panel.slint";
import { SegmentedControl } from "../primitives/segmented-control.slint";
import { Select } from "../primitives/select.slint";
+import { FontPicker } from "font-picker.slint";
import { NumberField } from "../primitives/number-field.slint";
import { Button } from "../primitives/modal.slint";
import {
@@ -80,7 +81,6 @@ export component TextPanel inherits VerticalLayout {
property <float> offset-x;
property <float> offset-y;
property <int> weight-index;
- property <int> family-index;
property <[float]> weights: [400, 500, 600, 700];
/// The label column of the rows whose label is two words.
@@ -108,9 +108,6 @@ export component TextPanel inherits VerticalLayout {
root.weight-index = root.selected.font-weight >= 700 ? 3
: root.selected.font-weight >= 600 ? 2
: root.selected.font-weight >= 500 ? 1 : 0;
- // Where the family sits in the list Rust offers; a family nobody
- // has is painted in the bundled face and shows as that row.
- root.family-index = root.selected.family-row;
}
init => { root.seed(); }
@@ -258,11 +255,13 @@ export component TextPanel inherits VerticalLayout {
Row {
label: I18n.t("textPanel.font");
label-width: root.label-w;
- Select {
- options: root.families;
- current <=> root.family-index;
- changed(index) => {
- root.set-text(ClipTextField.font-family, root.families[index]);
+ // Searchable, each family in its own face; red when the title
+ // names one this machine does not have.
+ FontPicker {
+ family: root.selected.font-family;
+ missing: root.selected.font-missing;
+ picked(family) => {
+ root.set-text(ClipTextField.font-family, family);
root.commit();
}
}
diff --git a/src/crates/concat/ui/timeline/model.slint b/src/crates/concat/ui/timeline/model.slint
index f030e733..4557d0fc 100644
--- a/src/crates/concat/ui/timeline/model.slint
+++ b/src/crates/concat/ui/timeline/model.slint
@@ -357,6 +357,9 @@ export struct SelectedClipData {
/// 0 - the bundled face - for a family nobody has, which is painted in
/// it.
family-row: int,
+ /// No face on this machine has the family: a preset or a project from
+ /// one that did. The picker says so in red.
+ font-missing: bool,
/// share of frame height, not points: the frame can be any resolution
font-size: float,
font-weight: float,