Skip to content

Commit

Permalink
CI changes only
Browse files Browse the repository at this point in the history
  • Loading branch information
mbwilding committed Apr 25, 2024
1 parent 2df2f4a commit 4a646cd
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 23 deletions.
14 changes: 6 additions & 8 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,17 +27,15 @@ jobs:
sed -i "s/Version +ACIA-[0-9]\+\.[0-9]\+\.[0-9]\+/Version +ACIA-${NEW_VERSION}/g" ${FONT_NAME}.sfd
sed -i "s/sfntRevision: 0x000[0-9]*0000/sfntRevision: 0x000${MAJOR}0000/g" ${FONT_NAME}.sfd
echo "version=${NEW_VERSION}" >> ${GITHUB_OUTPUT}
- name: Generate Fonts
- name: Generate Font
run: |
fontforge -lang=ff -c "Open(\"${FONT_NAME}.sfd\"); Generate(\"${FONT_NAME.ttf}\")"
- name: Generate Nerd Font
run: |
input="${FONT_NAME}.sfd"
output="${FONT_NAME}.ttf"
fontforge -lang=ff -c "Open(\"${input}\"); Generate(\"${output}\")"
wget https://github.com/ryanoasis/nerd-fonts/raw/master/FontPatcher.zip
unzip FontPatcher.zip -d NerdFontPatcher
outputIn="${FONT_NAME}NerdFont-Regular.ttf"
outputOut="${FONT_NAME}-NerdFont.ttf"
fontforge -script NerdFontPatcher/font-patcher ${output} --complete --boxdrawing --no-progressbars --quiet
mv ${outputIn} ${outputOut}
fontforge -script NerdFontPatcher/font-patcher ${FONT_NAME}.ttf --complete --boxdrawing --no-progressbars --quiet
mv ${FONT_NAME}NerdFont-Regular.ttf ${FONT_NAME}-NerdFont.ttf
- name: Generate Showcase
run: |
sudo apt-get install python3
Expand Down
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@ A modern monospaced font inspired by [Spleen](https://github.com/fcambus/spleen)

## Showcase

![Showcase](https://github.com/mbwilding/NeoSpleen/releases/latest/download/Showcase.png)
![Showcase White-on-Black](https://github.com/mbwilding/NeoSpleen/releases/latest/download/Showcase-WoB.png)

![Showcase Black-on-White](https://github.com/mbwilding/NeoSpleen/releases/latest/download/Showcase-BoW.png)

## Install

Expand All @@ -26,8 +28,6 @@ fc-cache -f

Download the font you want, double click it, and click install.

[NeoSpleen](https://github.com/mbwilding/NeoSpleen/releases/latest/download/NeoSpleen.ttf) | [NeoSpleen-NerdFont](https://github.com/mbwilding/NeoSpleen/releases/latest/download/NeoSpleen-NerdFont.ttf)

## Notes
[NeoSpleen](https://github.com/mbwilding/NeoSpleen/releases/latest/download/NeoSpleen.ttf)

Recommended font size is 15 as it is the equivalent to Jetbrains Mono at font size 12 in the terminal.
[NeoSpleen-NerdFont](https://github.com/mbwilding/NeoSpleen/releases/latest/download/NeoSpleen-NerdFont.ttf)
24 changes: 14 additions & 10 deletions generate_showcase.py
Original file line number Diff line number Diff line change
@@ -1,20 +1,24 @@
from PIL import Image, ImageDraw, ImageFont

width, height = 3840, 1350
image = Image.new("RGB", (width, height), "black")

font_path = "NeoSpleen.ttf"
font_size = 294
font = ImageFont.truetype(font_path, font_size)

draw = ImageDraw.Draw(image)
text = """ABCDEFGHIJKLMNOPQRSTUVWXYZ
abcdefghijklmnopqrstuvwxyz
0123456789
_-~=+*&#$@%^
/<[{(|)}]>\
`'".,:;!?"""

draw.text((0, 0), text, fill="white", font=font)
width, height = 3840, 1350
font_path = "NeoSpleen.ttf"
font_size = 294
font = ImageFont.truetype(font_path, font_size)


def create_image(background_color, text_color, file_name):
image = Image.new("RGB", (width, height), background_color)
draw = ImageDraw.Draw(image)
draw.text((0, 0), text, fill=text_color, font=font)
image.save("Showcase-" + file_name)


image.save("Showcase.png")
create_image("black", "white", "WoB.png")
create_image("white", "black", "BoW.png")

0 comments on commit 4a646cd

Please sign in to comment.