Hacktoberfest 2026: die Issues, die Maintainer für den Oktober markiert haben – offen und einsteigerfreundlich. Hacktoberfest-Issues durchsuchen

html: add a generic fallback family to font-family

Offen
#1,186 0 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Maintainer antworten meist innerhalb von 1 Tag

Dieses Issue hat noch niemand übernommen.

Bewertung

Schwierigkeit
3/5
Geschätzter Aufwand
1-2 Tage
Anfängerfreundlichkeit
74/100
Issue-Typ
Feature
Klarheit
Klar beschrieben
Aktivitätsstatus
Aktiv
Tech-Stack
cpp
Bereich
frontend

Rechercherichtung

Start in src/odr/internal/html/document_document_style.cpp-adjacent code: src/odr/internal/html/document_style.cpp, functions translate_text_style and translate_block_font_style, where font-family:<name>; is emitted. Trace where font data comes from to find ODF style:font-family-generic and docx w:family (inside w:font), then add quoted-name-plus-generic output with a small well-known-fonts table defaulting to sans-serif. Done means every emitted font-family has a quoted name and generic fallback, checked against the reference-output comparison that flagged xlsx Calibri cells.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Beschreibung

enhancement formatting

The HTML output writes font-family:<name>; with the font name of the document only (translate_text_style and translate_block_font_style in src/odr/internal/html/document_style.cpp). The value has no generic fallback family.

If the font is not installed, the browser uses its default font, which is usually a serif font. A spreadsheet in Calibri then renders in Times. Excel and LibreOffice replace a missing font with a font of the same kind.

Proposal:

  1. Add a generic family after the name, for example font-family:"Calibri",sans-serif.
  2. Pick serif, sans-serif or monospace from the font data if the document gives it (style:font-family-generic in ODF, w:family in w:font for docx). Else use a small table of well-known names, and use sans-serif as the default.
  3. Quote the name, so a name with special characters stays one family.

The v7.4.0 → v7.5.0 reference-output check found this on xlsx cells that now get their Calibri font from the row or column style. This is not a regression, because cells with their own Calibri style had the same problem before.

🤖 Generated with Claude Code

Vorherrschende Sprache
C++
Sterne
41
Forks
10
Ø Merge
12 Std. 4 Min.
Gemergte PRs (30 T.)
297

Entwicklungsumgebung

Dieses Projekt bietet weder Dev-Container noch Dockerfile noch Beitragsleitfaden – die Einrichtung liegt bei Ihnen. Beginnen Sie mit der README; die allgemeinen Schritte stehen in unserem Leitfaden für den ersten Beitrag.

Erste Schritte

  1. Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
  3. Forken Sie das Repository und arbeiten Sie in einem Branch.
  4. Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.

Mehr aus opendocument-app/OpenDocument.core

Alle Issues in opendocument-app/OpenDocument.core

Ähnliche Issues

Weitere Issues zu C++

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.