Skip to content

Commit 7c9312e

Browse files
authored
fix: font metrics for better vertical alignment and change Slanted to Oblique (#30)
* fix(glyphs): ascender and descender metrics * fix(glyphs): glyphs3 internal ascender value * chore(fonts): export font files * fix(glyphs): winDescent metric to be positive Per the spec, it should be positive instead of a negative number like the others. * fix(glyphs): metrics for Oblique style * fix(glyphs): glyphs3 internal metrics cause bugs, resetting back to prior value * fix: update minor version to 200 The 100 is for the prior glyphs that were added. The 200 is for this change of font metrics and spacing. * chore(fonts): export font files with new style name Oblique * fix: all references to "Slanted" to now use "Oblique"
1 parent a11d01c commit 7c9312e

13 files changed

+33
-52
lines changed

README.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -38,12 +38,12 @@ Copy the below snippet into your CSS file:
3838
font-display: swap;
3939
}
4040

41-
/* Slanted variant - used for italic/oblique text */
41+
/* Oblique variant - used for italic/oblique text */
4242
@font-face {
4343
font-family: 'ServerMono';
44-
src: url('/fonts/ServerMono-RegularSlanted.woff2') format('woff2'),
45-
url('/fonts/ServerMono-RegularSlanted.woff') format('woff'),
46-
url('/fonts/ServerMono-RegularSlanted.otf') format('opentype');
44+
src: url('/fonts/ServerMono-RegularOblique.woff2') format('woff2'),
45+
url('/fonts/ServerMono-RegularOblique.woff') format('woff'),
46+
url('/fonts/ServerMono-RegularOblique.otf') format('opentype');
4747
font-weight: normal;
4848
font-style: oblique;
4949
font-display: swap;
@@ -75,12 +75,12 @@ Or you can copy the below snippet into your CSS file:
7575
font-display: swap;
7676
}
7777

78-
/* Slanted variant - used for italic/oblique text */
78+
/* Oblique variant - used for italic/oblique text */
7979
@font-face {
8080
font-family: 'ServerMono';
81-
src: url('https://cdn.jsdelivr.net/gh/internet-development/www-server-mono@latest/public/fonts/ServerMono-RegularSlanted.woff2') format('woff2'),
82-
url('https://cdn.jsdelivr.net/gh/internet-development/www-server-mono@latest/public/fonts/ServerMono-RegularSlanted.woff') format('woff'),
83-
url('https://cdn.jsdelivr.net/gh/internet-development/www-server-mono@latest/public/fonts/ServerMono-RegularSlanted.otf') format('opentype');
81+
src: url('https://cdn.jsdelivr.net/gh/internet-development/www-server-mono@latest/public/fonts/ServerMono-RegularOblique.woff2') format('woff2'),
82+
url('https://cdn.jsdelivr.net/gh/internet-development/www-server-mono@latest/public/fonts/ServerMono-RegularOblique.woff') format('woff'),
83+
url('https://cdn.jsdelivr.net/gh/internet-development/www-server-mono@latest/public/fonts/ServerMono-RegularOblique.otf') format('opentype');
8484
font-weight: normal;
8585
font-style: oblique;
8686
font-display: swap;
@@ -97,7 +97,7 @@ Then you can use it across your entire site like so:
9797
}
9898
```
9999

100-
To use the slanted version, set the font style to either `oblique` or `italic`:
100+
To use the oblique version, set the font style to either `oblique` or `italic`:
101101

102102
```css
103103
p {

components/MarketingServerMono.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ export default function MarketingServerMono(props) {
9494
</P>
9595
</div>
9696
<div className={styles.right}>
97-
<Title style={{}}>Regular Slanted</Title>
97+
<Title style={{}}>Regular Oblique</Title>
9898
<P style={{ marginTop: `1rem`, fontStyle: 'oblique' }}>
9999
Mi sina alta mappa ëa, lómëa coivië, lómëa lúmë, á tyelë, á auta mi i sáma lómë, liëa olassëar ar ilyë lúmët elenaië.
100100
<br />

fonts/ServerMono.glyphs

Lines changed: 16 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,6 @@
11
{
22
.appVersion = "3343";
33
.formatVersion = 3;
4-
DisplayStrings = (
5-
"$123
6-
$123",
7-
"200%
8-
200%",
9-
"123%
10-
123%",
11-
":(){ :|:/ampersand.ss01 };:",
12-
"/Placeholder oo/Placeholder o/Placeholder/Placeholder o
13-
nhH0o_",
14-
"|¦|",
15-
"<=>",
16-
">_<",
17-
"200%",
18-
"/.notdef",
19-
"/.notdef ▂▃▄▅▆▇█▀▔▏▎▍▌▋▊▉▐▕▖▗▘▙▚▛▜▝▞▟░▒▓●○◦◊■□▲▶▼◀▴▾◂╦╗╔═╩╝╚║╬╣╠╥╖╓┰┒┧┎┟╁┯┑┩┍┡╇╤╕╒╍╏╻┳┓┏━╸╾┉┋╺┅┇╹┻┛╿┗┃╋┫┣╅┭┵┽┲┺╊╃╮╭╯╰╌╎╳╲╱╷┬┐┌─╴╼┈┊╶┄┆╵╽┴┘└│┼┤├╆┮┶┾┱┹╉╄╨╜╙╀┸┦┚┞┖╈┷┪┙┢┕╧╛╘╫╢╟╂┨┠┿┥┝╪╡╞",
20-
"▁▂▃▄▅▆▇█▀▏▎▍▌▋▊▉▐",
21-
"◂"
22-
);
234
axes = (
245
{
256
name = Weight;
@@ -374,35 +355,35 @@ value = n;
374355
},
375356
{
376357
name = hheaAscender;
377-
value = 750;
358+
value = 900;
378359
},
379360
{
380361
name = hheaDescender;
381-
value = -250;
362+
value = -200;
382363
},
383364
{
384365
name = hheaLineGap;
385366
value = 0;
386367
},
387368
{
388369
name = typoAscender;
389-
value = 750;
370+
value = 900;
390371
},
391372
{
392373
name = typoDescender;
393-
value = -250;
374+
value = -200;
394375
},
395376
{
396377
name = typoLineGap;
397378
value = 0;
398379
},
399380
{
400381
name = winAscent;
401-
value = 750;
382+
value = 900;
402383
},
403384
{
404385
name = winDescent;
405-
value = 250;
386+
value = 200;
406387
}
407388
);
408389
guides = (
@@ -485,35 +466,35 @@ value = n;
485466
},
486467
{
487468
name = hheaAscender;
488-
value = 750;
469+
value = 900;
489470
},
490471
{
491472
name = hheaDescender;
492-
value = -250;
473+
value = -200;
493474
},
494475
{
495476
name = hheaLineGap;
496477
value = 0;
497478
},
498479
{
499480
name = typoAscender;
500-
value = 750;
481+
value = 900;
501482
},
502483
{
503484
name = typoDescender;
504-
value = -250;
485+
value = -200;
505486
},
506487
{
507488
name = typoLineGap;
508489
value = 0;
509490
},
510491
{
511492
name = winAscent;
512-
value = 750;
493+
value = 900;
513494
},
514495
{
515496
name = winDescent;
516-
value = 250;
497+
value = 200;
517498
}
518499
);
519500
id = "941849C8-D0D1-40F0-8537-D2B5B3A46943";
@@ -541,7 +522,7 @@ pos = -200;
541522
pos = 10;
542523
}
543524
);
544-
name = "Regular Slanted";
525+
name = "Regular Oblique";
545526
stemValues = (
546527
96,
547528
86,
@@ -21959,7 +21940,7 @@ unicode = 40;
2195921940
},
2196021941
{
2196121942
glyphname = parenright;
21962-
lastChange = "2024-07-26 14:30:06 +0000";
21943+
lastChange = "2025-07-11 20:55:20 +0000";
2196321944
layers = (
2196421945
{
2196521946
layerId = m01;
@@ -64816,7 +64797,7 @@ instanceInterpolations = {
6481664797
};
6481764798
isItalic = 1;
6481864799
linkStyle = Regular;
64819-
name = "Regular Slanted";
64800+
name = "Regular Oblique";
6482064801
}
6482164802
);
6482264803
kerningLTR = {
@@ -64927,5 +64908,5 @@ oV = "96";
6492764908
};
6492864909
};
6492964910
versionMajor = 1;
64930-
versionMinor = 0;
64911+
versionMinor = 200;
6493164912
}

global.scss

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@
99

1010
@font-face {
1111
font-family: 'ServerMono';
12-
src: url('/fonts/ServerMono-RegularSlanted.woff2') format('woff2'),
13-
url('/fonts/ServerMono-RegularSlanted.woff') format('woff'),
14-
url('/fonts/ServerMono-RegularSlanted.otf') format('opentype');
12+
src: url('/fonts/ServerMono-RegularOblique.woff2') format('woff2'),
13+
url('/fonts/ServerMono-RegularOblique.woff') format('woff'),
14+
url('/fonts/ServerMono-RegularOblique.otf') format('opentype');
1515
font-weight: normal;
1616
font-style: oblique;
1717
}

public/fonts/ServerMono-Regular.otf

8 Bytes
Binary file not shown.

public/fonts/ServerMono-Regular.woff

-12 Bytes
Binary file not shown.

public/fonts/ServerMono-Regular.woff2

-148 Bytes
Binary file not shown.
23.9 KB
Binary file not shown.
22 KB
Binary file not shown.

0 commit comments

Comments
 (0)