feat: 透かし & アプリ既定フォントを Noto Sans JP に統一 - #80
Merged
Conversation
デフォルトの「ゴシック」(sans) の実体を OS のシステムフォント任せから Google Fonts の Noto Sans JP に切り替え、デバイスによらず同一字形で 焼き込まれるようにする。 - index.html: Noto Sans JP (wght 400;700) を Google Fonts で読み込み - WATERMARK_FONT_STACKS.sans を Noto Sans JP 先頭に変更 - ensureWatermarkFont() を追加し、焼き込み/プレビュー前に document.fonts.load で Web フォントのロードを待機。未ロードのまま システムフォントへ暗黙フォールバックして不可逆に焼き込まれる事故を防止 Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01J9Q5inTn4HLVjmmdHXxDt8
📝 WalkthroughWalkthroughGoogle Fonts の読み込み URL に Changes透かしフォント読み込み保証
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
DESIGN.md §3 が定義する Inter(ラテン) + Noto Sans JP(日本語) を実際に 読み込んで適用する (従来はシステムフォント任せで未配線だった)。 - index.css: @theme に --font-sans を定義。Tailwind v4 では --default-font-family 経由で body 既定フォントにも反映される - index.html: Google Fonts に Inter / Noto Sans JP の 400;500;600;700 を追加。 Noto Sans JP は css2 の unicode-range サブセットで分割配信され、 表示中グリフ分のみ遅延ロードされるため初期ロードを抑えられる (display=swap + 既存の preconnect で FOIT も回避) Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01J9Q5inTn4HLVjmmdHXxDt8
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
透かしとアプリ本体のフォントを、OS のシステムフォント任せから Google Fonts で読み込む Noto Sans JP(アプリ本体はラテンに Inter も併用)に統一します。デバイスによらず同じ字形で表示・焼き込まれます。
変更内容
1. 透かしのデフォルトフォント (
feat(sender))sansスタックは"Hiragino Sans", "Yu Gothic", "Noto Sans JP", ...で、Noto Sans JP はフォールバック末尾かつ未読込 → 実際は OS フォント描画でデバイス依存だったWATERMARK_FONT_STACKS.sansを Noto Sans JP 先頭に変更(デフォルト選択sans/UI「ゴシック」はそのまま)ensureWatermarkFont()を追加し、焼き込み (applyWatermark) / プレビュー (WatermarkDialog) 描画前にdocument.fonts.loadで Web フォントを待機。未ロードのままシステムフォントへ暗黙フォールバックして不可逆に焼き込まれる事故を防止(既存「ポップ」も信頼性向上)2. アプリ既定フォント (
feat(ui))index.css:@themeに--font-sansを定義 → Tailwind v4 では--default-font-family経由で body 既定にも反映(生成 CSS で配線確認済み)読み込み最適化(チャンク分け)
unicode-rangeサブセットに自動分割され、表示中グリフのチャンクのみ遅延ロードされる(巨大な CJK フォント全体を落とさない)display=swap+ 既存のpreconnect(googleapis / gstatic)で FOIT / 接続レイテンシを回避Test plan
🤖 Generated with Claude Code
https://claude.ai/code/session_01J9Q5inTn4HLVjmmdHXxDt8