Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 27 additions & 0 deletions packages/google_fonts/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,30 @@
## 8.0.0
Copy link
Contributor

@Piinks Piinks Jan 14, 2026

Choose a reason for hiding this comment

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

It feels unfortunate to introduce another breaking release so soon after 7.0.0. Is there any opportunity to not remove the two fonts and keep them around, maybe in a deprecated state for a while?

Copy link
Member Author

Choose a reason for hiding this comment

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

I would lean towards not since it's not worth the additional tech debt. At the same time, we've been adhering to the convention that any font removal results in a major version bump. Also, I've gotten confirmation from the fonts team that they'll generate this quarterly, so we could consider this one exceptionally 2 months early (should land the woff2 update first) how does that sound?


- Added fonts:
- `Amarna`
- `BBH Bartle`
- `BBH Bogle`
- `BBH Hegarty`
- `Cause`
- `Elms Sans`
- `Geom`
- `Google Sans`
- `Google Sans Flex`
- `Kedebideri`
- `Lilex`
- `Momo Signature`
- `Momo Trust Display`
- `Momo Trust Sans`
- `Noto Sans Syriac Western`
- `Science Gothic`
- `Sekuya`
- `Stack Sans Headline`
- `Stack Sans Notch`
- `Stack Sans Text`
- Removed fonts:
- `Chiron GoRound TC`
- `Chiron Sung HK`

## 7.0.2

- Adds missing public API documentation
Expand Down
22 changes: 20 additions & 2 deletions packages/google_fonts/generator/families_supported
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ Alumni Sans Pinstripe
Alumni Sans SC
Amarante
Amaranth
Amarna
Amatic SC
Amethysta
Amiko
Expand Down Expand Up @@ -138,6 +139,9 @@ Averia Serif Libre
Azeret Mono
B612
B612 Mono
BBH Bartle
BBH Bogle
BBH Hegarty
BIZ UDGothic
BIZ UDMincho
BIZ UDPGothic
Expand Down Expand Up @@ -291,6 +295,7 @@ Castoro
Castoro Titling
Catamaran
Caudex
Cause
Caveat
Caveat Brush
Cedarville Cursive
Expand All @@ -314,9 +319,7 @@ Cherry Swash
Chewy
Chicle
Chilanka
Chiron GoRound TC
Chiron Hei HK
Chiron Sung HK
Chivo
Chivo Mono
Chocolate Classical Sans
Expand Down Expand Up @@ -438,6 +441,7 @@ Edu VIC WA NT Hand
Edu VIC WA NT Hand Pre
El Messiri
Electrolize
Elms Sans
Elsie
Elsie Swash Caps
Emblema One
Expand Down Expand Up @@ -540,6 +544,7 @@ Gentium Book Plus
Gentium Plus
Geo
Geologica
Geom
Georama
Geostar
Geostar Fill
Expand All @@ -560,7 +565,9 @@ Goblin One
Gochi Hand
Goldman
Golos Text
Google Sans
Google Sans Code
Google Sans Flex
Gorditas
Gothic A1
Gotu
Expand Down Expand Up @@ -737,6 +744,7 @@ Kavoon
Kay Pho Du
Kdam Thmor Pro
Keania One
Kedebideri
Kelly Slab
Kenia
Khand
Expand Down Expand Up @@ -819,6 +827,7 @@ Libre Caslon Text
Libre Franklin
Licorice
Life Savers
Lilex
Lilita One
Lily Script One
Limelight
Expand Down Expand Up @@ -931,6 +940,9 @@ Mohave
Moirai One
Molengo
Molle
Momo Signature
Momo Trust Display
Momo Trust Sans
Mona Sans
Monda
Monofett
Expand Down Expand Up @@ -1144,6 +1156,7 @@ Noto Sans Symbols
Noto Sans Symbols 2
Noto Sans Syriac
Noto Sans Syriac Eastern
Noto Sans Syriac Western
Noto Sans TC
Noto Sans Tagalog
Noto Sans Tagbanwa
Expand Down Expand Up @@ -1585,13 +1598,15 @@ Scada
Scheherazade New
Schibsted Grotesk
Schoolbell
Science Gothic
Scope One
Seaweed Script
Secular One
Sedan
Sedan SC
Sedgwick Ave
Sedgwick Ave Display
Sekuya
Sen
Send Flowers
Sevillana
Expand Down Expand Up @@ -1677,6 +1692,9 @@ Sree Krushnadevaraya
Sriracha
Srisakdi
Staatliches
Stack Sans Headline
Stack Sans Notch
Stack Sans Text
Stalemate
Stalinist One
Stardos Stencil
Expand Down
56 changes: 46 additions & 10 deletions packages/google_fonts/generator/generator.dart
Original file line number Diff line number Diff line change
Expand Up @@ -167,21 +167,23 @@ class _FamiliesDelta {
// (e.g. CHANGELOG, PR description).
String markdownDiff() {
final Iterable<String> addedPrintable = added.map(
(String family) => ' - Added `$family`',
(String family) => ' - `$family`',
);
final Iterable<String> removedPrintable = removed.map(
(String family) => ' - Removed `$family`',
(String family) => ' - `$family`',
);

var diff = '';
if (removedPrintable.isNotEmpty) {
diff += removedPrintable.join('\n');
diff += '\n';
}
if (addedPrintable.isNotEmpty) {
diff += '- Added fonts:\n';
diff += addedPrintable.join('\n');
diff += '\n';
}
if (removedPrintable.isNotEmpty) {
diff += '- Removed fonts:\n';
diff += removedPrintable.join('\n');
diff += '\n';
}

return diff;
}
Expand Down Expand Up @@ -332,17 +334,50 @@ void _writeDartFile(String path, String content) {

/// Remove variable-font entries when a static entry of the same
/// weight/italic exists. Keep variable only if no static equivalent.
/// Also deduplicate static variants by keeping only default width (100.0).
///
// TODO(guidezpl): Add explicit variable-font support, see
// https://github.com/flutter/flutter/issues/174575 and
// https://github.com/flutter/flutter/issues/174567
// TODO(guidezpl): Add font width/stretch support to google_fonts API to properly
// handle width variants (condensed, normal, extended) instead of deduplicating them.
List<Font> _deduplicateFonts(List<Font> fonts) {
// First, identify variable fonts, and group static fonts by weight/italic to
// find the best width variant.
final List<Font> variableFonts = [];
final Map<String, List<Font>> staticGroups = {};
for (final font in fonts) {
if (font.isVf) {
variableFonts.add(font);
} else {
final key = '${font.weight.start}_${font.italic.start.round()}';
staticGroups.putIfAbsent(key, () => []).add(font);
}
}

// For each static group, keep a single width (default to 100.0) variant.
final filteredVariants = <Font>[];
for (final variant in fonts) {
if (!variant.isVf) {
filteredVariants.add(variant);
continue;
for (final List<Font> group in staticGroups.values) {
Font? defaultWidthVariant;
for (final font in group) {
if (font.width.start == 100.0) {
defaultWidthVariant = font;
break;
}
}

if (defaultWidthVariant == null) {
// If no default width, and more than one variant, we'll have to revise
// this logic to understand which width to prefer.
assert(group.length == 1);
}

filteredVariants.add(defaultWidthVariant ?? group.first);
}

// Now, for each variable font, check if a static equivalent exists.
// If so, skip the variable font.
for (final variant in variableFonts) {
var hasStaticEquivalent = false;
for (final other in fonts) {
if (!other.isVf &&
Expand All @@ -356,6 +391,7 @@ List<Font> _deduplicateFonts(List<Font> fonts) {
filteredVariants.add(variant);
}
}

return filteredVariants;
}

Expand Down
Loading
Loading