mirror of
https://git.minetest.land/Mineclonia/Mineclonia.git
synced 2024-11-05 09:15:05 +00:00
Merge pull request 'Add Mineclonia menu icon' (#139) from add-mineclonia-menu-icon into master
Reviewed-on: https://git.minetest.land/Mineclonia/Mineclonia/pulls/139 Reviewed-by: cora <cora@noreply.git.minetest.land>
This commit is contained in:
commit
6f046b199d
3 changed files with 8867 additions and 0 deletions
BIN
menu/icon.png
BIN
menu/icon.png
Binary file not shown.
Before Width: | Height: | Size: 3.9 KiB After Width: | Height: | Size: 4.9 KiB |
29
menu/icon.png.do
Normal file
29
menu/icon.png.do
Normal file
|
@ -0,0 +1,29 @@
|
|||
#!/bin/sh
|
||||
set -eu
|
||||
|
||||
SVG_FILE=${2%.png}.svg
|
||||
|
||||
# How crisp a Minetest menu icon appears is influenced by image height
|
||||
# and width. Low resolutions lead to blurry edges, as Minetest scales
|
||||
# menu icons up. High resolutions lead to jagged edges, as Minetest
|
||||
# scales menu icons down. Height & width of 72 pixes seem to work.
|
||||
#
|
||||
# Though usually one would export directly to "${3}", Inkscape 1.0 had
|
||||
# its command line options changed by people who apparently think that
|
||||
# backwards compatibility is some kind of swear word: Whereas earlier
|
||||
# Inkscape versions would export to a file called foo.png.tmp, newer
|
||||
# behaviour is to ignore the user's wishes & write to foo.png.png –
|
||||
# unless one asks it to write to a filename with a .png extension,
|
||||
# Inkscape 1.0 changes the filename extension to .png each time.
|
||||
#
|
||||
# As we do not know the extension of "${3}", we have to use the
|
||||
# extension, then rename the resulting file to the proper name;
|
||||
# only that way the export works with Inkscape 1.0 & earlier …
|
||||
>&2 inkscape \
|
||||
--file="${SVG_FILE}" \
|
||||
--export-png="${3}".png \
|
||||
--export-area-page \
|
||||
--export-height 72 \
|
||||
--export-width 72 \
|
||||
|
||||
mv "${3}".png "${3}"
|
8838
menu/icon.svg
Normal file
8838
menu/icon.svg
Normal file
File diff suppressed because it is too large
Load diff
After Width: | Height: | Size: 509 KiB |
Loading…
Reference in a new issue