Skip to content

Commit 4afc970

Browse files
author
Cerem Cem ASLAN
committed
added documentation about using custom font
1 parent 5a4f3fc commit 4afc970

File tree

1 file changed

+30
-0
lines changed

1 file changed

+30
-0
lines changed

doc/Adding_a_custom_font.md

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
# Setup
2+
3+
1. Download your font file (eg. "7segment.ttf" from https://torinak.com/font/7-segment)
4+
5+
2. Upload the font file to your website:
6+
7+
1. Create a folder named `assets`.
8+
2. Move your font file into the `assets` folder.
9+
Contents of this folder will directly be copied to the root of your build dir.
10+
11+
3. Create a `.css` file that declares the font:
12+
13+
```css
14+
@font-face {
15+
font-family: "7Segment";
16+
src: url("/7segment.ttf");
17+
}
18+
19+
.seven-segment {
20+
font-family: "7Segment";
21+
letter-spacing: 2px;
22+
}
23+
```
24+
25+
# Use the font in your HTML
26+
27+
```pug
28+
.ui.tag.black.big.label
29+
span.seven-segment(style="color: red") {{read}}
30+
```

0 commit comments

Comments
 (0)