-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmake-hybrid-mono-fonts.sh
executable file
·96 lines (72 loc) · 3.31 KB
/
make-hybrid-mono-fonts.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
#!/bin/bash
# Base
BASE_COPYRIGHT="Copyright (c) 2021, Ghazy Abdallah (https://github.com/aster-phoenix)."
BASE_SCALE=1000
# Define fonts
# JetBrains Mono
JB_VER=2.242
JB_LINK=https://github.com/JetBrains/JetBrainsMono/releases/download/v$JB_VER/JetBrainsMono-$JB_VER.zip
JB_COPYRIGHT="Copyright (c) 2020, The JetBrains Mono Project Authors (https://github.com/JetBrains/JetBrainsMono)."
wget $JB_LINK -O jb.zip
unzip jb.zip -d jb
# Fira Code
FR_VER=6.2
FR_LINK=https://github.com/tonsky/FiraCode/releases/download/$FR_VER/Fira_Code_v$FR_VER.zip
FR_COPYRIGHT="Copyright (c) 2014, The Fira Code Project Authors (https://github.com/tonsky/FiraCode)."
wget $FR_LINK -O fr.zip
unzip fr.zip -d fr
# Kawkab Mono
KK_VER=0.501
KK_LINK=https://github.com/aiaf/kawkab-mono/releases/download/v$KK_VER/kawkab-mono-$KK_VER.zip
KK_COPYRIGHT="Copyright (c) 2015, Abdullah Arif (https://github.com/aiaf/kawkab-mono)."
wget $KK_LINK -O kk.zip
unzip kk.zip -d kk
# Vazir Code
VZ_VER=1.1.2
VZ_LINK=https://github.com/rastikerdar/vazir-code-font/releases/download/v$VZ_VER/vazir-code-font-v$VZ_VER.zip
VZ_COPYRIGHT="Copyright (c) 2016, Vazir Code Font Project Authors (https://github.com/rastikerdar/vazir-code-font)."
wget $VZ_LINK -O vz.zip
unzip vz.zip -d vz
# Merge fonts
# JetBrains Mono + Kawkab Mono
FONT_NAME="JetBrains-Mono-Kawkab-Regular"
FONT_FAMILY="JetBrains Mono Kawkab"
FONT_FULLNAME="JetBrains Mono Kawkab Regular"
FONT_WEIGHT="Regular"
FONT_COPYRIGHT="$BASE_COPYRIGHT $JB_COPYRIGHT $KK_COPYRIGHT"
FONT1=jb/fonts/ttf/JetBrainsMono-Regular.ttf
FONT2=kk/kawkab-mono-$KK_VER/KawkabMono-Regular.ttf
RESULT_FONT=JetBrains-Mono-Kawkab-Regular.ttf
fontforge -lang=ff -script merge.ff "$FONT1" "$FONT2" "$BASE_SCALE" "$FONT_NAME" "$FONT_FAMILY" "$FONT_FULLNAME" "$FONT_WEIGHT" "$FONT_COPYRIGHT" "$RESULT_FONT"
# JetBrains Mono + Vazir Code
FONT_NAME="JetBrains-Mono-Vazir-Regular"
FONT_FAMILY="JetBrains Mono Vazir"
FONT_FULLNAME="JetBrains Mono Vazir Regular"
FONT_WEIGHT="Regular"
FONT_COPYRIGHT="$BASE_COPYRIGHT $JB_COPYRIGHT $VZ_COPYRIGHT"
FONT1=jb/fonts/ttf/JetBrainsMono-Regular.ttf
FONT2=vz/Without-Latin/Vazir-Code-WOL.ttf
RESULT_FONT=JetBrains-Mono-Vazir-Regular.ttf
fontforge -lang=ff -script merge.ff "$FONT1" "$FONT2" "$BASE_SCALE" "$FONT_NAME" "$FONT_FAMILY" "$FONT_FULLNAME" "$FONT_WEIGHT" "$FONT_COPYRIGHT" "$RESULT_FONT"
# Fira Code + Kawkab Mono
FONT_NAME="FiraCode-Kawkab-Regular"
FONT_FAMILY="FiraCode Kawkab"
FONT_FULLNAME="FiraCode Kawkab Regular"
FONT_WEIGHT="Regular"
FONT_COPYRIGHT="$BASE_COPYRIGHT $FR_COPYRIGHT $KK_COPYRIGHT"
FONT1=fr/ttf/FiraCode-Regular.ttf
FONT2=kk/kawkab-mono-$KK_VER/KawkabMono-Regular.ttf
RESULT_FONT=FiraCode-Kawkab-Regular.ttf
fontforge -lang=ff -script merge.ff "$FONT1" "$FONT2" "$BASE_SCALE" "$FONT_NAME" "$FONT_FAMILY" "$FONT_FULLNAME" "$FONT_WEIGHT" "$FONT_COPYRIGHT" "$RESULT_FONT"
# Fira Code + Vazir Code
FONT_NAME="FiraCode-Vazir-Regular"
FONT_FAMILY="FiraCode Vazir"
FONT_FULLNAME="FiraCode Vazir Regular"
FONT_WEIGHT="Regular"
FONT_COPYRIGHT="$BASE_COPYRIGHT $FR_COPYRIGHT $VZ_COPYRIGHT"
FONT1=fr/ttf/FiraCode-Regular.ttf
FONT2=vz/Without-Latin/Vazir-Code-WOL.ttf
RESULT_FONT=FiraCode-Vazir-Regular.ttf
fontforge -lang=ff -script merge.ff "$FONT1" "$FONT2" "$BASE_SCALE" "$FONT_NAME" "$FONT_FAMILY" "$FONT_FULLNAME" "$FONT_WEIGHT" "$FONT_COPYRIGHT" "$RESULT_FONT"
# Archive fonts
zip hybrid-mono-fonts.zip *.ttf