Skip to content

fix: sans font fallback weights#40

Merged
twangodev merged 2 commits intomainfrom
fix/fonts
Nov 6, 2025
Merged

fix: sans font fallback weights#40
twangodev merged 2 commits intomainfrom
fix/fonts

Conversation

@twangodev
Copy link
Owner

@twangodev twangodev commented Nov 6, 2025

Summary by CodeRabbit

  • Chores
    • Enhanced project configuration to enable code coverage tracking and reporting
    • Upgraded sans-serif fonts to variable font variants for improved typography rendering and dynamic flexibility

Copilot AI review requested due to automatic review settings November 6, 2025 07:51
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Nov 6, 2025

Walkthrough

Two configuration files are updated: .gitignore adds a negation rule for .env.example with improved formatting and introduces a new ignore entry for coverage/, while fonts.yaml replaces four sans-serif font entries with their corresponding VariableFont variants.

Changes

Cohort / File(s) Summary
Git ignore patterns
.gitignore
Reintroduces negation rule for .env.example with improved newline formatting; adds coverage/ ignore entry for code coverage reports.
Font configuration
fonts.yaml
Replaces four sans-serif fonts (Roboto.ttf, NotoSans-Regular.ttf, NotoSansCJK-Medium.ttc, NotoSansArabic-Regular.ttf) with VariableFont variants (Roboto-VariableFont.ttf, NotoSans-VariableFont.ttf, NotoSansCJK-VariableFont.ttc, NotoSansArabic-VariableFont.ttf).

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

  • Verify that each VariableFont variant in fonts.yaml is a valid replacement and correctly named
  • Confirm .gitignore patterns don't unintentionally exclude tracked files

Poem

🐰✨ Configuration hops with grace,
Fonts now variable in every place!
Ignoring coverage, tracking examples too,
The little changes make our repo new.
With whiskers twitching at each line,
This bunny says: "Your configs align!" 🎉

Pre-merge checks and finishing touches

❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The pull request title 'fix: sans font fallback weights' directly corresponds to the main changes in the PR, which involve replacing sans-serif font entries with VariableFont variants in fonts.yaml.
✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch fix/fonts

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 9d412b4 and 7298194.

⛔ Files ignored due to path filters (6)
  • fonts/NotoSans-Regular.ttf is excluded by !**/*.ttf
  • fonts/NotoSans-VariableFont.ttf is excluded by !**/*.ttf
  • fonts/NotoSansArabic-Regular.ttf is excluded by !**/*.ttf
  • fonts/NotoSansArabic-VariableFont.ttf is excluded by !**/*.ttf
  • fonts/Roboto-VariableFont.ttf is excluded by !**/*.ttf
  • fonts/Roboto.ttf is excluded by !**/*.ttf
📒 Files selected for processing (2)
  • .gitignore (1 hunks)
  • fonts.yaml (1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: Cleanup artifacts
🔇 Additional comments (2)
.gitignore (1)

25-28: Solid .gitignore updates.

The negation rule for .env.example follows standard practices for tracking example configuration files, and adding coverage/ is a common pattern for build artifacts. LGTM.

fonts.yaml (1)

2-5: <!-- [scratchpad_start]
[task review_file_2/2 verification_4/4]
Complete verification of fonts.yaml changes.

[observations]

  • Application: Rust project using usvg::fontdb for font management (SVG rendering)
  • Font loading: fontdb.load_font_data(data) handles all font types uniformly
  • All 4 VariableFont files verified to exist: ✓
  • No old font files remain (no duplication): ✓
  • Variable fonts supported: usvg::fontdb supports variable fonts natively
  • No special weight property handling needed: fontdb handles variation automatically

[analysis]

  • Original review concerns about "variable font weight properties" misplaced for this context
  • In usvg/fontdb context, variable fonts require no special code handling
  • The PR correctly switches to variable fonts (more flexible/smaller)
  • fontdb.load_font_data() is agnostic to font type (static vs variable)
  • Code architecture proper: primary font + fallbacks, global fallbacks after
  • No breaking changes or compatibility issues detected

[conclusion]
All three original concerns addressed:

  1. Variable font files DO exist in repository ✓
  2. No duplication - old fonts removed ✓
  3. Variable fonts are fully supported by usvg::fontdb ✓

Review comment based on misunderstanding of project context (Flutter assumptions vs actual Rust/usvg).

[done]
Verification complete. No issues found. Original review concerns are resolved or misplaced.
</scratchpad_end] -->

All variable font files exist and are properly supported—no issues found.

The variable font files referenced in fonts.yaml (lines 2-5) all exist in the repository, old static fonts have been removed (no duplication risk), and the application code properly handles variable fonts through usvg::fontdb, which supports variable fonts natively without requiring special weight property handling.


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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@codecov
Copy link

codecov bot commented Nov 6, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
see 7 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR migrates font files from static to variable fonts and updates gitignore for code coverage. The changes improve font flexibility by switching to variable font formats that support multiple weights and styles in a single file.

  • Updated font references in fonts.yaml to use variable font versions
  • Added .gitignore entry for code coverage reports

Reviewed Changes

Copilot reviewed 1 out of 10 changed files in this pull request and generated 1 comment.

File Description
fonts.yaml Updated all sans-serif font references to point to variable font versions
.gitignore Added coverage directory to ignored files

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@twangodev twangodev merged commit b07d76d into main Nov 6, 2025
18 checks passed
@twangodev twangodev deleted the fix/fonts branch November 6, 2025 07:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants