Skip to content

Commit 78cf4e4

Browse files
committed
font-weight example
1 parent 02a3238 commit 78cf4e4

File tree

3 files changed

+82
-1
lines changed

3 files changed

+82
-1
lines changed

variable-fonts/font-weight.html

Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
<!DOCTYPE html>
2+
<html lang="en">
3+
<head>
4+
<meta charset="utf-8" />
5+
<title>Variable fonts: weight</title>
6+
<link rel="stylesheet" href="../assets/styles.css" />
7+
<style>
8+
9+
/*
10+
Mutator Sans is created by LettError (https://github.com/LettError/mutatorSans)
11+
and is used here under the terms of its license:
12+
https://github.com/LettError/mutatorSans/blob/master/LICENSE
13+
*/
14+
15+
</style>
16+
17+
<style class="editable">
18+
19+
@font-face {
20+
src: url('fonts/MutatorSans.ttf');
21+
font-family:'MutatorSans';
22+
font-style: normal;
23+
}
24+
25+
label {
26+
font: 1rem monospace;
27+
white-space: nowrap;
28+
}
29+
30+
.sample {
31+
text-transform: uppercase;
32+
font: 1.5rem 'MutatorSans', sans-serif;
33+
}
34+
</style>
35+
</head>
36+
37+
<body>
38+
<section class="preview">
39+
40+
<div class="container">
41+
<p class="sample">...it would not be wonderful to meet a Megalosaurus, forty feet long or so, waddling like an elephantine lizard up Holborn Hill.</p>
42+
</div>
43+
44+
</section>
45+
46+
<textarea class="playable playable-css" style="height: 280px;">
47+
@font-face {
48+
src: url('fonts/MutatorSans.ttf');
49+
font-family:'MutatorSans';
50+
font-style: normal;
51+
}
52+
53+
label {
54+
font: 1rem monospace;
55+
white-space: nowrap;
56+
}
57+
58+
.sample {
59+
text-transform: uppercase;
60+
font: 1.5rem 'MutatorSans', sans-serif;
61+
font-weight: 500;
62+
}
63+
</textarea>
64+
65+
<textarea class="playable playable-html" style="height: 130px;">
66+
<div class="container">
67+
<p class="sample">...it would not be wonderful to meet a Megalosaurus, forty feet long or so, waddling like an elephantine lizard up Holborn Hill.</p>
68+
</div>
69+
</textarea>
70+
71+
<div class="playable-buttons">
72+
<input id="reset" type="button" value="Reset" />
73+
</div>
74+
</body>
75+
76+
<script src="../assets/playable.js"></script>
77+
</html>

variable-fonts/fonts/MutatorSans.ttf

13.4 KB
Binary file not shown.

variable-fonts/oblique.html

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,11 @@
66
<link rel="stylesheet" href="../assets/styles.css" />
77
<style>
88

9-
9+
/*
10+
AmstelvarAlpha-VF is created by David Berlow (https://github.com/TypeNetwork/Amstelvar)
11+
and is used here under the terms of its license:
12+
https://github.com/TypeNetwork/Amstelvar/blob/master/OFL.txt
13+
*/
1014

1115
</style>
1216

0 commit comments

Comments
 (0)