Skip to content

Commit 4070cea

Browse files
committed
icons: Add a custom icon font
Fixes: #200
1 parent f29f3cc commit 4070cea

19 files changed

+1938
-1
lines changed

.gitattributes

+5
Original file line numberDiff line numberDiff line change
@@ -11,3 +11,8 @@ test/model/schemas/*.json -diff
1111
# information independent of any non-generated file in the tree.
1212
# And thankfully it's much less verbose than, say, a yarn.lock.
1313
#pubspec.lock -diff
14+
15+
16+
# Treat SVG files as binary. They're XML, but typically
17+
# generated from a GUI editor and unenlightening to read.
18+
*.svg binary

assets/icons/ZulipIcons.ttf

5.06 KB
Binary file not shown.

assets/icons/bot.svg

+1
Loading

assets/icons/globe.svg

+1
Loading

assets/icons/hash_sign.svg

+6
Loading

assets/icons/language.svg

+1
Loading

assets/icons/lock.svg

+6
Loading

assets/icons/mute.svg

+5
Loading

assets/icons/read_receipts.svg

+73
Loading

assets/icons/topic.svg

+1
Loading

assets/icons/unmute.svg

+5
Loading

assets/icons/user.svg

+15
Loading

lib/widgets/icons.dart

+55
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
2+
import 'package:flutter/widgets.dart';
3+
4+
// ignore_for_file: constant_identifier_names
5+
6+
/// Identifiers for Zulip's custom icons.
7+
///
8+
/// Use these with the [Icon] widget, in the same way as one uses
9+
/// the members of the [Icons] class from Flutter's Material library.
10+
abstract final class ZulipIcons {
11+
// Generated code; do not edit.
12+
//
13+
// To add a new icon, or otherwise edit the set of icons:
14+
//
15+
// * Add an SVG file in `assets/icons/`,
16+
// or otherwise edit the SVG files there.
17+
//
18+
// * Then run the command `scripts/icons/build-icon-font`.
19+
// That will update this file and the generated icon font,
20+
// `assets/icons/ZulipIcons.ttf`.
21+
//
22+
// BEGIN GENERATED ICON DATA
23+
24+
/// The Zulip custom icon "bot".
25+
static const IconData bot = IconData(0xf101, fontFamily: "Zulip Icons");
26+
27+
/// The Zulip custom icon "globe".
28+
static const IconData globe = IconData(0xf102, fontFamily: "Zulip Icons");
29+
30+
/// The Zulip custom icon "hash_sign".
31+
static const IconData hash_sign = IconData(0xf103, fontFamily: "Zulip Icons");
32+
33+
/// The Zulip custom icon "language".
34+
static const IconData language = IconData(0xf104, fontFamily: "Zulip Icons");
35+
36+
/// The Zulip custom icon "lock".
37+
static const IconData lock = IconData(0xf105, fontFamily: "Zulip Icons");
38+
39+
/// The Zulip custom icon "mute".
40+
static const IconData mute = IconData(0xf106, fontFamily: "Zulip Icons");
41+
42+
/// The Zulip custom icon "read_receipts".
43+
static const IconData read_receipts = IconData(0xf107, fontFamily: "Zulip Icons");
44+
45+
/// The Zulip custom icon "topic".
46+
static const IconData topic = IconData(0xf108, fontFamily: "Zulip Icons");
47+
48+
/// The Zulip custom icon "unmute".
49+
static const IconData unmute = IconData(0xf109, fontFamily: "Zulip Icons");
50+
51+
/// The Zulip custom icon "user".
52+
static const IconData user = IconData(0xf10a, fontFamily: "Zulip Icons");
53+
54+
// END GENERATED ICON DATA
55+
}

pubspec.yaml

+7-1
Original file line numberDiff line numberDiff line change
@@ -90,10 +90,16 @@ flutter:
9090
assets:
9191
- assets/Source_Code_Pro/LICENSE.md
9292

93-
# If adding a font, remember to account for its license in lib/licenses.dart.
9493
fonts:
94+
# Zulip's custom icons. To use or edit, see class ZulipIcons.
95+
- family: Zulip Icons
96+
fonts:
97+
- asset: assets/icons/ZulipIcons.ttf
98+
9599
- family: Source Code Pro
96100
fonts:
97101
- asset: assets/Source_Code_Pro/SourceCodeVF-Upright.otf
98102
- asset: assets/Source_Code_Pro/SourceCodeVF-Italic.otf
99103
style: italic
104+
105+
# If adding a font, remember to account for its license in lib/licenses.dart.

scripts/icons/.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
node_modules/

0 commit comments

Comments
 (0)