)]}'
{
  "commit": "6abc0e0a00690410e0068e1eb46c7f1198b962d4",
  "tree": "20c209f19ed163d0ab1b81509187c8e0a892fd48",
  "parents": [
    "0af57367d3a05ed45ca95080c1f8c91d4941bd08"
  ],
  "author": {
    "name": "Frank",
    "email": "8014077+Frank3K@users.noreply.github.com",
    "time": "Tue Jan 20 20:15:24 2026 +0100"
  },
  "committer": {
    "name": "GitHub",
    "email": "noreply@github.com",
    "time": "Tue Jan 20 19:15:24 2026 +0000"
  },
  "message": "[google_fonts] Add WOFF and WOFF2 font format support for web (#10703)\n\n# Description\r\n\r\nWeb applications benefit significantly from using WOFF2 font files instead of TTF/OTF. WOFF2 is a compressed format\r\n   specifically designed for web delivery, resulting in smaller file sizes and faster load times. This is especially\r\n   important for Flutter web apps where every byte counts for initial page load performance.\r\n\r\n   **Size comparison (Roboto Regular):**\r\n   - TTF: 146,004 bytes\r\n   - WOFF2: 63,424 bytes (~56% smaller)\r\n\r\n   Currently, `google_fonts` only supports TTF and OTF formats, even on web platforms where WOFF2 would be more efficient.\r\n   This PR adds support for WOFF2 and WOFF formats on web, allowing developers to bundle more efficient font files for their\r\n   web applications.\r\n\r\n   ## What\r\n\r\n   This PR adds support for `.woff2` and `.woff` font file extensions when running on web platforms, while maintaining\r\n   backward compatibility with `.ttf` and `.otf` files.\r\n\r\n   **Changes:**\r\n   - Add `kIsWeb` check to support web-optimized font formats (`.woff2`, `.woff`) in addition to `.ttf` and `.otf`\r\n   - Make `findFamilyWithVariantAssetPath` testable by adding an optional `isWeb` parameter (defaults to `kIsWeb`)\r\n   - Add `@visibleForTesting` annotation to enable comprehensive testing without exposing internal API\r\n   - Add 20 tests covering web-specific, non-web-specific, and common behavior\r\n\r\n   **Platform behavior:**\r\n   - **Web:** Supports `.woff2`, `.woff`, `.ttf`, `.otf`\r\n   - **Non-web:** Supports `.ttf`, `.otf` (unchanged)\r\n\r\n   ## Implementation Notes\r\n\r\n   The implementation maintains the existing behavior where **the order of assets in the manifest determines which file type\r\n   is chosen** when multiple formats are available for the same font. While this feels a bit odd (ideally, there would be a\r\n   preference order), this is how the function already works for TTF/OTF. In practice, this is not an issue when only one\r\n   file type per font is bundled, which is the common case.\r\n\r\n   ## Getting WOFF2 Files\r\n\r\n   Developers can convert TTF/OTF fonts to WOFF2 using Google\u0027s `woff2_compress` tool:\r\n   https://github.com/google/woff2\r\n\r\n   Example:\r\n   ```bash\r\n   woff2_compress Roboto-Regular.ttf\r\n   ```\r\n\r\n   ## Testing\r\n\r\n   All existing tests pass, plus 20 new tests that verify:\r\n   - ✅ WOFF2 and WOFF formats work on web\r\n   - ✅ WOFF2 and WOFF formats are ignored on non-web platforms\r\n   - ✅ TTF and OTF continue to work on all platforms\r\n   - ✅ Common behavior (null handling, family/variant matching) works consistently\r\n\r\n   ## Breaking Changes\r\n\r\n   None. This is a backward-compatible addition that only expands the supported file formats on web platforms.\r\n   EOF\r\n\r\n## Pre-Review Checklist\r\n\r\n**Note**: The Flutter team is currently trialing the use of [Gemini Code Assist for GitHub](https://developers.google.com/gemini-code-assist/docs/review-github-code). Comments from the `gemini-code-assist` bot should not be taken as authoritative feedback from the Flutter team. If you find its comments useful you can update your code accordingly, but if you are unsure or disagree with the feedback, please feel free to wait for a Flutter team member\u0027s review for guidance on which automated comments should be addressed.\r\n\r\n[^1]: Regular contributors who have demonstrated familiarity with the repository guidelines only need to comment if the PR is not auto-exempted by repo tooling.",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "c6ee16e8898ab50b3607a1596a636be8f8960619",
      "old_mode": 33188,
      "old_path": "packages/google_fonts/CHANGELOG.md",
      "new_id": "49f8b565b10ebf07f47ec47df2259267025fd676",
      "new_mode": 33188,
      "new_path": "packages/google_fonts/CHANGELOG.md"
    },
    {
      "type": "modify",
      "old_id": "6486f8f51972010a90544ea2b9bcb228f032226f",
      "old_mode": 33261,
      "old_path": "packages/google_fonts/lib/src/google_fonts_base.dart",
      "new_id": "7c73bfde8d8826046176543e5deb17f3ae67868f",
      "new_mode": 33261,
      "new_path": "packages/google_fonts/lib/src/google_fonts_base.dart"
    },
    {
      "type": "modify",
      "old_id": "1e445e3712a54c90d5c9c513febff874fd717173",
      "old_mode": 33188,
      "old_path": "packages/google_fonts/pubspec.yaml",
      "new_id": "a91a63058d9fc3ac29e7e852fd57fe950ecc9d1c",
      "new_mode": 33188,
      "new_path": "packages/google_fonts/pubspec.yaml"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "45bcd21b2abebaefaff61f0e7ac80c84994d2868",
      "new_mode": 33188,
      "new_path": "packages/google_fonts/test/find_family_with_variant_asset_path_web_test.dart"
    }
  ]
}
