Skip to content

Commit

Permalink
Init commit.
Browse files Browse the repository at this point in the history
  • Loading branch information
Andrew Liaw committed Oct 27, 2022
0 parents commit 0dc93fc
Show file tree
Hide file tree
Showing 9 changed files with 174 additions and 0 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
dist/
6 changes: 6 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
[submodule "iosevka-docker"]
path = iosevka-docker
url = https://github.com/avivace/iosevka-docker.git
[submodule "nerd-fonts"]
path = nerd-fonts
url = https://github.com/ryanoasis/nerd-fonts.git
31 changes: 31 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# Iosevka Fonts with Nerd Fonts Icons
Custom build plans for Iosevka for source code, terminal, and documents, and scripts to patch the terminal fonts with Nerd Fonts icons.

For details on [Isoevka](https://github.com/be5invis/Iosevka) project and [Nerd Fonts](https://github.com/ryanoasis/nerd-fonts) project, visit their GitHub pages.


## Overview
The fonts produced by the scripts are:
* Iosevka Code
* Iosevka Term
* Iosevka Term Mono
* Iosevka Document

Both Iosevka Term and Iosevka Term Mono are for terminals. Iosevka Term Mono only includes single width glyphs for non-combining characters for FontConfig compatibility.

## Known Issue
The unhinted versions are recommended for Iosevka Code, Iosevka Term, and Iosevka Term Mono as type hints can cause programming ligature to misalign.

The Iosevka team is planning to fix this issue in the future.

## Dependency
* Docker

## Build
Clone this repo and its submodule with `git clone --recurse-submodules https://github.com/yhaliaw/Iosevka-fonts.git`.

Change directory to this project with `cd iosevka-fonts`.

Run `bash make_font.sh`.

The created fonts should be in the `dist` directory.
5 changes: 5 additions & 0 deletions fontforge-python/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
FROM debian:bullseye

RUN apt-get update -y && apt-get install -y python3-fontforge

WORKDIR /build
1 change: 1 addition & 0 deletions iosevka-docker
Submodule iosevka-docker added at 0c1c4a
8 changes: 8 additions & 0 deletions make_font.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
set -e

docker build -t iosevka-build ./iosevka-docker -f ./iosevka-docker/Dockerfile
docker run --rm -it -v $(pwd):/build iosevka-build ttf::iosevka-term-mono
docker run --rm -it -v $(pwd):/build iosevka-build ttf::iosevka-term
docker run --rm -it -v $(pwd):/build iosevka-build ttf::iosevka-code
docker build -t fontforge-python ./fontforge-python -f ./fontforge-python/Dockerfile
docker run --rm -it -v $(pwd):/build fontforge-python bash patch_font.sh
1 change: 1 addition & 0 deletions nerd-fonts
Submodule nerd-fonts added at 925885
29 changes: 29 additions & 0 deletions patch_font.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
for file in dist/iosevka-term/ttf/*.ttf;
do
python3 nerd-fonts/font-patcher -out dist/iosevka-term/patched-windows -w -c $file
done

for file in dist/iosevka-term/ttf/*.ttf;
do
python3 nerd-fonts/font-patcher -out dist/iosevka-term/patched -c $file
done

for file in dist/iosevka-term-mono/ttf/*.ttf;
do
python3 nerd-fonts/font-patcher -out dist/iosevka-term-mono/patched -s -c $file
done

for file in dist/iosevka-term/ttf-unhinted/*.ttf;
do
python3 nerd-fonts/font-patcher -out dist/iosevka-term/patched-windows-unhinted -w -c $file
done

for file in dist/iosevka-term/ttf-unhinted/*.ttf;
do
python3 nerd-fonts/font-patcher -out dist/iosevka-term/patched-unhinted -c $file
done

for file in dist/iosevka-term-mono/ttf-unhinted/*.ttf;
do
python3 nerd-fonts/font-patcher -out dist/iosevka-term-mono/patched-unhinted -s -c $file
done
92 changes: 92 additions & 0 deletions private-build-plans.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,92 @@
[buildPlans.iosevka-code]
family = "Iosevka Code"
spacing = "normal"
serifs = "sans"
no-cv-ss = false
export-glyph-names = true

[buildPlans.iosevka-code.variants.design]
capital-g = "toothless-corner-serifless-hooked"
a = "double-storey-toothless-corner"
b = "toothless-corner"
d = "toothless-corner-serifless"
f = "flat-hook-crossbar-at-x-height"
g = "single-storey-earless-corner-flat-hook"
i = "tailed-serifed"
l = "tailed-serifed"
m = "earless-corner-double-arch"
n = "earless-corner-straight"
p = "earless-corner"
q = "earless-corner"
r = "earless-corner"
u = "toothless-corner"
zero = "dotted"
eight = "crossing-asymmetric"
asterisk = "penta-low"
caret = "low"
brace = "straight"
ampersand = "flat-top"
dollar = "open"
cent = "open"

[buildPlans.iosevka-term]
family = "Iosevka Term"
spacing = "term"
serifs = "sans"
no-cv-ss = false
export-glyph-names = true

[buildPlans.iosevka-term.variants.design]
capital-g = "toothless-corner-serifless-hooked"
a = "double-storey-toothless-corner"
b = "toothless-corner"
d = "toothless-corner-serifless"
f = "flat-hook-crossbar-at-x-height"
g = "single-storey-earless-corner-flat-hook"
i = "tailed-serifed"
l = "tailed-serifed"
m = "earless-corner-double-arch"
n = "earless-corner-straight"
p = "earless-corner"
q = "earless-corner"
r = "earless-corner"
u = "toothless-corner"
zero = "dotted"
eight = "crossing-asymmetric"
asterisk = "penta-low"
caret = "low"
brace = "straight"
ampersand = "flat-top"
dollar = "open"
cent = "open"

[buildPlans.iosevka-term-mono]
family = "Iosevka Term Mono"
spacing = "fontconfig-mono"
serifs = "sans"
no-cv-ss = false
export-glyph-names = true

[buildPlans.iosevka-term-mono.variants.design]
capital-g = "toothless-corner-serifless-hooked"
a = "double-storey-toothless-corner"
b = "toothless-corner"
d = "toothless-corner-serifless"
f = "flat-hook-crossbar-at-x-height"
g = "single-storey-earless-corner-flat-hook"
i = "tailed-serifed"
l = "tailed-serifed"
m = "earless-corner-double-arch"
n = "earless-corner-straight"
p = "earless-corner"
q = "earless-corner"
r = "earless-corner"
u = "toothless-corner"
zero = "dotted"
eight = "crossing-asymmetric"
asterisk = "penta-low"
caret = "low"
brace = "straight"
ampersand = "flat-top"
dollar = "open"
cent = "open"

0 comments on commit 0dc93fc

Please sign in to comment.