1
0
forked from mirrors/0ad

Remove fontbuilder & files

After 734386ce9f (that introduce freetype as a core of text rendering
engine), we dont need fontbuilder.py, neither files generated by that
tool.
This commit is contained in:
trompetin17
2025-05-16 16:43:42 -05:00
committed by trompetin17
parent c8c1522953
commit 8c85f32327
71 changed files with 0 additions and 100777 deletions
@@ -1,612 +0,0 @@
101
256 256
a
606
15
12
32 0 256 0 0 0 0 5
33 250 154 3 11 1 11 4
34 121 18 5 4 0 11 5
35 80 214 12 11 0 11 12
36 190 39 10 13 0 12 10
37 204 11 15 11 0 11 15
38 187 25 13 11 0 11 12
39 253 188 3 4 0 11 3
40 252 79 4 11 0 11 4
41 251 67 5 11 0 11 5
42 73 186 7 7 1 12 8
43 48 138 9 9 2 9 13
44 253 184 3 4 2 2 6
45 20 226 4 2 1 5 6
46 253 180 3 2 0 2 5
47 146 89 6 13 -1 11 4
48 154 73 10 11 0 11 10
49 250 11 6 11 2 11 11
50 164 73 10 11 0 11 10
51 86 75 10 11 1 11 11
52 174 75 10 11 0 11 10
53 232 75 10 11 0 11 10
54 12 77 10 11 0 11 10
55 226 166 8 11 1 11 10
56 72 77 10 11 0 11 10
57 96 79 10 11 0 11 10
58 32 224 3 8 1 8 5
59 29 224 3 10 1 8 5
60 74 138 9 9 2 9 13
61 111 61 9 5 2 7 13
62 84 138 9 9 2 9 13
63 81 190 9 11 0 11 8
64 0 14 16 14 0 11 16
65 39 49 11 11 0 11 11
66 204 79 10 11 1 11 11
67 51 49 11 11 0 11 11
68 63 49 11 11 1 11 12
69 117 190 9 11 1 11 10
70 122 162 8 11 1 11 10
71 161 49 11 11 0 11 11
72 173 49 11 11 1 11 12
73 58 128 3 11 1 11 4
74 145 188 9 11 0 11 9
75 214 79 10 11 1 11 11
76 13 186 9 11 1 11 10
77 204 23 14 11 1 11 15
78 97 51 11 11 1 11 12
79 185 51 11 11 0 11 11
80 242 79 10 11 1 11 11
81 201 48 11 12 0 11 11
82 0 81 10 11 1 11 11
83 241 51 11 11 0 11 11
84 23 186 9 11 0 11 9
85 75 53 11 11 0 11 11
86 184 83 10 11 0 11 10
87 126 11 16 11 0 11 16
88 122 214 12 11 -1 11 10
89 109 55 11 11 -1 11 9
90 170 156 8 11 1 11 10
91 185 107 5 11 0 11 5
92 114 99 6 13 -1 11 4
93 191 107 5 11 0 11 5
94 150 124 10 4 3 11 16
95 12 242 8 2 0 -3 8
96 12 49 3 3 2 11 8
97 145 132 9 8 0 8 9
98 33 186 9 11 0 11 9
99 155 132 9 8 0 8 9
100 43 186 9 11 0 11 9
101 165 132 9 8 0 8 9
102 197 107 5 11 0 11 5
103 53 186 9 11 0 8 9
104 178 156 8 11 0 11 8
105 62 128 3 11 0 11 3
106 230 192 4 14 0 11 4
107 227 142 7 11 0 11 7
108 84 128 3 11 0 11 3
109 157 200 13 8 1 8 14
110 224 76 8 8 0 8 8
111 175 132 9 8 0 8 9
112 63 186 9 11 0 8 9
113 91 186 9 11 0 8 9
114 74 106 8 8 0 8 7
115 185 132 9 8 0 8 9
116 57 138 7 10 0 10 7
117 136 106 8 8 0 8 8
118 144 106 8 8 0 8 7
119 60 94 12 8 0 8 12
120 222 106 8 8 0 8 8
121 101 186 9 11 -1 8 7
122 146 114 6 8 1 8 8
123 142 76 6 14 1 11 8
124 252 55 3 15 3 11 9
125 148 76 6 14 1 11 8
126 160 124 10 4 1 7 12
160 0 256 0 0 0 0 11
161 88 128 3 11 1 11 4
162 127 186 9 11 1 9 11
163 194 83 10 11 1 11 11
164 235 132 9 8 0 10 10
165 213 55 11 11 -1 11 9
166 250 192 3 14 3 11 9
167 1 184 9 11 0 11 9
168 121 24 5 2 1 11 7
169 97 27 13 11 0 11 13
170 103 174 7 7 0 11 7
171 40 115 7 5 0 7 8
172 134 136 11 5 2 7 14
173 128 202 4 2 1 5 6
174 29 35 13 11 0 11 13
175 0 186 4 2 2 11 8
176 238 108 6 6 0 11 5
177 102 138 9 9 2 8 13
178 10 108 8 8 0 11 8
179 176 116 7 8 0 11 7
180 200 17 4 3 2 11 8
181 22 85 10 11 -1 8 9
182 186 156 8 11 0 11 8
183 207 168 3 2 1 7 5
184 28 19 5 5 2 0 8
185 125 150 5 7 1 11 8
186 171 124 7 7 0 11 7
187 55 115 7 5 0 7 8
188 220 11 15 11 1 11 16
189 142 11 16 11 1 11 17
190 158 11 16 11 0 11 16
191 155 184 9 11 0 11 9
192 139 256 11 15 0 15 11
193 151 256 11 15 0 15 11
194 163 256 11 15 0 15 11
195 113 240 11 14 0 14 11
196 137 240 11 14 0 14 11
197 112 256 12 15 0 15 12
198 52 256 17 11 -2 11 15
199 175 256 11 15 0 11 11
200 246 27 9 15 1 15 10
201 88 29 9 15 1 15 10
202 112 29 9 15 1 15 10
203 216 226 9 14 1 14 10
204 8 200 4 15 0 15 4
205 112 200 4 15 1 15 4
206 15 53 5 15 0 15 4
207 48 242 5 14 -1 14 3
208 0 212 12 11 0 11 12
209 149 240 11 14 1 14 12
210 187 256 11 15 0 15 11
211 199 256 11 15 0 15 11
212 211 256 11 15 0 15 11
213 161 240 11 14 0 14 11
214 173 240 11 14 0 14 11
215 112 138 9 9 2 9 13
216 136 226 11 13 0 12 11
217 223 256 11 15 0 15 11
218 235 256 11 15 0 15 11
219 53 244 11 15 0 15 11
220 185 240 11 14 0 14 11
221 65 244 11 15 -1 15 9
222 32 85 10 11 1 11 11
223 194 156 8 11 0 11 8
224 165 180 9 11 0 11 9
225 175 180 9 11 0 11 9
226 185 180 9 11 0 11 9
227 195 180 9 11 0 11 9
228 205 180 9 11 0 11 9
229 103 224 9 12 0 12 9
230 212 44 14 8 0 8 14
231 13 198 9 12 0 8 9
232 235 180 9 11 0 11 9
233 73 178 9 11 0 11 9
234 111 178 9 11 0 11 9
235 215 178 9 11 0 11 9
236 56 109 4 11 -1 11 3
237 70 109 4 11 0 11 3
238 20 109 5 11 -1 11 3
239 26 109 5 11 -1 11 3
240 93 198 9 12 0 12 9
241 234 156 8 11 0 11 8
242 225 178 9 11 0 11 9
243 245 178 9 11 0 11 9
244 137 176 9 11 0 11 9
245 11 174 9 11 0 11 9
246 21 174 9 11 0 11 9
247 184 71 9 7 2 8 13
248 243 142 9 10 0 9 9
249 70 154 8 11 0 11 8
250 100 154 8 11 0 11 8
251 202 154 8 11 0 11 8
252 210 154 8 11 0 11 8
253 226 226 9 14 -1 11 7
254 236 226 9 14 0 11 9
255 0 200 8 14 0 11 8
884 121 22 5 4 0 11 5
885 241 28 5 4 0 2 5
890 200 21 4 3 1 0 5
894 253 200 3 11 1 8 4
900 12 53 3 3 1 11 4
901 94 228 7 3 -1 11 5
902 104 212 12 11 -1 11 10
903 211 168 3 2 1 6 5
904 225 55 11 11 -1 11 11
905 134 212 12 11 -1 11 11
906 32 109 5 11 -1 11 5
908 122 35 13 11 -1 11 12
910 136 35 13 11 -1 11 12
911 150 35 13 11 -1 11 12
912 9 138 7 11 -2 11 3
913 146 212 12 11 -1 11 10
914 42 85 10 11 0 11 10
915 218 154 8 11 1 11 9
916 1 57 11 11 0 11 11
917 52 85 10 11 1 11 11
918 31 174 9 11 0 11 10
919 62 85 10 11 1 11 11
920 158 212 12 11 0 11 12
921 253 154 3 11 1 11 5
922 106 85 10 11 0 11 10
923 197 59 11 11 0 11 10
924 170 212 12 11 0 11 12
925 116 85 10 11 1 11 11
926 226 154 8 11 1 11 10
927 182 212 12 11 0 11 12
928 154 85 10 11 1 11 11
929 164 85 10 11 0 11 10
931 242 154 8 11 1 11 10
932 41 174 9 11 0 11 9
933 27 61 11 11 0 11 11
934 48 26 13 12 0 11 13
935 194 212 12 11 -1 11 10
936 200 35 13 11 0 11 13
937 206 212 12 11 0 11 12
938 120 99 6 13 -1 13 4
939 58 228 12 13 -1 13 10
940 82 87 10 11 0 11 10
941 17 138 7 11 0 11 7
942 24 200 8 14 0 11 8
943 113 128 3 11 0 11 3
944 130 152 8 11 0 11 8
945 244 100 10 8 0 8 10
946 246 226 9 14 0 11 9
947 51 174 9 11 0 8 8
948 61 174 9 11 0 11 9
949 184 116 7 8 0 8 7
950 32 200 8 14 0 11 7
951 10 150 8 11 0 8 8
952 83 174 9 11 0 11 9
953 10 184 3 8 0 8 3
954 82 108 8 8 0 8 8
955 18 150 8 11 0 11 8
956 26 150 8 11 0 8 8
957 114 108 8 8 0 8 8
958 40 200 8 14 0 11 7
959 245 132 9 8 0 8 9
960 0 102 10 8 -1 8 9
961 93 174 9 11 0 8 9
962 34 150 8 11 0 8 8
963 224 97 10 9 0 9 10
964 66 118 6 8 0 8 6
965 202 108 8 8 0 8 8
966 39 61 11 11 0 8 11
967 121 174 9 11 0 8 8
968 51 61 11 11 0 8 11
969 171 200 13 8 0 8 13
970 38 109 5 11 -1 11 3
971 42 150 8 11 0 11 8
972 1 172 9 11 0 11 9
973 50 150 8 11 0 11 8
974 214 35 13 11 0 11 13
976 147 172 9 11 0 11 9
977 126 87 10 11 0 11 10
978 63 61 11 11 0 11 10
979 228 35 13 11 -1 11 11
980 147 226 11 13 -1 13 10
981 197 240 11 14 0 11 11
982 185 200 13 8 0 8 13
986 209 240 11 14 0 11 11
988 48 200 8 14 1 11 9
990 20 224 9 14 0 11 9
992 121 61 11 11 0 11 11
994 98 15 13 15 1 11 14
995 61 26 13 12 0 8 13
996 146 200 10 12 0 12 10
997 169 192 9 12 0 9 9
998 246 256 10 15 1 11 11
999 0 136 9 9 0 9 9
1000 157 168 9 11 0 11 9
1001 58 150 8 11 0 8 8
1002 136 87 10 11 0 11 10
1003 60 102 10 8 0 8 9
1004 179 192 9 12 0 12 9
1005 10 99 10 9 0 9 10
1006 174 87 10 11 0 11 9
1007 234 192 8 12 -1 9 6
1008 94 102 10 8 0 8 10
1009 189 192 9 12 0 8 9
1010 244 108 8 8 0 8 8
1011 219 192 5 14 -2 11 3
1025 110 43 10 13 1 13 11
1026 1 37 13 11 0 11 13
1027 134 75 8 13 1 13 9
1028 133 61 11 11 0 11 11
1029 224 87 10 11 0 11 10
1030 117 128 3 11 1 11 5
1031 152 99 6 13 -1 13 4
1032 78 150 8 11 0 11 8
1033 32 11 18 11 -1 11 17
1034 174 11 16 11 1 11 17
1035 15 37 13 11 0 11 13
1036 136 200 9 13 1 13 10
1038 221 240 11 14 0 14 10
1039 0 226 10 14 1 11 11
1040 218 212 12 11 -1 11 10
1041 10 89 10 11 1 11 11
1042 72 89 10 11 0 11 10
1043 86 150 8 11 1 11 9
1044 36 242 12 14 -1 11 11
1045 92 91 10 11 1 11 11
1046 235 11 15 11 0 11 15
1047 204 91 10 11 0 11 10
1048 214 91 10 11 1 11 11
1049 28 49 10 13 1 13 11
1050 167 168 9 11 1 11 10
1051 145 61 11 11 -1 11 10
1052 230 212 12 11 0 11 12
1053 234 91 10 11 1 11 11
1054 242 212 12 11 0 11 12
1055 244 91 10 11 1 11 11
1056 0 93 10 11 0 11 10
1057 157 61 11 11 0 11 11
1058 177 168 9 11 0 11 9
1059 169 61 11 11 0 11 10
1060 12 210 12 11 0 11 12
1061 92 210 12 11 -1 11 10
1062 88 242 12 14 1 11 13
1063 184 95 10 11 0 11 10
1064 43 37 13 11 1 11 14
1065 51 14 15 14 1 11 16
1066 57 37 13 11 0 11 13
1067 71 37 13 11 1 11 14
1068 194 95 10 11 1 11 11
1069 87 63 11 11 0 11 11
1070 33 23 15 11 1 11 16
1071 80 202 12 11 -1 11 11
1072 65 130 9 8 0 8 9
1073 187 168 9 11 0 11 9
1074 0 110 8 8 0 8 8
1075 92 118 6 8 0 8 6
1076 86 52 10 10 -1 8 9
1077 93 130 9 8 0 8 9
1078 158 94 11 8 0 8 11
1079 192 116 7 8 0 8 7
1080 60 110 8 8 0 8 8
1081 108 150 8 11 0 11 8
1082 200 116 7 8 0 8 7
1083 121 130 9 8 0 8 9
1084 104 102 10 8 0 8 10
1085 90 110 8 8 0 8 8
1086 131 130 9 8 0 8 9
1087 98 110 8 8 0 8 8
1088 197 168 9 11 0 8 9
1089 106 110 8 8 0 8 8
1090 238 116 7 8 0 8 7
1091 116 150 8 11 0 8 8
1092 191 14 13 14 0 11 13
1093 152 110 8 8 0 8 8
1094 235 168 9 11 0 8 9
1095 160 110 8 8 0 8 8
1096 198 200 13 8 0 8 13
1097 163 37 13 11 0 8 13
1098 158 102 10 8 0 8 10
1099 127 96 11 8 0 8 11
1100 230 110 8 8 0 8 8
1101 246 116 7 8 0 8 8
1102 102 94 12 8 0 8 12
1103 122 112 8 8 0 8 8
1105 71 166 9 11 0 11 9
1106 94 224 9 14 0 11 9
1107 216 103 6 11 0 11 6
1108 0 118 7 8 1 8 8
1109 168 112 8 8 0 8 8
1110 41 126 3 11 0 11 3
1111 44 109 5 11 -1 11 4
1112 224 192 5 14 -2 11 3
1113 226 44 14 8 0 8 14
1114 212 200 13 8 0 8 13
1115 103 166 9 11 0 11 9
1116 25 138 7 11 0 11 7
1118 56 200 8 14 0 11 8
1119 0 148 8 11 0 8 8
1120 127 23 15 11 0 11 15
1121 226 200 13 8 0 8 13
1122 181 63 11 11 0 11 11
1123 207 166 9 11 0 11 9
1124 218 23 14 11 1 11 15
1125 170 96 11 8 0 8 11
1126 237 63 11 11 0 11 11
1127 72 98 11 8 -1 8 9
1128 232 23 14 11 1 11 15
1129 240 200 13 8 0 8 12
1130 13 65 11 11 -1 11 9
1131 138 98 11 8 -1 8 9
1132 143 23 15 11 1 11 15
1133 156 192 13 8 0 8 12
1134 102 256 10 17 0 14 10
1135 64 200 8 14 0 11 8
1136 177 37 13 11 0 11 13
1137 75 65 11 11 0 8 11
1138 99 67 11 11 1 11 13
1139 210 112 8 8 1 8 10
1140 209 67 11 11 0 11 11
1141 74 114 8 8 0 8 8
1142 232 240 11 14 0 14 11
1143 138 148 8 11 0 11 8
1144 0 256 20 14 0 11 20
1145 70 256 17 11 0 8 17
1146 84 42 12 12 0 11 12
1147 195 130 9 8 0 8 9
1148 20 256 15 15 0 15 15
1149 75 26 13 12 0 12 13
1150 67 14 15 14 0 14 15
1151 97 39 13 11 0 11 13
1152 158 226 11 13 0 11 11
1153 136 186 9 10 0 8 9
1154 20 97 10 11 0 11 11
1155 110 184 7 3 -1 12 5
1156 146 176 6 3 0 12 6
1157 82 178 7 3 -1 12 6
1158 120 178 7 3 0 12 6
1168 20 52 7 14 1 14 7
1169 178 107 6 11 0 11 5
1170 217 166 9 11 0 11 9
1171 98 118 6 8 0 8 6
1172 10 226 10 14 1 11 11
1173 72 200 8 14 0 11 8
1174 16 14 16 14 0 11 15
1175 116 202 12 11 0 8 11
1176 30 214 9 14 0 11 9
1177 33 138 7 11 0 8 7
1178 40 214 9 14 1 11 9
1179 146 144 8 11 0 8 7
1180 245 166 9 11 1 11 10
1181 16 118 7 8 0 8 7
1182 30 97 10 11 0 11 10
1183 24 118 7 8 0 8 7
1184 242 39 13 11 -1 11 12
1185 126 104 10 8 0 8 9
1186 244 240 11 14 1 11 12
1187 131 164 9 11 0 8 9
1188 0 25 14 11 1 11 15
1189 168 104 10 8 0 8 10
1190 76 244 11 15 1 11 12
1191 199 192 9 12 0 8 9
1192 124 242 12 14 0 11 12
1193 11 162 9 11 0 8 9
1194 101 238 11 14 0 11 11
1195 21 162 9 11 0 8 9
1196 50 214 9 14 0 11 9
1197 41 138 7 11 0 8 7
1198 221 67 11 11 0 11 11
1199 31 162 9 11 0 8 8
1200 1 69 11 11 0 11 10
1201 41 162 9 11 -1 8 7
1202 12 240 12 14 -1 11 10
1203 51 162 9 11 0 8 8
1204 83 14 15 14 0 11 15
1205 193 71 11 11 0 8 11
1206 35 228 11 14 0 11 10
1207 61 162 9 11 0 8 8
1208 40 97 10 11 0 11 10
1209 130 114 8 8 0 8 8
1210 50 97 10 11 1 11 11
1211 154 144 8 11 0 11 8
1212 14 25 14 11 -1 11 13
1213 83 100 11 8 -1 8 10
1214 112 14 14 14 -1 11 13
1215 25 73 11 11 -1 8 10
1216 45 126 3 11 1 11 5
1217 87 256 15 13 0 13 15
1218 37 73 11 11 0 11 11
1219 24 240 10 15 1 11 10
1220 242 192 8 12 0 8 7
1223 0 242 11 15 1 11 12
1224 209 192 9 12 0 8 9
1227 112 226 10 14 0 11 10
1228 162 144 8 11 0 8 8
1232 70 228 12 13 -1 13 10
1233 81 162 9 11 0 11 9
1234 82 228 12 13 -1 13 10
1235 170 144 8 11 0 11 9
1236 158 23 15 11 0 11 16
1237 0 46 14 8 0 8 15
1238 60 214 9 14 1 14 11
1239 91 162 9 11 0 11 9
1240 49 73 11 11 0 11 11
1241 205 130 9 8 0 8 9
1242 169 226 11 13 0 13 11
1243 113 162 9 11 0 11 9
1244 36 256 16 13 -1 13 14
1245 61 73 11 11 0 11 11
1246 120 49 10 13 0 13 10
1247 178 144 8 11 0 11 8
1248 1 160 9 11 0 11 9
1249 186 144 8 11 0 8 8
1250 130 49 10 13 1 13 11
1251 194 144 8 11 0 11 8
1252 140 49 10 13 1 13 11
1253 234 144 8 11 0 11 9
1254 124 228 12 13 0 13 12
1255 141 160 9 11 0 11 9
1256 111 73 11 11 1 11 13
1257 138 114 8 8 1 8 10
1258 181 226 11 13 1 13 13
1259 66 142 8 11 1 11 10
1262 193 226 11 13 0 13 10
1263 70 214 9 14 0 11 8
1264 205 226 11 13 0 13 11
1265 104 200 8 14 0 11 8
1266 46 228 11 14 0 14 10
1267 128 200 8 14 0 11 8
1268 150 49 10 13 0 13 10
1269 94 142 8 11 0 11 8
1272 173 25 13 13 1 13 14
1273 123 73 11 11 0 11 11
1425 43 26 5 2 1 -1 7
1426 12 212 6 2 0 10 6
1427 34 240 2 5 2 12 6
1428 24 55 3 3 2 11 6
1429 84 29 4 3 1 11 6
1430 131 166 3 2 1 -1 5
1431 48 14 2 2 2 10 6
1432 28 23 5 3 1 10 6
1433 243 68 5 4 -1 11 6
1434 90 190 3 4 3 0 6
1435 4 186 4 2 1 -1 6
1436 152 176 3 4 1 11 5
1437 162 172 3 4 3 11 6
1438 196 43 5 3 1 11 6
1439 99 56 7 4 -1 11 5
1440 164 184 4 4 3 11 6
1441 196 47 5 3 0 11 6
1443 110 180 4 2 1 -1 6
1444 80 166 3 4 1 0 6
1445 186 14 5 2 1 -1 7
1446 156 172 6 3 0 0 6
1447 208 55 4 3 1 0 6
1448 83 92 5 4 1 11 7
1449 140 164 4 4 -1 11 6
1450 164 26 5 2 1 -1 7
1451 109 154 3 4 1 12 6
1452 214 180 4 2 1 11 6
1453 203 156 3 2 3 -1 6
1454 236 47 5 3 -1 10 6
1455 192 59 4 3 1 10 6
1456 106 55 3 3 2 0 6
1457 112 166 6 3 0 0 6
1458 208 51 5 3 0 0 5
1459 236 51 5 3 0 0 5
1460 67 150 3 2 2 -1 6
1461 244 180 4 2 1 -1 6
1462 232 59 4 3 1 0 6
1463 67 148 3 2 1 -1 5
1464 147 148 3 2 1 -1 5
1465 67 146 3 2 2 10 6
1467 192 55 5 3 0 0 6
1468 147 146 3 2 2 5 6
1469 67 144 3 2 2 -1 7
1470 38 38 5 2 0 8 5
1471 75 142 3 2 1 10 5
1472 117 212 3 10 0 9 3
1473 103 142 3 2 2 10 6
1474 125 142 3 2 2 10 6
1475 70 174 3 8 0 8 3
1476 253 142 3 2 2 10 6
1488 215 130 9 8 0 8 9
1489 218 114 8 8 1 8 9
1490 32 118 7 8 0 8 7
1491 48 118 7 8 0 8 7
1492 225 130 9 8 0 8 9
1493 130 174 5 8 0 8 5
1494 24 210 5 9 0 9 5
1495 49 128 9 8 0 8 9
1496 75 128 9 8 0 8 9
1497 211 104 5 4 0 8 5
1498 202 142 8 11 0 8 8
1499 8 116 8 8 0 8 8
1500 210 142 8 11 0 11 8
1501 103 128 9 8 0 8 9
1502 1 126 9 8 0 8 9
1503 50 109 5 11 0 8 5
1504 94 150 5 8 0 8 5
1505 11 126 9 8 0 8 9
1506 124 140 9 10 0 8 9
1507 151 156 9 11 0 8 9
1508 21 126 9 8 0 8 9
1509 218 142 8 11 0 8 8
1510 82 116 8 8 0 8 8
1511 161 156 9 11 0 8 9
1512 114 116 8 8 0 8 8
1513 204 100 11 8 0 8 11
1514 234 101 10 9 0 8 10
1520 31 126 9 8 0 8 9
1521 141 124 9 8 0 8 9
1522 75 42 9 4 0 8 9
1523 150 160 4 4 0 10 3
1524 235 80 7 4 0 10 6
65075 248 67 3 15 -1 13 16
65533 124 256 14 13 1 12 16
Binary file not shown.
@@ -7,17 +7,9 @@ The following files are covered by the license in FreeFont-LICENSE.txt:
FreeSansBold.ttf
FreeSansOblique.ttf
FreeSans.ttf
FreeSerifBold.ttf
FreeSerif.ttf
The following files are covered by the license in LibBiolinum-LICENSE.txt:
LinBiolinum_Kah.ttf
LinBiolinum_Rah.ttf
LinBiolinum_RBah.ttf
LinBiolinum_RIah.ttf
The following files are covered by the license in GUST-FONT-LICENSE.txt:
texgyrepagella-regular.otf
texgyrepagella-bold.otf
The texgyrepagella... fonts come from http://www.gust.org.pl/projects/e-foundry/tex-gyre/pagella
File diff suppressed because it is too large Load Diff
Binary file not shown.
File diff suppressed because it is too large Load Diff
Binary file not shown.
File diff suppressed because it is too large Load Diff
Binary file not shown.
File diff suppressed because it is too large Load Diff
Binary file not shown.
File diff suppressed because it is too large Load Diff
Binary file not shown.
File diff suppressed because it is too large Load Diff
Binary file not shown.
File diff suppressed because it is too large Load Diff
Binary file not shown.
File diff suppressed because it is too large Load Diff
Binary file not shown.
File diff suppressed because it is too large Load Diff
Binary file not shown.
File diff suppressed because it is too large Load Diff
Binary file not shown.
File diff suppressed because it is too large Load Diff
Binary file not shown.
File diff suppressed because it is too large Load Diff
Binary file not shown.
File diff suppressed because it is too large Load Diff
Binary file not shown.
File diff suppressed because it is too large Load Diff
Binary file not shown.
File diff suppressed because it is too large Load Diff
Binary file not shown.
File diff suppressed because it is too large Load Diff
Binary file not shown.
File diff suppressed because it is too large Load Diff
Binary file not shown.
File diff suppressed because it is too large Load Diff
Binary file not shown.
File diff suppressed because it is too large Load Diff
Binary file not shown.
File diff suppressed because it is too large Load Diff
Binary file not shown.
File diff suppressed because it is too large Load Diff
Binary file not shown.
File diff suppressed because it is too large Load Diff
Binary file not shown.
File diff suppressed because it is too large Load Diff
Binary file not shown.
@@ -1,99 +0,0 @@
Fonts are (c) Bitstream (see below). DejaVu changes are in public domain.
Glyphs imported from Arev fonts are (c) Tavmjong Bah (see below)
Bitstream Vera Fonts Copyright
------------------------------
Copyright (c) 2003 by Bitstream, Inc. All Rights Reserved. Bitstream Vera is
a trademark of Bitstream, Inc.
Permission is hereby granted, free of charge, to any person obtaining a copy
of the fonts accompanying this license ("Fonts") and associated
documentation files (the "Font Software"), to reproduce and distribute the
Font Software, including without limitation the rights to use, copy, merge,
publish, distribute, and/or sell copies of the Font Software, and to permit
persons to whom the Font Software is furnished to do so, subject to the
following conditions:
The above copyright and trademark notices and this permission notice shall
be included in all copies of one or more of the Font Software typefaces.
The Font Software may be modified, altered, or added to, and in particular
the designs of glyphs or characters in the Fonts may be modified and
additional glyphs or characters may be added to the Fonts, only if the fonts
are renamed to names not containing either the words "Bitstream" or the word
"Vera".
This License becomes null and void to the extent applicable to Fonts or Font
Software that has been modified and is distributed under the "Bitstream
Vera" names.
The Font Software may be sold as part of a larger software package but no
copy of one or more of the Font Software typefaces may be sold by itself.
THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF COPYRIGHT, PATENT,
TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL BITSTREAM OR THE GNOME
FOUNDATION BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, INCLUDING
ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL DAMAGES,
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF
THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM OTHER DEALINGS IN THE
FONT SOFTWARE.
Except as contained in this notice, the names of Gnome, the Gnome
Foundation, and Bitstream Inc., shall not be used in advertising or
otherwise to promote the sale, use or other dealings in this Font Software
without prior written authorization from the Gnome Foundation or Bitstream
Inc., respectively. For further information, contact: fonts at gnome dot
org.
Arev Fonts Copyright
------------------------------
Copyright (c) 2006 by Tavmjong Bah. All Rights Reserved.
Permission is hereby granted, free of charge, to any person obtaining
a copy of the fonts accompanying this license ("Fonts") and
associated documentation files (the "Font Software"), to reproduce
and distribute the modifications to the Bitstream Vera Font Software,
including without limitation the rights to use, copy, merge, publish,
distribute, and/or sell copies of the Font Software, and to permit
persons to whom the Font Software is furnished to do so, subject to
the following conditions:
The above copyright and trademark notices and this permission notice
shall be included in all copies of one or more of the Font Software
typefaces.
The Font Software may be modified, altered, or added to, and in
particular the designs of glyphs or characters in the Fonts may be
modified and additional glyphs or characters may be added to the
Fonts, only if the fonts are renamed to names not containing either
the words "Tavmjong Bah" or the word "Arev".
This License becomes null and void to the extent applicable to Fonts
or Font Software that has been modified and is distributed under the
"Tavmjong Bah Arev" names.
The Font Software may be sold as part of a larger software package but
no copy of one or more of the Font Software typefaces may be sold by
itself.
THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL
TAVMJONG BAH BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
OTHER DEALINGS IN THE FONT SOFTWARE.
Except as contained in this notice, the name of Tavmjong Bah shall not
be used in advertising or otherwise to promote the sale, use or other
dealings in this Font Software without prior written authorization
from Tavmjong Bah. For further information, contact: tavmjong @ free
. fr.
$Id: LICENSE 2133 2007-11-28 02:46:28Z lechimp $
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -1,30 +0,0 @@
% This is a preliminary version (2006-09-30), barring acceptance from
% the LaTeX Project Team and other feedback, of the GUST Font License.
% (GUST is the Polish TeX Users Group, http://www.gust.org.pl)
%
% For the most recent version of this license see
% http://www.gust.org.pl/fonts/licenses/GUST-FONT-LICENSE.txt
% or
% http://tug.org/fonts/licenses/GUST-FONT-LICENSE.txt
%
% This work may be distributed and/or modified under the conditions
% of the LaTeX Project Public License, either version 1.3c of this
% license or (at your option) any later version.
%
% Please also observe the following clause:
% 1) it is requested, but not legally required, that derived works be
% distributed only after changing the names of the fonts comprising this
% work and given in an accompanying "manifest", and that the
% files comprising the Work, as listed in the manifest, also be given
% new names. Any exceptions to this request are also given in the
% manifest.
%
% We recommend the manifest be given in a separate file named
% MANIFEST-<fontid>.txt, where <fontid> is some unique identification
% of the font family. If a separate "readme" file accompanies the Work,
% we recommend a name of the form README-<fontid>.txt.
%
% The latest version of the LaTeX Project Public License is in
% http://www.latex-project.org/lppl.txt and version 1.3c or later
% is part of all distributions of LaTeX version 2006/05/20 or later.
@@ -1,12 +0,0 @@
Libertine and Biolinum
License
Free UCS scalable fonts is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version.
The fonts are distributed in the hope that they will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
As a special exception, if you create a document which uses this font, and embed this font or unaltered portions of this font into the document, this font does not by itself cause the resulting document to be covered by the GNU General Public License. This exception does not however invalidate any other reasons why the document might be covered by the GNU General Public License. If you modify this font, you may extend this exception to your version of the font, but you are not obligated to do so. If you do not wish to do so, delete this exception statement from your version.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
-70
View File
@@ -1,70 +0,0 @@
# 0 A.D. Font Builder
The Font Builder generates pre-rendered font glyphs for use in the game engine. Its output for each
font consists of an 8-bit greyscale PNG image and a descriptor .fnt file that describes and locates
each individual glyph in the image (see `fileformat.txt` for details).
See the wiki page for more information:
https://gitea.wildfiregames.com/0ad/0ad/wiki/Font_Builder2
## Prerequisites
The main prerequisite for the fontbuilder is the Cairo imaging library and its Python bindings,
PyCairo. On most Linux distributions, this should be merely a matter of installing a package (e.g.
`python3-cairo` for Debian/Ubuntu), but on Windows it's more involved.
We'll demonstrate the process for Windows 32-bit first. Grab a Win32 binary for PyCairo from
http://ftp.gnome.org/pub/GNOME/binaries/win32/pycairo/1.8/
and install it using the installer. There are installers available for Python versions 2.6 and 2.7.
The installer extracts the necessary files into Lib\site-packages\cairo within your Python
installation directory.
Next is Cairo itself, and some dependencies which are required for Cairo to work. Head to
http://ftp.gnome.org/pub/gnome/binaries/win32/dependencies/
and get the following binaries. Listed next to each are their version numbers at the time of
writing; these may vary over time, so be adaptive!
- Cairo (cairo_1.8.10-3_win32.zip)
- Fontconfig (fontconfig_2.8.0-2_win32.zip)
- Freetype (freetype_2.4.4-1_win32.zip)
- Expat (expat_2.0.1-1_win32.zip)
- libpng (libpng_1.4.3-1_win32.zip)
- zlib (zlib_1.2.5-2_win32.zip).
Each ZIP file will contain a bin subfolder with a DLL file in it. Put the following DLLs in
`Lib\site-packages\cairo` within your Python installation:
libcairo-2.dll (from cairo_1.8.10-3_win32.zip)
libfontconfig-1.dll (from fontconfig_2.8.0-2_win32.zip)
freetype6.dll (from freetype_2.4.4-1_win32.zip)
libexpat-1.dll (from expat_2.0.1-1_win32.zip)
libpng14-14.dll (from libpng_1.4.3-1_win32.zip)
zlib1.dll (from zlib_1.2.5-2_win32.zip)
You should be all set now. To test whether PyCairo installed successfully, try running the
following command on a command line:
python -c "import cairo"
If it doesn't complain, then it's installed successfully.
On Windows 64-bit, the process is similar, but no pre-built PyCairo executable appears to be
available from Gnome at the time of writing. Instead, you can install PyGTK+ for 64-bit Windows,
which includes Cairo, PyCairo, and the same set of dependencies. See this page for details:
http://www.pygtk.org/downloads.html
## Running
Running the font-builder is fairly straight-forward; there are no configuration options. One
caveat is that you must run it from its own directory as the current directory.
python fontbuilder.py
This will generate the output .png and .fnt files straight into the `binaries/data/mods/mod/fonts`
directory, ready for in-game use.
File diff suppressed because it is too large Load Diff
@@ -1,22 +0,0 @@
# Dumps lines containing the name of a font followed by a space-separated
# list of decimal codepoints (from U+0001 to U+FFFF) for which that font
# contains some glyph data.
import font_loader
def dump_font(ttf):
(face, indexes) = font_loader.create_cairo_font_face_for_file(
f"../../../binaries/data/tools/fontbuilder/fonts/{ttf}", 0, font_loader.FT_LOAD_DEFAULT
)
mappings = [(c, indexes(chr(c))) for c in range(1, 65535)]
print(ttf, end=" ")
print(" ".join(str(c) for (c, g) in mappings if g != 0))
dump_font("DejaVuSansMono.ttf")
dump_font("FreeSans.ttf")
dump_font("LinBiolinum_Rah.ttf")
dump_font("texgyrepagella-regular.otf")
dump_font("texgyrepagella-bold.otf")
-45
View File
@@ -1,45 +0,0 @@
Fonts consist of
fontname.fnt
fontname.png
and you load fonts by just specifying the "path/fontname" part.
The .png is an 8-bit greyscale image, used for alpha-blending the text.
(DXTC allows 0.5 bytes/pixel at best, which isn't much better than
PNG's 1 byte/pixel, and DXTC's lossiness is almost noticeable,
so we stick with lossless formats.)
Or it's a 32-bit RGBA image, to allow more complex text styles.
The .fnt file is something like:
101
512 256
a
3
16
12
32 0 0 10 10 12
33 10 0 6 10 7
3300 16 0 6 10 7
First line = version number of file, for slightly better error
detection if people leave old ones hanging around.
Second line = size of texture (width/height).
Third line = texture format: "a" or "rgba".
Fourth line = number of glyphs in the font.
Fifth line = line spacing (pixels between each baseline)
Sixth line = text 'height' (height of the "I" glyph, possibly manually
adjusted so that vertical centering works)
Each subsequent line is
<code point> <x> <y> <width> <height> <x offset> <y offset> <advance>
0 <= Code point < 2^16.
x, y, width, height are in pixels on the texture.
x/y offset are the position of the texture relative to the glyph's origin.
advance is the number of pixels to move along for the next character.
-78
View File
@@ -1,78 +0,0 @@
# Adapted from http://cairographics.org/freetypepython/
# ruff: noqa: TRY002
import ctypes
import sys
from typing import ClassVar
import cairo
CAIRO_STATUS_SUCCESS = 0
FT_Err_Ok = 0
FT_LOAD_DEFAULT = 0x0
FT_LOAD_NO_HINTING = 0x2
FT_LOAD_FORCE_AUTOHINT = 0x20
FT_LOAD_NO_AUTOHINT = 0x8000
# find required libraries (platform specific)
if sys.platform == "win32":
ft_lib = "freetype6.dll"
lc_lib = "libcairo-2.dll"
else:
ft_lib = "libfreetype.so.6"
lc_lib = "libcairo.so.2"
_freetype_so = ctypes.CDLL(ft_lib)
_cairo_so = ctypes.CDLL(lc_lib)
_cairo_so.cairo_ft_font_face_create_for_ft_face.restype = ctypes.c_void_p
_cairo_so.cairo_ft_font_face_create_for_ft_face.argtypes = [ctypes.c_void_p, ctypes.c_int]
_cairo_so.cairo_set_font_face.argtypes = [ctypes.c_void_p, ctypes.c_void_p]
_cairo_so.cairo_font_face_status.argtypes = [ctypes.c_void_p]
_cairo_so.cairo_status.argtypes = [ctypes.c_void_p]
# initialize freetype
_ft_lib = ctypes.c_void_p()
if FT_Err_Ok != _freetype_so.FT_Init_FreeType(ctypes.byref(_ft_lib)):
raise Exception("Error initializing FreeType library.")
_surface = cairo.ImageSurface(cairo.FORMAT_A8, 0, 0)
class PycairoContext(ctypes.Structure):
_fields_: ClassVar = [
("PyObject_HEAD", ctypes.c_byte * object.__basicsize__),
("ctx", ctypes.c_void_p),
("base", ctypes.c_void_p),
]
def create_cairo_font_face_for_file(filename, faceindex=0, loadoptions=0):
# create freetype face
ft_face = ctypes.c_void_p()
cairo_ctx = cairo.Context(_surface)
cairo_t = PycairoContext.from_address(id(cairo_ctx)).ctx
if FT_Err_Ok != _freetype_so.FT_New_Face(
_ft_lib, filename.encode("ascii"), faceindex, ctypes.byref(ft_face)
):
raise Exception("Error creating FreeType font face for " + filename)
# create cairo font face for freetype face
cr_face = _cairo_so.cairo_ft_font_face_create_for_ft_face(ft_face, loadoptions)
if _cairo_so.cairo_font_face_status(cr_face) != CAIRO_STATUS_SUCCESS:
raise Exception("Error creating cairo font face for " + filename)
_cairo_so.cairo_set_font_face(cairo_t, cr_face)
if _cairo_so.cairo_status(cairo_t) != CAIRO_STATUS_SUCCESS:
raise Exception("Error creating cairo font face for " + filename)
face = cairo_ctx.get_font_face()
def indexes(char):
return _freetype_so.FT_Get_Char_Index(ft_face, ord(char))
return (face, indexes)
-242
View File
@@ -1,242 +0,0 @@
#!/usr/bin/env python3
import math
import cairo
import font_loader
import packer
# Representation of a rendered glyph
class Glyph:
def __init__(self, ctx, renderstyle, char, idx, face, size):
self.renderstyle = renderstyle
self.char = char
self.idx = idx
self.face = face
self.size = size
self.glyph = (idx, 0, 0)
if ctx.get_font_face() != self.face:
ctx.set_font_face(self.face)
ctx.set_font_size(self.size)
extents = ctx.glyph_extents([self.glyph])
self.xadvance = round(extents[4])
# Find the bounding box of strokes and/or fills:
inf = 1e300 * 1e300
bb = [inf, inf, -inf, -inf]
if "stroke" in self.renderstyle:
for _c, w in self.renderstyle["stroke"]:
ctx.set_line_width(w)
ctx.glyph_path([self.glyph])
e = ctx.stroke_extents()
bb = (min(bb[0], e[0]), min(bb[1], e[1]), max(bb[2], e[2]), max(bb[3], e[3]))
ctx.new_path()
if "fill" in self.renderstyle:
ctx.glyph_path([self.glyph])
e = ctx.fill_extents()
bb = (min(bb[0], e[0]), min(bb[1], e[1]), max(bb[2], e[2]), max(bb[3], e[3]))
ctx.new_path()
bb = (math.floor(bb[0]), math.floor(bb[1]), math.ceil(bb[2]), math.ceil(bb[3]))
self.x0 = -bb[0]
self.y0 = -bb[1]
self.w = bb[2] - bb[0]
self.h = bb[3] - bb[1]
def pack(self, packer_instance):
self.pos = packer_instance.pack(self.w, self.h)
def render(self, ctx):
if ctx.get_font_face() != self.face:
ctx.set_font_face(self.face)
ctx.set_font_size(self.size)
ctx.save()
ctx.translate(self.x0, self.y0)
ctx.translate(self.pos.x, self.pos.y)
# Render each stroke, and then each fill on top of it
if "stroke" in self.renderstyle:
for (r, g, b, a), w in self.renderstyle["stroke"]:
ctx.set_line_width(w)
ctx.set_source_rgba(r, g, b, a)
ctx.glyph_path([self.glyph])
ctx.stroke()
if "fill" in self.renderstyle:
for r, g, b, a in self.renderstyle["fill"]:
ctx.set_source_rgba(r, g, b, a)
ctx.glyph_path([self.glyph])
ctx.fill()
ctx.restore()
# Load the set of characters contained in the given text file
def load_char_list(filename):
with open(filename, encoding="utf-8") as f:
chars = f.read()
return set(chars)
# Construct a Cairo context and surface for rendering text with the given parameters
def setup_context(width, height, renderstyle):
surface_format = cairo.FORMAT_ARGB32 if "colour" in renderstyle else cairo.FORMAT_A8
surface = cairo.ImageSurface(surface_format, width, height)
ctx = cairo.Context(surface)
ctx.set_line_join(cairo.LINE_JOIN_ROUND)
return ctx, surface
def generate_font(outname, ttf_names, loadopts, size, renderstyle, dsizes):
face_list = []
index_list = []
for i in range(len(ttf_names)):
(face, indices) = font_loader.create_cairo_font_face_for_file(
f"../../../binaries/data/tools/fontbuilder/fonts/{ttf_names[i]}", 0, loadopts
)
face_list.append(face)
if ttf_names[i] not in dsizes:
dsizes[ttf_names[i]] = 0
index_list.append(indices)
(ctx, _) = setup_context(1, 1, renderstyle)
# TODO: this gets the line height from the default font
# while entire texts can be in the fallback font
ctx.set_font_face(face_list[0])
ctx.set_font_size(size + dsizes[ttf_names[0]])
(_, _, linespacing, _, _) = ctx.font_extents()
# Estimate the 'average' height of text, for vertical center alignment
charheight = round(ctx.glyph_extents([(index_list[0]("I"), 0.0, 0.0)])[3])
# Translate all the characters into glyphs
# (This is inefficient if multiple characters have the same glyph)
glyphs = []
# for c in chars:
for c in range(0x20, 0xFFFE):
for i in range(len(index_list)):
idx = index_list[i](chr(c))
if c == 0xFFFD and idx == 0: # use "?" if the missing-glyph glyph is missing
idx = index_list[i]("?")
if idx:
glyphs.append(
Glyph(ctx, renderstyle, chr(c), idx, face_list[i], size + dsizes[ttf_names[i]])
)
break
# Sort by decreasing height (tie-break on decreasing width)
glyphs.sort(key=lambda g: (-g.h, -g.w))
# Try various sizes to pack the glyphs into
sizes = []
for h in [32, 64, 128, 256, 512, 1024, 2048, 4096]:
sizes.append((h, h))
sizes.append((h * 2, h))
sizes.sort(
key=lambda w_h: (w_h[0] * w_h[1], max(w_h[0], w_h[1]))
) # prefer smaller and squarer
for w, h in sizes:
try:
# Using the dump pacher usually creates bigger textures, but runs faster
# In practice the size difference is so small it always ends up in the same size
packer_instance = packer.DumbRectanglePacker(w, h)
for g in glyphs:
g.pack(packer_instance)
except packer.OutOfSpaceError:
continue
ctx, surface = setup_context(w, h, renderstyle)
for g in glyphs:
g.render(ctx)
surface.write_to_png(f"{outname}.png")
# Output the .fnt file with all the glyph positions etc
with open(f"{outname}.fnt", "w", encoding="utf-8") as fnt:
fnt.write("101\n")
fnt.write(f"{w} {h}\n")
fnt.write("%s\n" % ("rgba" if "colour" in renderstyle else "a"))
fnt.write(f"{len(glyphs)}\n")
fnt.write(f"{linespacing}\n")
fnt.write(f"{charheight}\n")
for g in glyphs:
x0 = g.x0
y0 = g.y0
# UGLY HACK: see https://gitea.wildfiregames.com/0ad/0ad/issues/1039 ;
# to handle a-macron-acute characters without the hassle of
# doing proper OpenType GPOS layout (which the font
# doesn't support anyway), we'll just shift the combining acute
# glyph by an arbitrary amount to make it roughly the right
# place when used after an a-macron glyph.
if ord(g.char) == 0x0301:
y0 += charheight / 3
fnt.write(
f"{ord(g.char)} {g.pos.x} {h - g.pos.y} {g.w} {g.h} {-x0} {g.xadvance}\n"
)
return
print("Failed to fit glyphs in texture")
filled = {"fill": [(1, 1, 1, 1)]}
stroked1 = {
"colour": True,
"stroke": [((0, 0, 0, 1), 2.0), ((0, 0, 0, 1), 2.0)],
"fill": [(1, 1, 1, 1)],
}
stroked2 = {"colour": True, "stroke": [((0, 0, 0, 1), 2.0)], "fill": [(1, 1, 1, 1), (1, 1, 1, 1)]}
stroked3 = {"colour": True, "stroke": [((0, 0, 0, 1), 2.5)], "fill": [(1, 1, 1, 1), (1, 1, 1, 1)]}
# For extra glyph support, add your preferred font to the font array
Sans = (["LinBiolinum_Rah.ttf", "FreeSans.ttf"], font_loader.FT_LOAD_DEFAULT)
Sans_Bold = (["LinBiolinum_RBah.ttf", "FreeSansBold.ttf"], font_loader.FT_LOAD_DEFAULT)
Sans_Italic = (["LinBiolinum_RIah.ttf", "FreeSansOblique.ttf"], font_loader.FT_LOAD_DEFAULT)
SansMono = (["DejaVuSansMono.ttf", "FreeMono.ttf"], font_loader.FT_LOAD_DEFAULT)
Serif = (["texgyrepagella-regular.otf", "FreeSerif.ttf"], font_loader.FT_LOAD_NO_HINTING)
Serif_Bold = (["texgyrepagella-bold.otf", "FreeSerifBold.ttf"], font_loader.FT_LOAD_NO_HINTING)
# Define the size differences used to render different fallback fonts
# I.e. when adding a fallback font has smaller glyphs than the original, you can bump it
dsizes = {"HanaMinA.ttf": 2} # make the glyphs for the (chinese font 2 pts bigger)
fonts = (
("mono-10", SansMono, 10, filled),
("mono-stroke-10", SansMono, 10, stroked2),
("sans-9", Sans, 9, filled),
("sans-10", Sans, 10, filled),
("sans-12", Sans, 12, filled),
("sans-13", Sans, 13, filled),
("sans-14", Sans, 14, filled),
("sans-16", Sans, 16, filled),
("sans-bold-12", Sans_Bold, 12, filled),
("sans-bold-13", Sans_Bold, 13, filled),
("sans-bold-14", Sans_Bold, 14, filled),
("sans-bold-16", Sans_Bold, 16, filled),
("sans-bold-18", Sans_Bold, 18, filled),
("sans-bold-20", Sans_Bold, 20, filled),
("sans-bold-22", Sans_Bold, 22, filled),
("sans-bold-24", Sans_Bold, 24, filled),
("sans-stroke-12", Sans, 12, stroked2),
("sans-bold-stroke-12", Sans_Bold, 12, stroked3),
("sans-stroke-13", Sans, 13, stroked2),
("sans-bold-stroke-13", Sans_Bold, 13, stroked3),
("sans-stroke-14", Sans, 14, stroked2),
("sans-bold-stroke-14", Sans_Bold, 14, stroked3),
("sans-stroke-16", Sans, 16, stroked2),
)
for name, (fontnames, loadopts), size, style in fonts:
print(f"{name}...")
generate_font(
f"../../../binaries/data/mods/mod/fonts/{name}", fontnames, loadopts, size, style, dsizes
)
-34
View File
@@ -1,34 +0,0 @@
use strict;
use warnings;
use Unicode::UCD;
use Data::Dumper;
binmode STDOUT, ':utf8';
my @cs;
for ( # (these are probably more than we really need)
'Basic Latin',
'Latin-1 Supplement',
'Latin Extended-A',
'Latin Extended-B',
'Latin Extended Additional',
'Spacing Modifier Letters',
'General Punctuation',
'Combining Diacritical Marks',
'Mathematical Operators',
) {
print "# $_\n";
for my $r (@{Unicode::UCD::charblock($_)}) {
for my $c ($r->[0]..$r->[1]) {
next if $c < 0x20 or ($c >= 0x7f and $c < 0xa0);
printf "%04X: %s %s\n", $c, chr($c), Unicode::UCD::charinfo($c)->{name} if Unicode::UCD::charinfo($c);
}
}
print "\n";
}
for my $c (0xFE33, 0xFFFD) {
printf "%04X: %s %s\n", $c, chr($c), Unicode::UCD::charinfo($c)->{name} if Unicode::UCD::charinfo($c);
}
-285
View File
@@ -1,285 +0,0 @@
# Adapted from:
# http://enichan.darksiren.net/wordpress/?p=49
# which was adapted from some version of
# https://devel.nuclex.org/framework/browser/game/Nuclex.Game/trunk/Source/Packing/CygonRectanglePacker.cs
# which has the following license:
#
# Copyright (C) 2002-2009 Nuclex Development Labs
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the IBM Common Public License as
# published by the IBM Corporation; either version 1.0 of the
# License, or (at your option) any later version.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# IBM Common Public License for more details.
from bisect import bisect_left
class OutOfSpaceError(Exception):
pass
class Point:
def __init__(self, x, y):
self.x = x
self.y = y
def __cmp__(self, other):
"""Compare the starting position of height slices."""
return self.x - other.x
class RectanglePacker:
"""Base class for rectangle packing algorithms.
By uniting all rectangle packers under this common base class, you can
easily switch between different algorithms to find the most efficient or
performant one for a given job.
An almost exhaustive list of packing algorithms can be found here:
http://www.csc.liv.ac.uk/~epa/surveyhtml.html
"""
def __init__(self, packing_area_width, packing_area_height):
"""Initialize a new rectangle packer.
packingAreaWidth: Maximum width of the packing area
packingAreaHeight: Maximum height of the packing area
"""
self.packingAreaWidth = packing_area_width
self.packingAreaHeight = packing_area_height
def pack(self, rectangle_width, rectangle_height):
"""Allocate space for a rectangle in the packing area.
rectangleWidth: Width of the rectangle to allocate
rectangleHeight: Height of the rectangle to allocate
Returns the location at which the rectangle has been placed
"""
point = self.try_pack(rectangle_width, rectangle_height)
if not point:
raise OutOfSpaceError("Rectangle does not fit in packing area")
return point
def try_pack(self, rectangle_width, rectangle_height):
"""Try to allocate space for a rectangle in the packing area.
rectangleWidth: Width of the rectangle to allocate
rectangleHeight: Height of the rectangle to allocate
Returns a Point instance if space for the rectangle could be allocated
be found, otherwise returns None
"""
raise NotImplementedError
class DumbRectanglePacker(RectanglePacker):
def __init__(self, packing_area_width, packing_area_height):
RectanglePacker.__init__(self, packing_area_width, packing_area_height)
self.x = 0
self.y = 0
self.rowh = 0
def try_pack(self, rectangle_width, rectangle_height):
if self.x + rectangle_width >= self.packingAreaWidth:
self.x = 0
self.y += self.rowh
self.rowh = 0
if self.y + rectangle_height >= self.packingAreaHeight:
return None
r = Point(self.x, self.y)
self.x += rectangle_width
self.rowh = max(self.rowh, rectangle_height)
return r
class CygonRectanglePacker(RectanglePacker):
"""Packer using a custom algorithm by Markus 'Cygon' Ewald.
Algorithm conceived by Markus Ewald (cygon at nuclex dot org), though
I'm quite sure I'm not the first one to come up with it :)
The algorithm always places rectangles as low as possible in the packing
area. So, for any new rectangle that is to be added, the packer has to
determine the X coordinate at which the rectangle can have the lowest
overall height without intersecting any other rectangles.
To quickly discover these locations, the packer uses a sophisticated
data structure that stores the upper silhouette of the packing area. When
a new rectangle needs to be added, only the silouette edges need to be
analyzed to find the position where the rectangle would achieve the lowest
"""
def __init__(self, packing_area_width, packing_area_height):
"""Initialize a new rectangle packer.
packingAreaWidth: Maximum width of the packing area
packingAreaHeight: Maximum height of the packing area
"""
RectanglePacker.__init__(self, packing_area_width, packing_area_height)
# Stores the height silhouette of the rectangles
self.height_slices = []
# At the beginning, the packing area is a single slice of height 0
self.height_slices.append(Point(0, 0))
def try_pack(self, rectangle_width, rectangle_height):
"""Try to allocate space for a rectangle in the packing area.
rectangleWidth: Width of the rectangle to allocate
rectangleHeight: Height of the rectangle to allocate
Returns a Point instance if space for the rectangle could be allocated
be found, otherwise returns None
"""
placement = None
# If the rectangle is larger than the packing area in any dimension,
# it will never fit!
if rectangle_width > self.packingAreaWidth or rectangle_height > self.packingAreaHeight:
return None
# Determine the placement for the new rectangle
placement = self.try_find_best_placement(rectangle_width, rectangle_height)
# If a place for the rectangle could be found, update the height slice
# table to mark the region of the rectangle as being taken.
if placement:
self.integrate_rectangle(placement.x, rectangle_width, placement.y + rectangle_height)
return placement
def try_find_best_placement(self, rectangle_width, rectangle_height):
"""Find the best position for a rectangle of the given dimensions.
rectangleWidth: Width of the rectangle to find a position for
rectangleHeight: Height of the rectangle to find a position for
Returns a Point instance if a valid placement for the rectangle could
be found, otherwise returns None
"""
# Slice index, vertical position and score of the best placement we
# could find
best_slice_index = -1 # Slice index where the best placement was found
best_slice_y = 0 # Y position of the best placement found
# lower == better!
best_score = self.packingAreaHeight
# This is the counter for the currently checked position. The search
# works by skipping from slice to slice, determining the suitability
# of the location for the placement of the rectangle.
left_slice_index = 0
# Determine the slice in which the right end of the rectangle is located
right_slice_index = bisect_left(self.height_slices, Point(rectangle_width, 0))
while right_slice_index <= len(self.height_slices):
# Determine the highest slice within the slices covered by the
# rectangle at its current placement. We cannot put the rectangle
# any lower than this without overlapping the other rectangles.
highest = self.height_slices[left_slice_index].y
for index in range(left_slice_index + 1, right_slice_index):
highest = max(self.height_slices[index].y, highest)
# Only process this position if it doesn't leave the packing area
if highest + rectangle_height < self.packingAreaHeight:
score = highest
if score < best_score:
best_slice_index = left_slice_index
best_slice_y = highest
best_score = score
# Advance the starting slice to the next slice start
left_slice_index += 1
if left_slice_index >= len(self.height_slices):
break
# Advance the ending slice until we're on the proper slice again,
# given the new starting position of the rectangle.
right_rectangle_end = self.height_slices[left_slice_index].x + rectangle_width
while right_slice_index <= len(self.height_slices):
if right_slice_index == len(self.height_slices):
right_slice_start = self.packingAreaWidth
else:
right_slice_start = self.height_slices[right_slice_index].x
# Is this the slice we're looking for?
if right_slice_start > right_rectangle_end:
break
right_slice_index += 1
# If we crossed the end of the slice array, the rectangle's right
# end has left the packing area, and thus, our search ends.
if right_slice_index > len(self.height_slices):
break
# Return the best placement we found for this rectangle. If the
# rectangle didn't fit anywhere, the slice index will still have its
# initialization value of -1 and we can report that no placement
# could be found.
if best_slice_index == -1:
return None
return Point(self.height_slices[best_slice_index].x, best_slice_y)
def integrate_rectangle(self, left, width, bottom):
"""Integrate a new rectangle into the height slice table.
left: Position of the rectangle's left side
width: Width of the rectangle
bottom: Position of the rectangle's lower side
"""
# Find the first slice that is touched by the rectangle
start_slice = bisect_left(self.height_slices, Point(left, 0))
# We scored a direct hit, so we can replace the slice we have hit
first_slice_original_height = self.height_slices[start_slice].y
self.height_slices[start_slice] = Point(left, bottom)
right = left + width
start_slice += 1
# Special case, the rectangle started on the last slice, so we cannot
# use the start slice + 1 for the binary search and the possibly
# already modified start slice height now only remains in our temporary
# first_slice_original_height variable
if start_slice >= len(self.height_slices):
# If the slice ends within the last slice (usual case, unless it
# has the exact same width the packing area has), add another slice
# to return to the original height at the end of the rectangle.
if right < self.packingAreaWidth:
self.height_slices.append(Point(right, first_slice_original_height))
else: # The rectangle doesn't start on the last slice
end_slice = bisect_left(
self.height_slices, Point(right, 0), start_slice, len(self.height_slices)
)
# Another direct hit on the final slice's end?
if end_slice < len(self.height_slices) and not (
Point(right, 0) < self.height_slices[end_slice]
):
del self.height_slices[start_slice:end_slice]
else: # No direct hit, rectangle ends inside another slice
# Find out to which height we need to return at the right end of
# the rectangle
if end_slice == start_slice:
return_height = first_slice_original_height
else:
return_height = self.height_slices[end_slice - 1].y
# Remove all slices covered by the rectangle and begin a new
# slice at its end to return back to the height of the slice on
# which the rectangle ends.
del self.height_slices[start_slice:end_slice]
if right < self.packingAreaWidth:
self.height_slices.insert(start_slice, Point(right, return_height))
-79
View File
@@ -1,79 +0,0 @@
# Tests the characters contained within entity template XML files (most usefully
# their <SpecificName>s) against the characters included in the bitmap font subset,
# and against the glyph data in the fonts themselves.
# When unsupported characters are reported, you should either edit the XML files
# to avoid them (e.g. use a codepoint that better corresponds to the character,
# or use a NFC or NFD version of the character) or add them to charset.txt.
use strict;
use warnings;
use File::Find;
my $vfsroot = '../../../binaries/data/mods';
sub find_entities
{
my @files;
my $find_process = sub {
return $File::Find::prune = 1 if $_ eq '.svn';
my $n = $File::Find::name;
return if /~$/;
return unless -f $_;
push @files, $n;
};
find({ wanted => $find_process }, "$vfsroot/public/simulation/templates");
return @files;
}
open my $c, "charset.txt" or die $!;
binmode $c, ":utf8";
my %chars;
@chars{split //, do { local $/; <$c> }} = ();
$chars{"\r"} = undef;
$chars{"\n"} = undef;
$chars{"\t"} = undef;
my %fontchars;
{
open my $f, 'python dumpfontchars.py|' or die $!;
while (<$f>)
{
my ($name, @chars) = split;
push @chars, 0x0009, 0x000A, 0x000D;
@{$fontchars{$name}}{map chr($_), @chars} = ();
}
}
delete $chars{chr(0x301)};
for my $fn (sort(find_entities()))
{
open my $f, "<", $fn or die $!;
binmode $f, ":utf8";
my %fchars;
@fchars{split //, do { local $/; <$f> }} = ();
for (sort keys %fchars)
{
my @missing;
if (not exists $chars{$_})
{
push @missing, 'charset';
}
for my $font (sort keys %fontchars)
{
if (not exists $fontchars{$font}{$_})
{
push @missing, $font;
}
}
if (@missing)
{
printf "%s\n# Missing char U+%04X from %s\n\n", $fn, ord($_), (join ', ', @missing);
}
}
}
print "Done.\n";