Split sheet pages & shorten filenames
Now 256 sheets, 16x16 chars each (same as Minecraft), instead of one huge sheet. This greatly improves performance on initial texture loading (total size also grows to ~2MB, though). Filenames are now `unif_XX.png` (XX for codepoint's higher byte in hex form).
@ -7,7 +7,7 @@ This modpack provides mods with dynamic display. Mods are :
|
|||||||
- **[font_api](https://github.com/pyrollo/display_modpack/tree/master/font_api)**: A library for displaying fonts on entities;
|
- **[font_api](https://github.com/pyrollo/display_modpack/tree/master/font_api)**: A library for displaying fonts on entities;
|
||||||
- **[signs_api](https://github.com/pyrollo/display_modpack/tree/master/signs_api)**: A library for the easy creation of signs;
|
- **[signs_api](https://github.com/pyrollo/display_modpack/tree/master/signs_api)**: A library for the easy creation of signs;
|
||||||
- **[font_metro](https://github.com/pyrollo/display_modpack/tree/master/font_metro)**: A font mod used as default font (includes uppercase, lowercase and accentuated latin letters, usual signs, cyrillic and greek letters)
|
- **[font_metro](https://github.com/pyrollo/display_modpack/tree/master/font_metro)**: A font mod used as default font (includes uppercase, lowercase and accentuated latin letters, usual signs, cyrillic and greek letters)
|
||||||
- **[unifont](https://github.com/pyrollo/display_modpack/tree/master/unifont)**: A lightweight (~1MB) font mod with full Unicode Plane 0 charset (63000+ chars)
|
- **[unifont](https://github.com/pyrollo/display_modpack/tree/master/unifont)**: A lightweight (~2MB) font mod with full Unicode Plane 0 charset (63000+ chars)
|
||||||
|
|
||||||
- **[boards](https://github.com/pyrollo/display_modpack/tree/master/boards)**: A mod providing school boards (includes *tiny cursive font*, a handwriting style font);
|
- **[boards](https://github.com/pyrollo/display_modpack/tree/master/boards)**: A mod providing school boards (includes *tiny cursive font*, a handwriting style font);
|
||||||
- **[ontime_clocks](https://github.com/pyrollo/display_modpack/tree/master/ontime_clocks)**: A mod providing clocks which display the ingame time;
|
- **[ontime_clocks](https://github.com/pyrollo/display_modpack/tree/master/ontime_clocks)**: A mod providing clocks which display the ingame time;
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
GNU Unifont (v14.0.01) for Font API mod (from [display_modpack](https://github.com/pyrollo/display_modpack)).
|
GNU Unifont (v14.0.01) for Font API mod (from [display_modpack](https://github.com/pyrollo/display_modpack)).
|
||||||
|
|
||||||
- Full Unicode Basic Multilingual Plane (BMP) with 63485 characters
|
- Full Unicode Basic Multilingual Plane (BMP) with 63485 characters
|
||||||
- Lightweight, only 1MB in size
|
- Lightweight, data only ~2MB in size
|
||||||
- Duospaced (glyphs in either 8x16 or 16x16)
|
- Duospaced (glyphs in either 8x16 or 16x16)
|
||||||
|
|
||||||
Requires `font_api` mod.
|
Requires `font_api` mod.
|
||||||
|
@ -34,9 +34,11 @@ local function get_glyph(codepoint)
|
|||||||
if codepoint == 0 or codepoint > 0xffff or widths[codepoint] == nil then
|
if codepoint == 0 or codepoint > 0xffff or widths[codepoint] == nil then
|
||||||
codepoint = 0xfffd
|
codepoint = 0xfffd
|
||||||
end
|
end
|
||||||
local x = codepoint % 256
|
local page = math.floor(codepoint) / 256
|
||||||
local y = math.floor(codepoint / 256)
|
local off = codepoint % 256
|
||||||
return string.format("unifont_sheet.png^[sheet:256x256:%d,%d", x, y)
|
local x = off % 16
|
||||||
|
local y = math.floor(off / 16)
|
||||||
|
return string.format("unif_%02x.png^[sheet:16x16:%d,%d", page, x, y)
|
||||||
end
|
end
|
||||||
|
|
||||||
font_api.register_font(
|
font_api.register_font(
|
||||||
|
Before Width: | Height: | Size: 301 KiB After Width: | Height: | Size: 226 KiB |
BIN
unifont/textures/unif_00.png
Normal file
After Width: | Height: | Size: 4.2 KiB |
BIN
unifont/textures/unif_01.png
Normal file
After Width: | Height: | Size: 4.1 KiB |
BIN
unifont/textures/unif_02.png
Normal file
After Width: | Height: | Size: 3.8 KiB |
BIN
unifont/textures/unif_03.png
Normal file
After Width: | Height: | Size: 3.8 KiB |
BIN
unifont/textures/unif_04.png
Normal file
After Width: | Height: | Size: 4.1 KiB |
BIN
unifont/textures/unif_05.png
Normal file
After Width: | Height: | Size: 4.1 KiB |
BIN
unifont/textures/unif_06.png
Normal file
After Width: | Height: | Size: 4.1 KiB |
BIN
unifont/textures/unif_07.png
Normal file
After Width: | Height: | Size: 4.2 KiB |
BIN
unifont/textures/unif_08.png
Normal file
After Width: | Height: | Size: 4.5 KiB |
BIN
unifont/textures/unif_09.png
Normal file
After Width: | Height: | Size: 5.5 KiB |
BIN
unifont/textures/unif_0a.png
Normal file
After Width: | Height: | Size: 5.5 KiB |
BIN
unifont/textures/unif_0b.png
Normal file
After Width: | Height: | Size: 5.6 KiB |
BIN
unifont/textures/unif_0c.png
Normal file
After Width: | Height: | Size: 5.7 KiB |
BIN
unifont/textures/unif_0d.png
Normal file
After Width: | Height: | Size: 6.0 KiB |
BIN
unifont/textures/unif_0e.png
Normal file
After Width: | Height: | Size: 4.0 KiB |
BIN
unifont/textures/unif_0f.png
Normal file
After Width: | Height: | Size: 4.6 KiB |
BIN
unifont/textures/unif_10.png
Normal file
After Width: | Height: | Size: 4.6 KiB |
BIN
unifont/textures/unif_11.png
Normal file
After Width: | Height: | Size: 4.0 KiB |
BIN
unifont/textures/unif_12.png
Normal file
After Width: | Height: | Size: 5.1 KiB |
BIN
unifont/textures/unif_13.png
Normal file
After Width: | Height: | Size: 5.1 KiB |
BIN
unifont/textures/unif_14.png
Normal file
After Width: | Height: | Size: 3.5 KiB |
BIN
unifont/textures/unif_15.png
Normal file
After Width: | Height: | Size: 4.0 KiB |
BIN
unifont/textures/unif_16.png
Normal file
After Width: | Height: | Size: 4.4 KiB |
BIN
unifont/textures/unif_17.png
Normal file
After Width: | Height: | Size: 5.2 KiB |
BIN
unifont/textures/unif_18.png
Normal file
After Width: | Height: | Size: 4.8 KiB |
BIN
unifont/textures/unif_19.png
Normal file
After Width: | Height: | Size: 4.9 KiB |
BIN
unifont/textures/unif_1a.png
Normal file
After Width: | Height: | Size: 4.2 KiB |
BIN
unifont/textures/unif_1b.png
Normal file
After Width: | Height: | Size: 4.8 KiB |
BIN
unifont/textures/unif_1c.png
Normal file
After Width: | Height: | Size: 4.4 KiB |
BIN
unifont/textures/unif_1d.png
Normal file
After Width: | Height: | Size: 3.7 KiB |
BIN
unifont/textures/unif_1e.png
Normal file
After Width: | Height: | Size: 3.7 KiB |
BIN
unifont/textures/unif_1f.png
Normal file
After Width: | Height: | Size: 3.3 KiB |
BIN
unifont/textures/unif_20.png
Normal file
After Width: | Height: | Size: 4.3 KiB |
BIN
unifont/textures/unif_21.png
Normal file
After Width: | Height: | Size: 4.5 KiB |
BIN
unifont/textures/unif_22.png
Normal file
After Width: | Height: | Size: 3.7 KiB |
BIN
unifont/textures/unif_23.png
Normal file
After Width: | Height: | Size: 4.6 KiB |
BIN
unifont/textures/unif_24.png
Normal file
After Width: | Height: | Size: 4.7 KiB |
BIN
unifont/textures/unif_25.png
Normal file
After Width: | Height: | Size: 2.8 KiB |
BIN
unifont/textures/unif_26.png
Normal file
After Width: | Height: | Size: 6.0 KiB |
BIN
unifont/textures/unif_27.png
Normal file
After Width: | Height: | Size: 5.8 KiB |
BIN
unifont/textures/unif_28.png
Normal file
After Width: | Height: | Size: 1.7 KiB |
BIN
unifont/textures/unif_29.png
Normal file
After Width: | Height: | Size: 4.6 KiB |
BIN
unifont/textures/unif_2a.png
Normal file
After Width: | Height: | Size: 4.4 KiB |
BIN
unifont/textures/unif_2b.png
Normal file
After Width: | Height: | Size: 5.4 KiB |
BIN
unifont/textures/unif_2c.png
Normal file
After Width: | Height: | Size: 4.6 KiB |
BIN
unifont/textures/unif_2d.png
Normal file
After Width: | Height: | Size: 4.8 KiB |
BIN
unifont/textures/unif_2e.png
Normal file
After Width: | Height: | Size: 5.1 KiB |
BIN
unifont/textures/unif_2f.png
Normal file
After Width: | Height: | Size: 6.7 KiB |
BIN
unifont/textures/unif_30.png
Normal file
After Width: | Height: | Size: 5.6 KiB |
BIN
unifont/textures/unif_31.png
Normal file
After Width: | Height: | Size: 5.4 KiB |
BIN
unifont/textures/unif_32.png
Normal file
After Width: | Height: | Size: 5.6 KiB |
BIN
unifont/textures/unif_33.png
Normal file
After Width: | Height: | Size: 6.9 KiB |
BIN
unifont/textures/unif_34.png
Normal file
After Width: | Height: | Size: 8.6 KiB |
BIN
unifont/textures/unif_35.png
Normal file
After Width: | Height: | Size: 8.8 KiB |
BIN
unifont/textures/unif_36.png
Normal file
After Width: | Height: | Size: 9.2 KiB |
BIN
unifont/textures/unif_37.png
Normal file
After Width: | Height: | Size: 8.8 KiB |
BIN
unifont/textures/unif_38.png
Normal file
After Width: | Height: | Size: 8.9 KiB |
BIN
unifont/textures/unif_39.png
Normal file
After Width: | Height: | Size: 9.2 KiB |
BIN
unifont/textures/unif_3a.png
Normal file
After Width: | Height: | Size: 9.2 KiB |
BIN
unifont/textures/unif_3b.png
Normal file
After Width: | Height: | Size: 9.4 KiB |
BIN
unifont/textures/unif_3c.png
Normal file
After Width: | Height: | Size: 9.3 KiB |
BIN
unifont/textures/unif_3d.png
Normal file
After Width: | Height: | Size: 9.6 KiB |
BIN
unifont/textures/unif_3e.png
Normal file
After Width: | Height: | Size: 9.3 KiB |
BIN
unifont/textures/unif_3f.png
Normal file
After Width: | Height: | Size: 9.0 KiB |
BIN
unifont/textures/unif_40.png
Normal file
After Width: | Height: | Size: 9.1 KiB |
BIN
unifont/textures/unif_41.png
Normal file
After Width: | Height: | Size: 8.6 KiB |
BIN
unifont/textures/unif_42.png
Normal file
After Width: | Height: | Size: 8.9 KiB |
BIN
unifont/textures/unif_43.png
Normal file
After Width: | Height: | Size: 9.2 KiB |
BIN
unifont/textures/unif_44.png
Normal file
After Width: | Height: | Size: 8.5 KiB |
BIN
unifont/textures/unif_45.png
Normal file
After Width: | Height: | Size: 9.1 KiB |
BIN
unifont/textures/unif_46.png
Normal file
After Width: | Height: | Size: 9.2 KiB |
BIN
unifont/textures/unif_47.png
Normal file
After Width: | Height: | Size: 9.3 KiB |
BIN
unifont/textures/unif_48.png
Normal file
After Width: | Height: | Size: 9.3 KiB |
BIN
unifont/textures/unif_49.png
Normal file
After Width: | Height: | Size: 9.2 KiB |
BIN
unifont/textures/unif_4a.png
Normal file
After Width: | Height: | Size: 9.0 KiB |
BIN
unifont/textures/unif_4b.png
Normal file
After Width: | Height: | Size: 9.2 KiB |
BIN
unifont/textures/unif_4c.png
Normal file
After Width: | Height: | Size: 9.2 KiB |
BIN
unifont/textures/unif_4d.png
Normal file
After Width: | Height: | Size: 7.9 KiB |
BIN
unifont/textures/unif_4e.png
Normal file
After Width: | Height: | Size: 7.0 KiB |
BIN
unifont/textures/unif_4f.png
Normal file
After Width: | Height: | Size: 8.3 KiB |
BIN
unifont/textures/unif_50.png
Normal file
After Width: | Height: | Size: 9.0 KiB |
BIN
unifont/textures/unif_51.png
Normal file
After Width: | Height: | Size: 8.3 KiB |
BIN
unifont/textures/unif_52.png
Normal file
After Width: | Height: | Size: 8.3 KiB |
BIN
unifont/textures/unif_53.png
Normal file
After Width: | Height: | Size: 7.7 KiB |
BIN
unifont/textures/unif_54.png
Normal file
After Width: | Height: | Size: 8.0 KiB |
BIN
unifont/textures/unif_55.png
Normal file
After Width: | Height: | Size: 8.8 KiB |
BIN
unifont/textures/unif_56.png
Normal file
After Width: | Height: | Size: 9.1 KiB |
BIN
unifont/textures/unif_57.png
Normal file
After Width: | Height: | Size: 8.1 KiB |
BIN
unifont/textures/unif_58.png
Normal file
After Width: | Height: | Size: 8.9 KiB |
BIN
unifont/textures/unif_59.png
Normal file
After Width: | Height: | Size: 8.2 KiB |
BIN
unifont/textures/unif_5a.png
Normal file
After Width: | Height: | Size: 9.2 KiB |
BIN
unifont/textures/unif_5b.png
Normal file
After Width: | Height: | Size: 8.4 KiB |
BIN
unifont/textures/unif_5c.png
Normal file
After Width: | Height: | Size: 8.1 KiB |
BIN
unifont/textures/unif_5d.png
Normal file
After Width: | Height: | Size: 9.0 KiB |
BIN
unifont/textures/unif_5e.png
Normal file
After Width: | Height: | Size: 8.2 KiB |
BIN
unifont/textures/unif_5f.png
Normal file
After Width: | Height: | Size: 8.5 KiB |