Skip to content
Merged
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
8 changes: 4 additions & 4 deletions example/pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -161,10 +161,10 @@ packages:
dependency: "direct main"
description:
name: go_router
sha256: "530dcbb298dc7c319aea9e3b7c580a61effb2abee2c93825d2dd8d5af0e230f1"
sha256: "8b05bc90a4f8f8d579db351e2bd6bac566813e12953494dc2a9d7461e7c6dbe7"
url: "https://pub.dev"
source: hosted
version: "18.0.2"
version: "18.1.0"
google_fonts:
dependency: "direct main"
description:
Expand Down Expand Up @@ -273,10 +273,10 @@ packages:
dependency: "direct main"
description:
name: lucide_icons_flutter
sha256: "50a21003cfe094e33b87e780d62ed5be84c32273dec1ba04547aab7df3cba00c"
sha256: d2a7db37aa98536dc65bd6b4384aaa12baa94423a7a57b186011cf695ec2beb2
url: "https://pub.dev"
source: hosted
version: "3.1.20"
version: "4.0.0"
matcher:
dependency: transitive
description:
Expand Down
4 changes: 2 additions & 2 deletions example/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@ dependencies:
flutter_web_plugins:
sdk: flutter
font_awesome_flutter: ^11.0.0
go_router: ^18.0.2
go_router: ^18.1.0
google_fonts: ^9.0.0
http: ^1.6.0
lucide_icons_flutter: ^3.1.20
lucide_icons_flutter: ^4.0.0
morphnext:
path: ..
reel_text: ^0.5.1
Expand Down
29 changes: 29 additions & 0 deletions example/test/font_metrics_fidelity_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,30 @@ void main() {
await _loadIconFonts(manifest);
});

test('every Lucide catalog icon has a usable bundled outline', () async {
final icons = iconCatalog
.where((entry) => entry.family == IconCatalogFamily.lucide)
.toList();
expect(icons, isNotEmpty);
final font = await _parseFont(_manifestFamily(icons.first.icon));
for (final entry in icons) {
expect(entry.icon.fontFamily, 'Lucide', reason: entry.name);
expect(
entry.icon.fontPackage,
'lucide_icons_flutter',
reason: entry.name,
);
expect(entry.icon.matchTextDirection, isFalse, reason: entry.name);
expect(
font.glyphIndexForCodePoint(entry.icon.codePoint),
isNotNull,
reason: entry.name,
);
final outline = font.glyphForCodePoint(entry.icon.codePoint);
expect(outline.contours, isNotEmpty, reason: entry.name);
expect(outline.advanceWidth, greaterThan(0), reason: entry.name);
}
});
testWidgets('representative font faces use native Icon metrics', (
tester,
) async {
Expand Down Expand Up @@ -170,6 +194,11 @@ List<_FontCase> _fontCases() {
icon('menu', IconCatalogFamily.material),
icon('abc', IconCatalogFamily.material),
),
_FontCase(
'Lucide',
icon('house', IconCatalogFamily.lucide),
icon('cpu_ai', IconCatalogFamily.lucide),
),
_FontCase(
'Font Awesome Brands',
icon('github', IconCatalogFamily.fontAwesome),
Expand Down
Loading