Play with heading alignment in startanim

This commit is contained in:
2024-11-23 17:49:59 -06:00
parent e5c261e285
commit 8a68360256
5 changed files with 12 additions and 6 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 18 KiB

After

Width:  |  Height:  |  Size: 18 KiB

View File

@@ -52,7 +52,7 @@ def main():
content = content.replace('{{0}}', '<br/>' * total_num)
# {{1}}: '<br/>' * (# of programmers)
content = content.replace('{{1}}', '<br/>' * num_dict['Programming'])
content = content.replace('{{1}}', '<br/>' * num_dict['Code'])
# {{2}}: '<br/>' * (# of artists)
content = content.replace('{{2}}', '<br/>' * num_dict['Graphics'])
@@ -66,7 +66,7 @@ def main():
list_break = ' <br/>\n'
# {{5}}: Programmer name lines
name_lines = list_break.join(name_dict["Programming"]) + list_break
name_lines = list_break.join(name_dict["Code"]) + list_break
content = replace_tabbed_lines('{{5}}', name_lines, 8)
# {{6}}: Artist name lines
@@ -86,12 +86,13 @@ def main():
# Generate startanim.png using ImageMagick
image_lines_col1 = []
image_lines_col2 = []
# These allow whitespace to come at the start of the real content, and will be cropped out.
image_lines_col1 = ["-"]
image_lines_col2 = ["-"]
# Note: blank lines need to have a space in them for some reason
def add_heading(heading):
image_lines_col1.append(f'- {heading.upper()} -')
image_lines_col1.append(f' - {heading.upper()} -')
image_lines_col1.append(' ')
image_lines_col2.extend([' ', ' '])
@@ -120,7 +121,7 @@ def main():
image_lines_col1.append(' ')
image_lines_col2.append(' ')
add_heading('Programming')
add_heading('Code')
add_heading('Graphics')
add_heading('Testing')
add_heading('Funding')

View File

@@ -1,6 +1,11 @@
#!/bin/bash
font_size=8
spacing=5
actual_line_size=$((font_size + spacing))
magick convert +append pkg/credits/startanim-col-*.png pkg/credits/startanim-pt-2.png
magick convert pkg/credits/startanim-pt-2.png -chop 0x$actual_line_size -gravity North pkg/credits/startanim-pt-2.png
magick convert -append pkg/credits/startanim-pt-*.png rsrc/graphics/startanim.png
# Clean up:
rm pkg/credits/startanim-col-*.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 22 KiB

After

Width:  |  Height:  |  Size: 23 KiB