Skip to content

Commit

Permalink
some new glyphs
Browse files Browse the repository at this point in the history
  • Loading branch information
vytdev committed Feb 15, 2024
1 parent 5b953eb commit 7ca8365
Show file tree
Hide file tree
Showing 33 changed files with 27 additions and 5 deletions.
8 changes: 8 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,14 @@ node_modules/
.npm
.node_repl_history

# python
__pycache__
*.pyc

# builds
/BP/scripts
catalyst_*.mcaddon

# ignore generated glyph sprite sheets
glyph_[0-9a-fA-F][0-9a-fA-F].png

2 changes: 0 additions & 2 deletions RP/font/.gitignore

This file was deleted.

Binary file added RP/font/glyph_E1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
Binary file added glyphs/glyph_E1/glyph_E10D.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added glyphs/glyph_E1/glyph_E10E.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added glyphs/glyph_E1/glyph_E10F.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added glyphs/glyph_E1/glyph_E110.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added glyphs/glyph_E1/glyph_E111.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added glyphs/glyph_E1/glyph_E112.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added glyphs/glyph_E1/glyph_E113.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added glyphs/glyph_E1/glyph_E114.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added glyphs/glyph_E1/glyph_E115.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added glyphs/glyph_E1/glyph_E116.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added glyphs/glyph_E1/glyph_E117.png
6 changes: 4 additions & 2 deletions RP/font/join.py → glyphs/join.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
for r in range(0, 255):
# the glyph name
folder = f"glyph_{r:02X}"
source = folder + ".png"
source = os.path.join("..", "RP", "font", folder + ".png")

# check if folder exists
if not os.path.isdir(folder):
Expand All @@ -15,11 +15,13 @@
if len(sprites) == 0:
continue

# get the size of the first sprite glyph
sprite_size = Image.open(os.path.join(folder, sprites[0])).size[0]

# new glyph sprite sheet
sheet = Image.new("RGBA", (sprite_size * 16, sprite_size * 16), (0, 0, 0, 0))

# split the glyph sheet
# iterate
for x in range(16):
for y in range(16):
# path to sprite
Expand Down
1 change: 1 addition & 0 deletions glyphs/readme.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
run `python join.py` to finalize the glyphs
2 changes: 1 addition & 1 deletion RP/font/split.py → glyphs/split.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
for r in range(0, 255):
# the glyph name
folder = f"glyph_{r:02X}"
source = folder + ".png"
source = os.path.join("..", "RP", "font", folder + ".png")

# check if glyph exists
if not os.path.isfile(source):
Expand Down
1 change: 1 addition & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
pillow>=10.2.0
12 changes: 12 additions & 0 deletions src/catalyst/core/glyphs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -146,4 +146,16 @@ export const glyphs: Record<string, string> = {
crafting_table: "\uE10A",
furnace: "\uE10B",
heart: "\uE10C",

// custom glyphs
board: "\uE10D",
monitor: "\uE10E",
barrier: "\uE10F",
check: "\uE110",
plus: "\uE112",
minus: "\uE113",
key: "\uE114",
file: "\uE115",
folder: "\uE116",
code: "\uE117",
};

0 comments on commit 7ca8365

Please sign in to comment.