Docs' font picker lists plain family names
The picker no longer says "Calibri-compatible" or "Cambria-compatible" on the web or in the Mac and iOS apps; DOCX and paste mappings are unchanged. Toolbar lists widen to their longest entry so every row is one line. Reviewed by Claude Fable 5.1 (#91). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Squashed from chore/picker-no-compat-label into main.
20 files changed,
+77
−77
internal/docs/export.go+6 −11internal/docs/export_test.go+24 −6internal/docs/fonts_browser_test.go+18 −12internal/docs/render.go+0 −1internal/docs/views/show.html+14 −4internal/fonts/fonts.go+3 −4native/apple/Sources/DocsKit/DocsFontPicker.swift+9 −23native/apple/Sources/DocsKit/Resources/ar.lproj/Localizable.strings+0 −1native/apple/Sources/DocsKit/Resources/bn.lproj/Localizable.strings+0 −1native/apple/Sources/DocsKit/Resources/en.lproj/Localizable.strings+0 −1native/apple/Sources/DocsKit/Resources/es.lproj/Localizable.strings+0 −1native/apple/Sources/DocsKit/Resources/ga.lproj/Localizable.strings+0 −1native/apple/Sources/DocsKit/Resources/hi.lproj/Localizable.strings+0 −1native/apple/Sources/DocsKit/Resources/ja.lproj/Localizable.strings+0 −1native/apple/Sources/DocsKit/Resources/pt.lproj/Localizable.strings+0 −1native/apple/Sources/DocsKit/Resources/ru.lproj/Localizable.strings+0 −1native/apple/Sources/DocsKit/Resources/vi.lproj/Localizable.strings+0 −1native/apple/Sources/DocsKit/Resources/yue.lproj/Localizable.strings+0 −1native/apple/Sources/DocsKit/Resources/zh-Hans.lproj/Localizable.strings+0 −1native/apple/Tests/DocsKitTests/DocsFontPickerTests.swift+3 −4
CI passed — run details
landed from chore/picker-no-compat-label
diff --git a/internal/docs/export.go b/internal/docs/export.go| index fe3dffa..24c5d65 100644 |
| --- a/internal/docs/export.go |
| +++ b/internal/docs/export.go |
| @@ -98,7 +98,7 @@ func newToolbarView(r *http.Request) toolbarView { |
| {"heading-3", rastrillo.T(r, "docs.editor.toolbar.block.heading3")}, |
| }, |
| FontLabel: rastrillo.T(r, "docs.editor.toolbar.font"), |
| - Fonts: fontOptions(r), |
| + Fonts: fontOptions(), |
| SizeLabel: rastrillo.T(r, "docs.editor.toolbar.size"), |
| Sizes: sizeOptions(), |
| @@ -161,27 +161,22 @@ func sizeOptions() []toolbarOption { |
| // (Paul, 2026-10-24): Class is the preview class ui/select.js puts on the |
| // row and on the closed box (data-rst-class, rastrillo v0.28.0). The |
| // name is the family's own, untranslated; it is a proper noun, and the |
| -// preview subset holds exactly its glyphs. Desc is copy, for a family |
| -// that is a Word font's metric twin. |
| +// preview subset holds exactly its glyphs. A row is the name alone: a |
| +// Word font's metric twin does not say so (Paul, 2026-10-26); Twin stays |
| +// in the manifest for DOCX export and paste. |
| type fontOption struct { |
| Value string |
| Name string |
| - Desc string |
| Class string |
| } |
| // fontOptions is internal/fonts' manifest, in its order: Carlito and |
| // Caladea first, Carlito being the default and so what the control shows |
| // over unmarked text, and what a <select> with no script shows first. |
| -func fontOptions(r *http.Request) []fontOption { |
| - compatible := rastrillo.T(r, "docs.editor.toolbar.font.compatible") |
| +func fontOptions() []fontOption { |
| out := make([]fontOption, 0, len(fonts.Families)) |
| for _, f := range fonts.Families { |
| - o := fontOption{Value: f.Key, Name: f.Name, Class: f.PreviewClass()} |
| - if f.Twin != "" { |
| - o.Desc = strings.ReplaceAll(compatible, "{name}", f.Twin) |
| - } |
| - out = append(out, o) |
| + out = append(out, fontOption{Value: f.Key, Name: f.Name, Class: f.PreviewClass()}) |
| } |
| return out |
| } |
diff --git a/internal/docs/export_test.go b/internal/docs/export_test.go| index dabbcbd..c177ff2 100644 |
| --- a/internal/docs/export_test.go |
| +++ b/internal/docs/export_test.go |
| @@ -774,8 +774,8 @@ func TestEachPickerEntryIsInItsOwnFace(t *testing.T) { |
| if opt[1] != f.PreviewClass() { |
| t.Errorf("%s wears %q, want %q", f.Name, opt[1], f.PreviewClass()) |
| } |
| - if !strings.HasPrefix(opt[2], f.Name) { |
| - t.Errorf("%s is labelled %q", f.Name, opt[2]) |
| + if opt[2] != f.Name { |
| + t.Errorf("%s is labelled %q, want its name and nothing else", f.Name, opt[2]) |
| } |
| rule := regexp.MustCompile(`\[docs-toolbar\] \[rst-combo\] \.` + f.PreviewClass() + `\{font-family:"([^"]+)"`).FindStringSubmatch(css) |
| if rule == nil || rule[1] != f.PreviewCSSName() { |
| @@ -791,10 +791,28 @@ func TestEachPickerEntryIsInItsOwnFace(t *testing.T) { |
| t.Errorf("%s: preview %s served %d %q", f.Name, face[1], rec.Code, rec.Header().Get("Content-Type")) |
| } |
| } |
| - // The twins say whose metrics they have (the copy is a catalog key; |
| - // this test's requests resolve none, so it reads the key). |
| - if !strings.Contains(body, `data-rst-name="Carlito" data-rst-desc="`) || !strings.Contains(Catalog["docs.editor.toolbar.font.compatible"], "{name}") { |
| - t.Error("Carlito does not say it is Calibri-compatible") |
| + // No entry says whose metrics it has (Paul, 2026-10-26: "We don't need |
| + // to mention the compatibility"): no description for ui/select.js to |
| + // draw, and no copy for one. The twins are still twins, for DOCX |
| + // export and paste; only the picker stops saying so. |
| + sel := regexp.MustCompile(`(?s)<select[^>]*id="docs-select-font".*?</select>`).FindString(body) |
| + if sel == "" { |
| + t.Fatal("no font control") |
| + } |
| + if strings.Contains(sel, "data-rst-desc") || strings.Contains(sel, "data-rst-name") || strings.Contains(sel, "compatible") { |
| + t.Errorf("a font entry carries a compatibility description: %s", sel) |
| + } |
| + if _, ok := Catalog["docs.editor.toolbar.font.compatible"]; ok { |
| + t.Error("the catalog still carries the compatibility copy") |
| + } |
| + twins := 0 |
| + for _, f := range fonts.Families { |
| + if f.Twin != "" { |
| + twins++ |
| + } |
| + } |
| + if twins == 0 { |
| + t.Error("the manifest lost its metric twins; DOCX export and paste still need them") |
| } |
| } |
diff --git a/internal/docs/fonts_browser_test.go b/internal/docs/fonts_browser_test.go| index 38a94ca..8e8d230 100644 |
| --- a/internal/docs/fonts_browser_test.go |
| +++ b/internal/docs/fonts_browser_test.go |
| @@ -18,6 +18,7 @@ import ( |
| "context" |
| "encoding/json" |
| "fmt" |
| + "math" |
| "net/http" |
| "net/http/httptest" |
| "os" |
| @@ -343,7 +344,9 @@ func TestFontALateFontCommitsToItsFallbackAndNeverSwaps(t *testing.T) { |
| } |
| // Each entry of the font menu is drawn in its own face, and the menu |
| -// does not open until those faces are in. |
| +// does not open until those faces are in. A row is the family's name and |
| +// nothing else (no compatibility description, Paul 2026-10-26), and every |
| +// row is the same height, twin or not. |
| func TestFontEachPickerEntryRendersInItsOwnFace(t *testing.T) { |
| fr := newFontRig(t) |
| sqid := fr.document(t, "Picker", "") |
| @@ -354,18 +357,18 @@ func TestFontEachPickerEntryRendersInItsOwnFace(t *testing.T) { |
| chromedp.WaitVisible(`#docs-select-font-listbox [rst-combo-option]`, chromedp.ByQuery), |
| ) |
| var rows []struct { |
| - Text string `json:"text"` |
| - Family string `json:"family"` |
| - Loaded bool `json:"loaded"` |
| - Desc string `json:"desc"` |
| + Text string `json:"text"` |
| + Family string `json:"family"` |
| + Loaded bool `json:"loaded"` |
| + Desc bool `json:"desc"` |
| + Height float64 `json:"height"` |
| } |
| fr.eval(t, `[...document.querySelectorAll('#docs-select-font-listbox [rst-combo-option]')].map(li => { |
| - const name = li.querySelector('[rst-combo-name]') || li; |
| - const fam = getComputedStyle(name).fontFamily; |
| + const fam = getComputedStyle(li).fontFamily; |
| const pf = window.__docsFamily(fam); const m = pf && pf.startsWith('Docs Preview') ? [pf, pf] : null; |
| - const d = li.querySelector('[rst-combo-desc]'); |
| - return { text: (li.querySelector('[rst-combo-name]') || li).textContent, family: m ? m[1] : fam, |
| - loaded: !!m && document.fonts.check('16px "' + m[1] + '"'), desc: d ? getComputedStyle(d).fontFamily : '' }; |
| + return { text: li.textContent, family: m ? m[1] : fam, |
| + loaded: !!m && document.fonts.check('16px "' + m[1] + '"'), |
| + desc: !!li.querySelector('[rst-combo-name], [rst-combo-desc]'), height: li.getBoundingClientRect().height }; |
| })`, &rows) |
| if len(rows) != len(fonts.Families) { |
| t.Fatalf("the menu has %d rows, the manifest %d families", len(rows), len(fonts.Families)) |
| @@ -378,8 +381,11 @@ func TestFontEachPickerEntryRendersInItsOwnFace(t *testing.T) { |
| if r.Family != f.PreviewCSSName() || !r.Loaded { |
| t.Errorf("%s is drawn in %q (loaded %v), want its own preview face %q", f.Name, r.Family, r.Loaded, f.PreviewCSSName()) |
| } |
| - if r.Desc != "" && strings.Contains(r.Desc, "Docs Preview") { |
| - t.Errorf("%s's description is drawn in the preview subset, which lacks its letters", f.Name) |
| + if r.Desc { |
| + t.Errorf("%s's row carries a description", f.Name) |
| + } |
| + if math.Abs(r.Height-rows[0].Height) > 0.5 { |
| + t.Errorf("%s's row is %.1fpx tall, %s's %.1fpx", f.Name, r.Height, fonts.Families[0].Name, rows[0].Height) |
| } |
| } |
| // The closed box wears the default's face too. |
diff --git a/internal/docs/render.go b/internal/docs/render.go| index 27b557b..a050afa 100644 |
| --- a/internal/docs/render.go |
| +++ b/internal/docs/render.go |
| @@ -359,7 +359,6 @@ var Catalog = rastrillo.Catalog{ |
| "docs.editor.toolbar.block.heading2": "Heading 2", |
| "docs.editor.toolbar.block.heading3": "Heading 3", |
| "docs.editor.toolbar.font": "Font", |
| - "docs.editor.toolbar.font.compatible": "{name}-compatible", |
| "docs.editor.fonts.substitute": "Some fonts are shown as substitutes. Reload to try again.", |
| "docs.editor.fonts.unavailable": "That font could not be loaded.", |
| "docs.editor.fonts.loading": "Loading a font…", |
diff --git a/internal/docs/views/show.html b/internal/docs/views/show.html| index f6d0c45..bea386a 100644 |
| --- a/internal/docs/views/show.html |
| +++ b/internal/docs/views/show.html |
| @@ -1042,6 +1042,17 @@ |
| font: inherit; |
| font-size: var(--rst-fs-sm); |
| } |
| + /* A list is at least its combobox's width and otherwise as wide as its |
| + widest row, so no row wraps: a font row is its family's name in that |
| + family's face, and Liberation Mono's is wider than the 11rem box. |
| + Every row is then one line, the same height. The phone rule below |
| + restates this for its fixed, anchored lists, and wins by order. */ |
| + [docs-toolbar] [rst-combo-list] { |
| + inset-inline-end: auto; |
| + box-sizing: border-box; |
| + min-inline-size: 100%; |
| + inline-size: max-content; |
| + } |
| /* A phone: one row that scrolls sideways, not three rows of wrapped |
| controls with separators stranded at the starts of lines (the audit's |
| "crowded at 390px"). The toolbar is its own horizontal scroller, so |
| @@ -1272,10 +1283,9 @@ |
| {{/* Each family's name, drawn in its own face: ui/select.js puts |
| data-rst-class on the row and on the closed box (rastrillo |
| v0.28.0), and the class is a name-only preview subset |
| - (internal/fonts). The name is the family's own and is not |
| - translated; the description, for a Word font's metric twin, |
| - is copy and is drawn in the chrome's face. */}} |
| - {{range .Toolbar.Fonts}}<option value="{{.Value}}" data-rst-class="{{.Class}}"{{if .Desc}} data-rst-name="{{.Name}}" data-rst-desc="{{.Desc}}"{{end}}>{{.Name}}{{if .Desc}} ({{.Desc}}){{end}}</option>{{end}} |
| + (internal/fonts). The name is the family's own, is not |
| + translated, and is the whole row: no description. */}} |
| + {{range .Toolbar.Fonts}}<option value="{{.Value}}" data-rst-class="{{.Class}}">{{.Name}}</option>{{end}} |
| </select> |
| <select docs-tool-select rst-input id="docs-select-size" tabindex="-1" disabled data-docs-select="size" aria-label="{{.Toolbar.SizeLabel}}" |
| data-rst-select data-rst-select-filter="{{.Toolbar.SelectFilter}}" data-rst-select-results="{{.Toolbar.SelectResults}}" data-rst-select-result-one="{{.Toolbar.SelectResultOne}}"> |
diff --git a/internal/fonts/fonts.go b/internal/fonts/fonts.go| index 7da8d96..bc47dac 100644 |
| --- a/internal/fonts/fonts.go |
| +++ b/internal/fonts/fonts.go |
| @@ -478,14 +478,13 @@ func stylesheet() []byte { |
| // Previews: the font control's rows and its closed box, which |
| // ui/select.js gives the option's data-rst-class. Only once they have |
| // loaded (data-docs-previews="web"); scoped to the toolbar's combobox |
| - // and heavy enough to beat its `font: inherit`. A row's description |
| - // ("Calibri-compatible") is copy, in the chrome's face: the subset |
| - // has only the name's letters. |
| + // and heavy enough to beat its `font: inherit`. A row is the family's |
| + // name and nothing else (no description since 2026-10-26), so the |
| + // subset, which has only the name's letters, draws all of it. |
| for _, f := range Families { |
| fmt.Fprintf(&b, "html[data-docs-previews=\"web\"] [docs-toolbar] [rst-combo] .%s{font-family:%q, var(--rst-font, system-ui), sans-serif}\n", |
| f.PreviewClass(), f.PreviewCSSName()) |
| } |
| - b.WriteString("[docs-toolbar] [rst-combo] [class*=\"docs-preview-\"] [rst-combo-desc]{font-family:var(--rst-font, system-ui), sans-serif}\n") |
| // The holds, set by fixtures/fonts-hold.js before the first paint and |
| // never by the server, so a page with no script is never held. The |
| // sheet, not just the text, so nothing shows an empty page with the |
diff --git a/native/apple/Sources/DocsKit/DocsFontPicker.swift b/native/apple/Sources/DocsKit/DocsFontPicker.swift| index a3b0943..afce75f 100644 |
| --- a/native/apple/Sources/DocsKit/DocsFontPicker.swift |
| +++ b/native/apple/Sources/DocsKit/DocsFontPicker.swift |
| @@ -7,8 +7,9 @@ import UIKit |
| /// The font picker: the shared list's families in its order, each name drawn |
| /// in its own face (Paul, 2026-10-24). Names are the families' own and are |
| -/// not translated; a metric twin says whose metrics it has, in the system |
| -/// face, as the web's row description does ("Calibri-compatible"). |
| +/// not translated, and a row is the name alone: a metric twin does not say |
| +/// whose metrics it has (Paul, 2026-10-26), as the web's rows do not. The |
| +/// twin is still the shared list's, for paste and DOCX. |
| /// |
| /// Every face is bundled and registered before the first window, so a row is |
| /// never drawn in a face still arriving and needs no hold. |
| @@ -20,7 +21,6 @@ enum DocsFontPicker { |
| struct Entry: Identifiable { |
| let key: String |
| let name: String |
| - let detail: String? |
| /// The family's regular face at the picker's size. |
| let font: DocsPlatformFont |
| var id: String { key } |
| @@ -33,19 +33,14 @@ enum DocsFontPicker { |
| #endif |
| @MainActor static var entries: [Entry] { |
| - let compatible = String(localized: "docs.editor.toolbar.font.compatible", bundle: DocsResources.bundle) |
| - return DocsFonts.families.map { family in |
| - Entry(key: family.key, name: family.name, detail: family.twin.map { compatible.replacingOccurrences(of: "{name}", with: $0) }, |
| - font: DocsFonts.font(family, bold: false, italic: false, size: size)) |
| + DocsFonts.families.map { family in |
| + Entry(key: family.key, name: family.name, font: DocsFonts.font(family, bold: false, italic: false, size: size)) |
| } |
| } |
| - /// One family's name in its own face, for a menu, and its description in |
| - /// the system face. |
| + /// One family's name in its own face, for a menu. |
| @MainActor static func label(_ entry: Entry) -> Text { |
| - let name = Text(entry.name).font(Font(entry.font as CTFont)) |
| - guard let detail = entry.detail else { return name } |
| - return name + Text(" " + detail).font(.caption).foregroundStyle(.secondary) |
| + Text(entry.name).font(Font(entry.font as CTFont)) |
| } |
| #if os(macOS) |
| @@ -56,13 +51,7 @@ enum DocsFontPicker { |
| for entry in entries { |
| let item = NSMenuItem(title: entry.name, action: nil, keyEquivalent: "") |
| item.representedObject = entry.key |
| - let title = NSMutableAttributedString(string: entry.name, attributes: [.font: entry.font]) |
| - if let detail = entry.detail { |
| - title.append(NSAttributedString(string: " " + detail, attributes: [ |
| - .font: NSFont.systemFont(ofSize: NSFont.smallSystemFontSize), .foregroundColor: NSColor.secondaryLabelColor, |
| - ])) |
| - } |
| - item.attributedTitle = title |
| + item.attributedTitle = NSAttributedString(string: entry.name, attributes: [.font: entry.font]) |
| item.state = entry.key == selected ? .on : .off |
| menu.addItem(item) |
| } |
| @@ -122,10 +111,7 @@ struct DocsFontPickerButton: View { |
| List(entries) { entry in |
| Button { open = false; choose(entry.key) } label: { |
| HStack { |
| - VStack(alignment: .leading, spacing: 2) { |
| - Text(entry.name).font(Font(entry.font as CTFont)) |
| - if let detail = entry.detail { Text(detail).font(.caption).foregroundStyle(.secondary) } |
| - } |
| + Text(entry.name).font(Font(entry.font as CTFont)) |
| Spacer() |
| if entry.key == selected { Image(systemName: "checkmark").foregroundStyle(Color.accentColor) } |
| }.contentShape(Rectangle()) |
diff --git a/native/apple/Sources/DocsKit/Resources/ar.lproj/Localizable.strings b/native/apple/Sources/DocsKit/Resources/ar.lproj/Localizable.strings| index 9c17165..f4b378b 100644 |
| --- a/native/apple/Sources/DocsKit/Resources/ar.lproj/Localizable.strings |
| +++ b/native/apple/Sources/DocsKit/Resources/ar.lproj/Localizable.strings |
| @@ -47,7 +47,6 @@ |
| "docs.editor.toolbar.bulletlist" = "قائمة نقطية"; |
| "docs.editor.toolbar.code" = "شيفرة"; |
| "docs.editor.toolbar.font" = "الخط"; |
| -"docs.editor.toolbar.font.compatible" = "متوافق مع {name}"; |
| "docs.editor.toolbar.italic" = "مائل"; |
| "docs.editor.toolbar.label" = "التنسيق"; |
| "docs.editor.toolbar.orderedlist" = "قائمة مرقّمة"; |
diff --git a/native/apple/Sources/DocsKit/Resources/bn.lproj/Localizable.strings b/native/apple/Sources/DocsKit/Resources/bn.lproj/Localizable.strings| index 08d5108..2ccd04a 100644 |
| --- a/native/apple/Sources/DocsKit/Resources/bn.lproj/Localizable.strings |
| +++ b/native/apple/Sources/DocsKit/Resources/bn.lproj/Localizable.strings |
| @@ -47,7 +47,6 @@ |
| "docs.editor.toolbar.bulletlist" = "বুলেটযুক্ত তালিকা"; |
| "docs.editor.toolbar.code" = "কোড"; |
| "docs.editor.toolbar.font" = "ফন্ট"; |
| -"docs.editor.toolbar.font.compatible" = "{name}-সামঞ্জস্যপূর্ণ"; |
| "docs.editor.toolbar.italic" = "তির্যক"; |
| "docs.editor.toolbar.label" = "বিন্যাস"; |
| "docs.editor.toolbar.orderedlist" = "সংখ্যাযুক্ত তালিকা"; |
diff --git a/native/apple/Sources/DocsKit/Resources/en.lproj/Localizable.strings b/native/apple/Sources/DocsKit/Resources/en.lproj/Localizable.strings| index 3504be3..78ee9ad 100644 |
| --- a/native/apple/Sources/DocsKit/Resources/en.lproj/Localizable.strings |
| +++ b/native/apple/Sources/DocsKit/Resources/en.lproj/Localizable.strings |
| @@ -47,7 +47,6 @@ |
| "docs.editor.toolbar.bulletlist" = "Bulleted list"; |
| "docs.editor.toolbar.code" = "Code"; |
| "docs.editor.toolbar.font" = "Font"; |
| -"docs.editor.toolbar.font.compatible" = "{name}-compatible"; |
| "docs.editor.toolbar.italic" = "Italic"; |
| "docs.editor.toolbar.label" = "Formatting"; |
| "docs.editor.toolbar.orderedlist" = "Numbered list"; |
diff --git a/native/apple/Sources/DocsKit/Resources/es.lproj/Localizable.strings b/native/apple/Sources/DocsKit/Resources/es.lproj/Localizable.strings| index 0f6ea8a..171dad3 100644 |
| --- a/native/apple/Sources/DocsKit/Resources/es.lproj/Localizable.strings |
| +++ b/native/apple/Sources/DocsKit/Resources/es.lproj/Localizable.strings |
| @@ -47,7 +47,6 @@ |
| "docs.editor.toolbar.bulletlist" = "Lista con viñetas"; |
| "docs.editor.toolbar.code" = "Código"; |
| "docs.editor.toolbar.font" = "Fuente"; |
| -"docs.editor.toolbar.font.compatible" = "compatible con {name}"; |
| "docs.editor.toolbar.italic" = "Cursiva"; |
| "docs.editor.toolbar.label" = "Formato"; |
| "docs.editor.toolbar.orderedlist" = "Lista numerada"; |
diff --git a/native/apple/Sources/DocsKit/Resources/ga.lproj/Localizable.strings b/native/apple/Sources/DocsKit/Resources/ga.lproj/Localizable.strings| index 9c10c9e..d8ef151 100644 |
| --- a/native/apple/Sources/DocsKit/Resources/ga.lproj/Localizable.strings |
| +++ b/native/apple/Sources/DocsKit/Resources/ga.lproj/Localizable.strings |
| @@ -47,7 +47,6 @@ |
| "docs.editor.toolbar.bulletlist" = "Liosta le hurchair"; |
| "docs.editor.toolbar.code" = "Cód"; |
| "docs.editor.toolbar.font" = "Cló"; |
| -"docs.editor.toolbar.font.compatible" = "comhoiriúnach le {name}"; |
| "docs.editor.toolbar.italic" = "Iodálach"; |
| "docs.editor.toolbar.label" = "Formáidiú"; |
| "docs.editor.toolbar.orderedlist" = "Liosta uimhrithe"; |
diff --git a/native/apple/Sources/DocsKit/Resources/hi.lproj/Localizable.strings b/native/apple/Sources/DocsKit/Resources/hi.lproj/Localizable.strings| index d86372b..3e5148e 100644 |
| --- a/native/apple/Sources/DocsKit/Resources/hi.lproj/Localizable.strings |
| +++ b/native/apple/Sources/DocsKit/Resources/hi.lproj/Localizable.strings |
| @@ -47,7 +47,6 @@ |
| "docs.editor.toolbar.bulletlist" = "बुलेट वाली सूची"; |
| "docs.editor.toolbar.code" = "कोड"; |
| "docs.editor.toolbar.font" = "फ़ॉन्ट"; |
| -"docs.editor.toolbar.font.compatible" = "{name}-संगत"; |
| "docs.editor.toolbar.italic" = "इटैलिक"; |
| "docs.editor.toolbar.label" = "फ़ॉर्मैटिंग"; |
| "docs.editor.toolbar.orderedlist" = "क्रमांकित सूची"; |
diff --git a/native/apple/Sources/DocsKit/Resources/ja.lproj/Localizable.strings b/native/apple/Sources/DocsKit/Resources/ja.lproj/Localizable.strings| index 2b4c8fd..f6fed61 100644 |
| --- a/native/apple/Sources/DocsKit/Resources/ja.lproj/Localizable.strings |
| +++ b/native/apple/Sources/DocsKit/Resources/ja.lproj/Localizable.strings |
| @@ -47,7 +47,6 @@ |
| "docs.editor.toolbar.bulletlist" = "箇条書き"; |
| "docs.editor.toolbar.code" = "コード"; |
| "docs.editor.toolbar.font" = "フォント"; |
| -"docs.editor.toolbar.font.compatible" = "{name} 互換"; |
| "docs.editor.toolbar.italic" = "斜体"; |
| "docs.editor.toolbar.label" = "書式設定"; |
| "docs.editor.toolbar.orderedlist" = "番号付きリスト"; |
diff --git a/native/apple/Sources/DocsKit/Resources/pt.lproj/Localizable.strings b/native/apple/Sources/DocsKit/Resources/pt.lproj/Localizable.strings| index 3cbcc6a..9634751 100644 |
| --- a/native/apple/Sources/DocsKit/Resources/pt.lproj/Localizable.strings |
| +++ b/native/apple/Sources/DocsKit/Resources/pt.lproj/Localizable.strings |
| @@ -47,7 +47,6 @@ |
| "docs.editor.toolbar.bulletlist" = "Lista com marcas"; |
| "docs.editor.toolbar.code" = "Código"; |
| "docs.editor.toolbar.font" = "Tipo de letra"; |
| -"docs.editor.toolbar.font.compatible" = "compatível com {name}"; |
| "docs.editor.toolbar.italic" = "Itálico"; |
| "docs.editor.toolbar.label" = "Formatação"; |
| "docs.editor.toolbar.orderedlist" = "Lista numerada"; |
diff --git a/native/apple/Sources/DocsKit/Resources/ru.lproj/Localizable.strings b/native/apple/Sources/DocsKit/Resources/ru.lproj/Localizable.strings| index 937afc6..8c14365 100644 |
| --- a/native/apple/Sources/DocsKit/Resources/ru.lproj/Localizable.strings |
| +++ b/native/apple/Sources/DocsKit/Resources/ru.lproj/Localizable.strings |
| @@ -47,7 +47,6 @@ |
| "docs.editor.toolbar.bulletlist" = "Маркированный список"; |
| "docs.editor.toolbar.code" = "Код"; |
| "docs.editor.toolbar.font" = "Шрифт"; |
| -"docs.editor.toolbar.font.compatible" = "совместим с {name}"; |
| "docs.editor.toolbar.italic" = "Курсив"; |
| "docs.editor.toolbar.label" = "Форматирование"; |
| "docs.editor.toolbar.orderedlist" = "Нумерованный список"; |
diff --git a/native/apple/Sources/DocsKit/Resources/vi.lproj/Localizable.strings b/native/apple/Sources/DocsKit/Resources/vi.lproj/Localizable.strings| index fd4f78a..7ed9c9d 100644 |
| --- a/native/apple/Sources/DocsKit/Resources/vi.lproj/Localizable.strings |
| +++ b/native/apple/Sources/DocsKit/Resources/vi.lproj/Localizable.strings |
| @@ -47,7 +47,6 @@ |
| "docs.editor.toolbar.bulletlist" = "Danh sách dấu đầu dòng"; |
| "docs.editor.toolbar.code" = "Mã"; |
| "docs.editor.toolbar.font" = "Phông chữ"; |
| -"docs.editor.toolbar.font.compatible" = "tương thích với {name}"; |
| "docs.editor.toolbar.italic" = "Nghiêng"; |
| "docs.editor.toolbar.label" = "Định dạng"; |
| "docs.editor.toolbar.orderedlist" = "Danh sách đánh số"; |
diff --git a/native/apple/Sources/DocsKit/Resources/yue.lproj/Localizable.strings b/native/apple/Sources/DocsKit/Resources/yue.lproj/Localizable.strings| index 793d3a2..73ed418 100644 |
| --- a/native/apple/Sources/DocsKit/Resources/yue.lproj/Localizable.strings |
| +++ b/native/apple/Sources/DocsKit/Resources/yue.lproj/Localizable.strings |
| @@ -47,7 +47,6 @@ |
| "docs.editor.toolbar.bulletlist" = "項目符號清單"; |
| "docs.editor.toolbar.code" = "程式碼"; |
| "docs.editor.toolbar.font" = "字體"; |
| -"docs.editor.toolbar.font.compatible" = "同 {name} 兼容"; |
| "docs.editor.toolbar.italic" = "斜體"; |
| "docs.editor.toolbar.label" = "格式設定"; |
| "docs.editor.toolbar.orderedlist" = "編號清單"; |
diff --git a/native/apple/Sources/DocsKit/Resources/zh-Hans.lproj/Localizable.strings b/native/apple/Sources/DocsKit/Resources/zh-Hans.lproj/Localizable.strings| index 6603606..4794ec6 100644 |
| --- a/native/apple/Sources/DocsKit/Resources/zh-Hans.lproj/Localizable.strings |
| +++ b/native/apple/Sources/DocsKit/Resources/zh-Hans.lproj/Localizable.strings |
| @@ -47,7 +47,6 @@ |
| "docs.editor.toolbar.bulletlist" = "项目符号列表"; |
| "docs.editor.toolbar.code" = "代码"; |
| "docs.editor.toolbar.font" = "字体"; |
| -"docs.editor.toolbar.font.compatible" = "与 {name} 兼容"; |
| "docs.editor.toolbar.italic" = "斜体"; |
| "docs.editor.toolbar.label" = "格式设置"; |
| "docs.editor.toolbar.orderedlist" = "编号列表"; |
diff --git a/native/apple/Tests/DocsKitTests/DocsFontPickerTests.swift b/native/apple/Tests/DocsKitTests/DocsFontPickerTests.swift| index 63ab1f4..b808e79 100644 |
| --- a/native/apple/Tests/DocsKitTests/DocsFontPickerTests.swift |
| +++ b/native/apple/Tests/DocsKitTests/DocsFontPickerTests.swift |
| @@ -11,7 +11,8 @@ import AppKit |
| /// internal/fonts/fonts.json (DocsFontsTests reads it the same way). |
| final class DocsFontPickerTests: XCTestCase { |
| /// The picker lists the shared list's families, in its order and by its |
| - /// names, each drawn in its own face; twins say whose metrics they have. |
| + /// names, each drawn in its own face. A row is the name alone: a metric |
| + /// twin does not say so (Paul, 2026-10-26), though it is still one. |
| @MainActor func testPickerEntriesAreDrawnInTheirOwnFace() throws { |
| let shared = try DocsFontsTests.shared() |
| let entries = DocsFontPicker.entries |
| @@ -20,8 +21,6 @@ final class DocsFontPickerTests: XCTestCase { |
| XCTAssertEqual(entries.first?.key, "carlito") |
| for (entry, family) in zip(entries, shared.families) { |
| XCTAssertEqual(DocsFontsTests.url(of: entry.font), try DocsFontsTests.bundled(family, "regular"), "\(family.name) is drawn in \(family.name)") |
| - XCTAssertEqual(entry.detail != nil, family.twin != nil, family.key) |
| - if let twin = family.twin { XCTAssertTrue(entry.detail?.contains(twin) == true, "\(family.name) says it has \(twin)'s metrics") } |
| } |
| #if os(macOS) |
| // The toolbar's pop-up button: each item's title in its own face, the |
| @@ -30,7 +29,7 @@ final class DocsFontPickerTests: XCTestCase { |
| XCTAssertEqual(menu.items.count, shared.families.count) |
| for (item, family) in zip(menu.items, shared.families) { |
| let title = try XCTUnwrap(item.attributedTitle, family.name) |
| - XCTAssertTrue(title.string.hasPrefix(family.name), title.string) |
| + XCTAssertEqual(title.string, family.name, "\(family.name)'s row is its name and nothing else") |
| var face = NSRange() |
| let font = try XCTUnwrap(title.attribute(.font, at: 0, effectiveRange: &face) as? NSFont, family.name) |
| XCTAssertEqual(DocsFontsTests.url(of: font), try DocsFontsTests.bundled(family, "regular"), family.name) |