Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

html: add a generic fallback family to font-family

オープン
#1,186 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
3/5
見積もり時間
1〜2日
初心者へのやさしさ
74/100
issue の種類
機能追加
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
cpp
領域
frontend

調査の方向性

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.

索引モデルが issue の本文から書いたものです。

説明

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

主要言語
C++
スター
41
フォーク
10
平均マージ
12時間 4分
マージ済み PR(30日)
297

環境構築

このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

opendocument-app/OpenDocument.core のほかの issue

opendocument-app/OpenDocument.core の issue をすべて見る

似ている issue

C++ の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。