Skip to content

Commit

Permalink
KleeOneMonospace -> KokubanMonospace
Browse files Browse the repository at this point in the history
"KleeOneMonospace" violates the OFL license.
  • Loading branch information
ika-musuko committed Sep 18, 2024
1 parent a7db6c7 commit 4378c81
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 8 deletions.
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Japanese programming font<br>
日本語のプログラミングフォント<br>
Download from [Releases](https://github.com/ika-musuko/klee-monospace/releases)
Download from [Releases](https://github.com/ika-musuko/kokuban-monospace/releases)
<br>
![screenshot of the font](screenshot.png)

Expand All @@ -13,12 +13,12 @@ Download from [Releases](https://github.com/ika-musuko/klee-monospace/releases)
- KleeOne-SemiBold.ttf
- LXGWWenKaiMono-Regular.ttf
- LXGWWenKaiMono-Bold.ttf
5. `python klee-monospace.py KleeOne-Regular.ttf LXGWWenKaiMono-Regular.ttf; python klee-monospace.py KleeOne-SemiBold.ttf LXGWWenKaiMono-Bold.ttf`
5. `python kokuban-monospace.py KleeOne-Regular.ttf LXGWWenKaiMono-Regular.ttf; python kokuban-monospace.py KleeOne-SemiBold.ttf LXGWWenKaiMono-Bold.ttf`
6. Open `demo.html` for a demo

## Recommended [kitty](https://github.com/kovidgoyal/kitty) settings
```
font_family KleeOneMonospace
font_family KokubanMonospace
font_size 16
modify_font cell_width 100%
Expand All @@ -36,12 +36,12 @@ text_composition_strategy 3.0 10 # Adjust this based on your display
- KleeOne-SemiBold.ttf
- LXGWWenKaiMono-Regular.ttf
- LXGWWenKaiMono-Bold.ttf
5. `python klee-monospace.py KleeOne-Regular.ttf LXGWWenKaiMono-Regular.ttf; python klee-monospace.py KleeOne-SemiBold.ttf LXGWWenKaiMono-Bold.ttf`
5. `python kokuban-monospace.py KleeOne-Regular.ttf LXGWWenKaiMono-Regular.ttf; python kokuban-monospace.py KleeOne-SemiBold.ttf LXGWWenKaiMono-Bold.ttf`
6. `demo.html`を開いて確認する

## [kitty](https://github.com/kovidgoyal/kitty)のおすすめの設定
```
font_family KleeOneMonospace
font_family KokubanMonospace
font_size 16
modify_font cell_width 100%
Expand Down
11 changes: 8 additions & 3 deletions klee-monospace.py → kokuban-monospace.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@

from fontTools.ttLib import TTFont

FONT_NAME = "KokubanMonospace"

def random_letters(n):
return ''.join(choice('abcdefghijklmnopqrstuvwxyz') for _ in range(n))

Expand Down Expand Up @@ -221,9 +223,11 @@ def make_font_monospace(input_path, lxgw_path, output_path):
gl = "greater"
hmtx[gl] = (rw, -10)


####
print("set namerecords")
font_name, variant_ext = output_path.split("-")
original_font_name, variant_ext = output_path.split("-")
font_name = FONT_NAME
variant, ext = variant_ext.split(".")

print(font_name)
Expand All @@ -250,8 +254,9 @@ def make_font_monospace(input_path, lxgw_path, output_path):
lxgw_path = sys.argv[2]

font_filename = os.path.basename(input_path)
font_name, variant_ext = font_filename.split("-")
output_path = f"{font_name}Monospace-{variant_ext}"
original_font_name, variant_ext = font_filename.split("-")
font_name = FONT_NAME
output_path = f"{font_name}-{variant_ext}"

print(output_path)

Expand Down

0 comments on commit 4378c81

Please sign in to comment.