Skip to content

Commit be9d97e

Browse files
committed
Showcase
1 parent ec5362f commit be9d97e

File tree

7 files changed

+56
-7
lines changed

7 files changed

+56
-7
lines changed

.github/workflows/release.yml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,9 +38,16 @@ jobs:
3838
outputOut="${FONT_NAME}-NerdFont.ttf"
3939
fontforge -script NerdFontPatcher/font-patcher ${output} --complete --boxdrawing --no-progressbars --quiet
4040
mv ${outputIn} ${outputOut}
41+
- name: Generate Showcase
42+
run: |
43+
sudo install python3
44+
pip3 install Pillow
45+
python3 generate_image.py
4146
- name: Release
4247
uses: softprops/action-gh-release@v2
4348
with:
44-
files: "*.ttf"
49+
files: |
50+
*.ttf
51+
Showcase.png
4552
name: ${{ steps.version.outputs.version }}
4653
tag_name: ${{ steps.version.outputs.version }}

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
NeoSpleen.ttf
2+
NeoSpleen-NerdFont.ttf
3+
Showcase.png
4+
NerdFontPatcher/

.nvim/Dependencies.lua

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
return {
2+
terminal_commands = {
3+
"sudo install wget unzip fontforge;" ..
4+
"rm -rf NerdFontPatcher;" ..
5+
"wget https://github.com/ryanoasis/nerd-fonts/raw/master/FontPatcher.zip;" ..
6+
"unzip FontPatcher.zip -d NerdFontPatcher;" ..
7+
"rm ./FontPatcher.zip;"
8+
}
9+
}

.nvim/Fonts.lua

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
return {
2+
terminal_commands = {
3+
"rm NeoSpleen*.ttf;" ..
4+
"fontforge -lang=ff -c 'Open(\"NeoSpleen.sfd\"); Generate(\"NeoSpleen.ttf\")';" ..
5+
"fontforge -script NerdFontPatcher/font-patcher NeoSpleen.ttf --complete --boxdrawing;" ..
6+
"mv NeoSpleenNerdFont-Regular.ttf NeoSpleen-NerdFont.ttf"
7+
}
8+
}

.nvim/Showcase.lua

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
return {
2+
terminal_commands = {
3+
"sudo install python3;" ..
4+
"pip3 install Pillow;" ..
5+
"python3 generate_image.py;"
6+
}
7+
}

Test.txt

Lines changed: 0 additions & 6 deletions
This file was deleted.

generate_image.py

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
from PIL import Image, ImageDraw, ImageFont
2+
3+
width, height = 3840, 1350
4+
image = Image.new("RGB", (width, height), "black")
5+
6+
font_path = "NeoSpleen.ttf"
7+
font_size = 294
8+
font = ImageFont.truetype(font_path, font_size)
9+
10+
draw = ImageDraw.Draw(image)
11+
text = """abcdefghijklmnopqrstuvwxyz
12+
ABCDEFGHIJKLMNOPQRSTUVWXYZ
13+
0123456789
14+
+=-~*&#$@%|
15+
/<[{()}]>\
16+
`'".,:;!?"""
17+
18+
draw.text((0, 0), text, fill="white", font=font)
19+
20+
image.save("Showcase.png")

0 commit comments

Comments
 (0)