Skip to content

Commit 75139b2

Browse files
committed
fonts: Build fonts from norm_corpo-5 sprites
1 parent a2325ca commit 75139b2

5 files changed

Lines changed: 120 additions & 9 deletions

File tree

Makefile.am

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,9 +72,13 @@ include $(srcdir)/sprites-fontb6-0.am
7272
include $(srcdir)/sprites-fontb6-1.am
7373
include $(srcdir)/sprites-fontb7-0.am
7474
include $(srcdir)/sprites-fontb7-1.am
75+
include $(srcdir)/sprites-fontb11-0.am
76+
include $(srcdir)/sprites-fontb12-0.am
7577

7678
fontb0_DATA = $(fontb6_0_files) $(fontb6_1_files) \
77-
$(fontb7_0_files) $(fontb7_1_files)
79+
$(fontb7_0_files) $(fontb7_1_files) \
80+
$(fontb11_0_files) \
81+
$(fontb12_0_files)
7882
fontb0dir = $(prefix)/$(PARENT_PACKAGE)/data
7983

8084
include $(srcdir)/sprites-wepicon0-3.am

sprites-fontb11-0.am

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
# *****************************************************************************
2+
# Graphics assets generation for SyndWarsFX.
3+
# *****************************************************************************
4+
# @file sprites-fontb11-0.am
5+
# Automake rules neccessary to build `fontb11-0` mission font sprites.
6+
# Font b6 - norm_corpo white.
7+
# Detail 1 - 10 px height.
8+
# @author Tomasz Lis
9+
# @par Copying and copyrights:
10+
# This program is free software; you can redistribute it and/or modify
11+
# it under the terms of the GNU General Public License as published by
12+
# the Free Software Foundation; either version 2 of the License, or
13+
# (at your option) any later version.
14+
# *****************************************************************************
15+
16+
fontb11_0_files = data/fontb11-0.dat data/fontb11-0.tab
17+
18+
# List of font letters which can be colorized
19+
fontb11_0_chars = \
20+
0021 0022 0023 0024 0025 0026 0027 0028 0029 002a 002b 002c 002d 002e 002f \
21+
0030 0031 0032 0033 0034 0035 0036 0037 0038 0039 003a 003b 003c 003d 003e 003f \
22+
0040 0041 0042 0043 0044 0045 0046 0047 0048 0049 004a 004b 004c 004d 004e 004f \
23+
0050 0051 0052 0053 0054 0055 0056 0057 0058 0059 005a 005b 005c 005d 005e 005f \
24+
0060 0061 0062 0063 0064 0065 0066 0067 0068 0069 006a 006b 006c 006d 006e 006f \
25+
0070 0071 0072 0073 0074 0075 0076 0077 0078 0079 007a 007e \
26+
00a1 00aa 00b0 00bf 00c0 00c1 00c4 00c5 00c7 00c8 00c9 00cc 00cd \
27+
00d1 00d2 00d3 00d6 00d9 00da 00dc 00df \
28+
0104 0106 0118 0141 0143 015a 0179 017b 2018 2019
29+
# List of non-letters or other sprites to pass without colorization
30+
fontb11_0_charnames_nomod = \
31+
empty char_u0020
32+
fontb11_0_sprites_gen = \
33+
$(foreach num,$(fontb11_0_chars),font_norm_corpo-5-shd-white/char_u$(num).png)
34+
fontb11_0_sprites_cp = \
35+
$(foreach name,$(fontb11_0_charnames_nomod),$(top_srcdir)/font_norm_corpo-5-white/$(name).png)
36+
37+
data/fontb11-0.tab: data/fontb11-0.dat
38+
39+
data/fontb11-0.dat: font_norm_corpo-5-shd-white/filelist-fontb11-0.txt $(top_srcdir)/data/engine-std.pal $(fontb11_0_sprites_gen)
40+
41+
font_norm_corpo-5-shd-white/filelist-fontb11-0.txt: $(top_srcdir)/font_norm_corpo-5-white/filelist-fontb11-0.txt
42+
$(MKDIR_P) "$(@D)"
43+
cp -p -t "$(@D)" $(fontb11_0_sprites_cp)
44+
cp -p "$<" "$@"
45+
46+
# Use ImageMagick to generate shaded white sprites from the plain white ones
47+
font_norm_corpo-5-shd-white/%.png: $(top_srcdir)/font_norm_corpo-5-white/%.png
48+
$(MKDIR_P) "$(@D)"
49+
$(MAGICK_CONVERT) "$<" \
50+
"$<" -gravity Center -geometry +0+1 -composite \
51+
"$<" -gravity Center -geometry +1+1 -composite \
52+
-colorspace RGB \
53+
-channel R -evaluate multiply 0.53 \
54+
-channel G -evaluate multiply 0.53 \
55+
-channel B -evaluate multiply 0.53 \
56+
+channel \
57+
"$<" -gravity Center -geometry +0+0 -composite \
58+
-colorspace RGB "png32:$@"

sprites-fontb12-0.am

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
# *****************************************************************************
2+
# Graphics assets generation for SyndWarsFX.
3+
# *****************************************************************************
4+
# @file sprites-fontb12-0.am
5+
# Automake rules neccessary to build `fontb12-0` mission font sprites.
6+
# Font b7 - norm_corpo dark blue.
7+
# Detail 1 - 10 px height.
8+
# @author Tomasz Lis
9+
# @par Copying and copyrights:
10+
# This program is free software; you can redistribute it and/or modify
11+
# it under the terms of the GNU General Public License as published by
12+
# the Free Software Foundation; either version 2 of the License, or
13+
# (at your option) any later version.
14+
# *****************************************************************************
15+
16+
fontb12_0_files = data/fontb12-0.dat data/fontb12-0.tab
17+
18+
# List of font letters which can be colorized
19+
fontb12_0_chars = \
20+
0021 0022 0023 0024 0025 0026 0027 0028 0029 002a 002b 002c 002d 002e 002f \
21+
0030 0031 0032 0033 0034 0035 0036 0037 0038 0039 003a 003b 003c 003d 003e 003f \
22+
0040 0041 0042 0043 0044 0045 0046 0047 0048 0049 004a 004b 004c 004d 004e 004f \
23+
0050 0051 0052 0053 0054 0055 0056 0057 0058 0059 005a 005b 005c 005d 005e 005f \
24+
0060 0061 0062 0063 0064 0065 0066 0067 0068 0069 006a 006b 006c 006d 006e 006f \
25+
0070 0071 0072 0073 0074 0075 0076 0077 0078 0079 007a 007e \
26+
00a1 00aa 00b0 00bf 00c0 00c1 00c4 00c5 00c7 00c8 00c9 00cc 00cd \
27+
00d1 00d2 00d3 00d6 00d9 00da 00dc 00df \
28+
0104 0106 0118 0141 0143 015a 0179 017b 2018 2019
29+
# List of non-letters or other sprites to pass without colorization
30+
fontb12_0_charnames_nomod = \
31+
empty char_u0020
32+
fontb12_0_sprites_gen = \
33+
$(foreach num,$(fontb12_0_chars),font_norm_corpo-5-shd-dkblue/char_u$(num).png)
34+
fontb12_0_sprites_cp = \
35+
$(foreach name,$(fontb12_0_charnames_nomod),$(top_srcdir)/font_norm_corpo-5-white/$(name).png)
36+
37+
data/fontb12-0.tab: data/fontb12-0.dat
38+
39+
data/fontb12-0.dat: font_norm_corpo-5-shd-dkblue/filelist-fontb12-0.txt $(top_srcdir)/data/engine-std.pal $(fontb12_0_sprites_gen)
40+
41+
font_norm_corpo-5-shd-dkblue/filelist-fontb12-0.txt: $(top_srcdir)/font_norm_corpo-5-white/filelist-fontb11-0.txt
42+
$(MKDIR_P) "$(@D)"
43+
cp -p -t "$(@D)" $(fontb12_0_sprites_cp)
44+
cp -p "$<" "$@"
45+
46+
# Use ImageMagick to generate blue sprites from previously made white shaded ones
47+
# 1. First use `level` to make lack and white sprite,
48+
# 2. `level` single channels to achieve front and shadow colors
49+
font_norm_corpo-5-shd-dkblue/%.png: font_norm_corpo-5-shd-white/%.png
50+
$(MKDIR_P) "$(@D)"
51+
$(MAGICK_CONVERT) "$<" -colorspace RGB \
52+
-channel RGB -level 30%,90% \
53+
-channel R +level 78%,17% \
54+
-channel G +level 70%,10% \
55+
-channel B +level 99%,31% \
56+
+channel \
57+
-colorspace RGB "png32:$@"

sprites-fontb7-0.am

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,3 @@ font_bulky_corpo-5-shd-dkblue/%.png: font_bulky_corpo-5-shd-white/%.png
4646
-channel B -evaluate multiply 0.86 \
4747
+channel \
4848
-colorspace RGB "png32:$@"
49-
50-
51-
52-
# $(MAGICK_CONVERT) \( "$<" +level 0,79% \)

sprites-fontb7-1.am

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,3 @@ font_bulky_corpo-10-shd-dkblue/%.png: font_bulky_corpo-10-shd-white/%.png
4646
-channel B -evaluate multiply 0.86 \
4747
+channel \
4848
-colorspace RGB "png32:$@"
49-
50-
51-
52-
# $(MAGICK_CONVERT) \( "$<" +level 0,79% \)

0 commit comments

Comments
 (0)