Skip to content

Commit 8bf4989

Browse files
authored
Merge pull request #1504 from cabrinha/zed-fonts
Add font Zed Mono
2 parents ef76127 + 3d7aa92 commit 8bf4989

38 files changed

+176
-3
lines changed

bin/scripts/lib/fonts.json

+13
Original file line numberDiff line numberDiff line change
@@ -844,6 +844,19 @@
844844
"caskName": "victor-mono",
845845
"repoRelease": true,
846846
"description": "Clean, crisp and narrow, with a large x-height and clear punctuation"
847+
},
848+
{
849+
"unpatchedName": "Zed Mono",
850+
"RFN": false,
851+
"version": "1.2.0",
852+
"patchedName": "ZedMono",
853+
"folderName": "ZedMono",
854+
"imagePreviewFont": "ZedMono Nerd Font",
855+
"imagePreviewFontSource": "ZedMono/Normal/zed-mono-regular.ttf",
856+
"linkPreviewFont": false,
857+
"caskName": "zed-mono",
858+
"repoRelease": false,
859+
"description": "Zed Mono is a more rounded version of Iosevka"
847860
}
848861
]
849862
}

bin/scripts/name_parser/FontnameTools.py

+8-2
Original file line numberDiff line numberDiff line change
@@ -251,7 +251,7 @@ def postscript_char_filter(name):
251251
'Heavy': ('Hv', 'Heavy'),
252252
'Thin': ('Th', 'Thin'),
253253
'Light': ('Lt', 'Light'),
254-
' ': (), # Just for CodeClimate :-/
254+
'': (), # Just for CodeClimate :-/
255255
}
256256
known_styles = [ # Keywords that end up as style (i.e. a RIBBI set)
257257
'Bold', 'Italic', 'Regular', 'Normal'
@@ -393,8 +393,12 @@ def parse_font_name(name):
393393
# Weights end up as Typographic Family parts ('after the dash')
394394
# Styles end up as Family parts (for classic grouping of four)
395395
# Others also end up in Typographic Family ('before the dash')
396+
widths = [ m + s
397+
for s in list(FontnameTools.known_widths)
398+
for m in list(FontnameTools.known_modifiers) + ['']
399+
]
396400
weights = [ m + s
397-
for s in list(FontnameTools.known_weights2) + list(FontnameTools.known_widths)
401+
for s in list(FontnameTools.known_weights2)
398402
for m in list(FontnameTools.known_modifiers) + [''] if m != s
399403
] + list(FontnameTools.known_weights1) + list(FontnameTools.known_slopes)
400404
weights = [ w for w in weights if w not in FontnameTools.known_styles ]
@@ -408,9 +412,11 @@ def parse_font_name(name):
408412
r'(?:uni-)?1[14]', # GohuFont uni
409413
]
410414

415+
( style, width_token ) = FontnameTools.get_name_token(style, widths)
411416
( style, weight_token ) = FontnameTools.get_name_token(style, weights)
412417
( style, style_token ) = FontnameTools.get_name_token(style, FontnameTools.known_styles)
413418
( style, other_token ) = FontnameTools.get_name_token(style, other)
419+
weight_token = width_token + weight_token
414420
while 'Regular' in style_token and len(style_token) > 1:
415421
# Correct situation where "Regular" and something else is given
416422
style_token.remove('Regular')

readme.md

+4-1
Original file line numberDiff line numberDiff line change
@@ -176,6 +176,7 @@ A preview of all fonts can be found [here](https://www.nerdfonts.com/font-downlo
176176
| [Ubuntu Nerd Font][p-ubuntu] | [Ubuntu Font][f-ubuntu] | 0.83 | NO |
177177
| [UbuntuMono Nerd Font][p-ubuntu-mono] | [Ubuntu Font][f-ubuntu] | 0.80 | NO |
178178
| [VictorMono Nerd Font][p-victor] | [Victor Mono][f-victor] | 1.5.6 | NO |
179+
| [ZedMono Nerd Font][p-zed-mono] | [Zed Mono][f-zed-mono] | 1.2.0 | NO |
179180

180181
<sub>_\*RFN = Reserved Font Name_</sub>
181182

@@ -311,7 +312,7 @@ or, in Powershell (Windows only):
311312
312313
_Note_: Will not work to get newer fonts as they are not inside the repo anymore.
313314

314-
A full clone of this repository is **not** required nor efficient (mostly due to Repository size) if you are simply only interested in a limited set of fonts.
315+
A full clone of this repository is **not** required nor efficient (mostly due to Repository size) if you are simply only interested in a limited set of fonts.
315316

316317
If you do want to clone the entire repo be sure to _shallow_ clone:
317318
```sh
@@ -701,6 +702,7 @@ Font repos
701702
[f-tinos]:https://fonts.google.com/specimen/Tinos
702703
[f-ubuntu]:http://font.ubuntu.com
703704
[f-victor]:https://github.com/rubjo/victor-mono
705+
[f-zed-mono]:https://github.com/zed-industries/zed-fonts
704706

705707
<!--
706708
Patched Font internal links
@@ -770,6 +772,7 @@ Patched Font internal links
770772
[p-ubuntu-mono]:patched-fonts/UbuntuMono
771773
[p-ubuntu]:patched-fonts/Ubuntu
772774
[p-victor]:patched-fonts/VictorMono
775+
[p-zed-mono]:patched-fonts/ZedMono
773776

774777

775778
<!--
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
config_patch_flags="--makegroups 5"
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
+110
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,110 @@
1+
Copyright 2015-2021, Renzhi Li (aka. Belleve Invis, [email protected])
2+
3+
This Font Software is licensed under the SIL Open Font License, Version 1.1.
4+
5+
This license is copied below, and is also available with a FAQ at:
6+
http://scripts.sil.org/OFL
7+
8+
--------------------------
9+
10+
11+
SIL Open Font License v1.1
12+
====================================================
13+
14+
15+
Preamble
16+
----------
17+
18+
The goals of the Open Font License (OFL) are to stimulate worldwide
19+
development of collaborative font projects, to support the font creation
20+
efforts of academic and linguistic communities, and to provide a free and
21+
open framework in which fonts may be shared and improved in partnership
22+
with others.
23+
24+
The OFL allows the licensed fonts to be used, studied, modified and
25+
redistributed freely as long as they are not sold by themselves. The
26+
fonts, including any derivative works, can be bundled, embedded,
27+
redistributed and/or sold with any software provided that any reserved
28+
names are not used by derivative works. The fonts and derivatives,
29+
however, cannot be released under any other type of license. The
30+
requirement for fonts to remain under this license does not apply
31+
to any document created using the fonts or their derivatives.
32+
33+
34+
Definitions
35+
-------------
36+
37+
`"Font Software"` refers to the set of files released by the Copyright
38+
Holder(s) under this license and clearly marked as such. This may
39+
include source files, build scripts and documentation.
40+
41+
`"Reserved Font Name"` refers to any names specified as such after the
42+
copyright statement(s).
43+
44+
`"Original Version"` refers to the collection of Font Software components as
45+
distributed by the Copyright Holder(s).
46+
47+
`"Modified Version"` refers to any derivative made by adding to, deleting,
48+
or substituting -- in part or in whole -- any of the components of the
49+
Original Version, by changing formats or by porting the Font Software to a
50+
new environment.
51+
52+
`"Author"` refers to any designer, engineer, programmer, technical
53+
writer or other person who contributed to the Font Software.
54+
55+
56+
Permission & Conditions
57+
------------------------
58+
59+
Permission is hereby granted, free of charge, to any person obtaining
60+
a copy of the Font Software, to use, study, copy, merge, embed, modify,
61+
redistribute, and sell modified and unmodified copies of the Font
62+
Software, subject to the following conditions:
63+
64+
1. Neither the Font Software nor any of its individual components,
65+
in Original or Modified Versions, may be sold by itself.
66+
67+
2. Original or Modified Versions of the Font Software may be bundled,
68+
redistributed and/or sold with any software, provided that each copy
69+
contains the above copyright notice and this license. These can be
70+
included either as stand-alone text files, human-readable headers or
71+
in the appropriate machine-readable metadata fields within text or
72+
binary files as long as those fields can be easily viewed by the user.
73+
74+
3. No Modified Version of the Font Software may use the Reserved Font
75+
Name(s) unless explicit written permission is granted by the corresponding
76+
Copyright Holder. This restriction only applies to the primary font name as
77+
presented to the users.
78+
79+
4. The name(s) of the Copyright Holder(s) or the Author(s) of the Font
80+
Software shall not be used to promote, endorse or advertise any
81+
Modified Version, except to acknowledge the contribution(s) of the
82+
Copyright Holder(s) and the Author(s) or with their explicit written
83+
permission.
84+
85+
5. The Font Software, modified or unmodified, in part or in whole,
86+
must be distributed entirely under this license, and must not be
87+
distributed under any other license. The requirement for fonts to
88+
remain under this license does not apply to any document created
89+
using the Font Software.
90+
91+
92+
93+
Termination
94+
-----------
95+
96+
This license becomes null and void if any of the above conditions are
97+
not met.
98+
99+
100+
DISCLAIMER
101+
102+
THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
103+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
104+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
105+
OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
106+
COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
107+
INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
108+
DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
109+
FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
110+
OTHER DEALINGS IN THE FONT SOFTWARE.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
config_patch_flags="--makegroups 4"
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.

src/unpatched-fonts/ZedMono/README.md

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# Zed Mono
2+
3+
**Zed Mono** is a custom builds of Iosevka.
4+
5+
For more information have a look at the upstream website: https://github.com/zed-industries/zed-fonts
6+
7+
Version: 1.2.0

src/unpatched-fonts/ZedMono/update.sh

+31
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
#!/usr/bin/env bash
2+
3+
FONT_VERSION=1.2.0
4+
TMP_DIR=$(mktemp -d)
5+
6+
set -ex
7+
8+
curl -LOf "https://github.com/zed-industries/zed-fonts/releases/download/${FONT_VERSION}/zed-mono-${FONT_VERSION}.zip" --output-dir "${TMP_DIR}"
9+
unzip -d "${TMP_DIR}" "${TMP_DIR}/*.zip"
10+
11+
ls -alh "${TMP_DIR}"
12+
13+
typefaces=( "" "Extended" )
14+
15+
# weights=( regular italic oblique \
16+
# thin* extralight* light* medium* semibold* bold* extrabold* heavy* )
17+
18+
weights=( Regular italic oblique \
19+
light* medium* bold* extrabold* )
20+
21+
for face in "${typefaces[@]}"; do
22+
echo "Processing ${face} ..."
23+
dest=${face}
24+
if [ -z "${face}" ]; then
25+
dest=Normal
26+
fi
27+
mkdir -p "${dest}"
28+
for weight in "${weights[@]}"; do
29+
find "${TMP_DIR}" -iname "zed-mono-${face}${weight}.ttf" -exec mv "{}" "${dest}" \;
30+
done
31+
done

src/unpatched-fonts/fontfilenames

+1
Original file line numberDiff line numberDiff line change
@@ -63,3 +63,4 @@ Tinos/Regular/Tinos-Regular.ttf
6363
Ubuntu/Regular/Ubuntu-R.ttf
6464
UbuntuMono/Regular/UbuntuMono-R.ttf
6565
VictorMono/Regular/VictorMono-Regular.ttf
66+
ZedMono/Normal/zed-mono-regular.ttf

0 commit comments

Comments
 (0)