aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--console-tools/loadfont.c38
1 files changed, 38 insertions, 0 deletions
diff --git a/console-tools/loadfont.c b/console-tools/loadfont.c
index 78700706f..ce4734c86 100644
--- a/console-tools/loadfont.c
+++ b/console-tools/loadfont.c
@@ -165,6 +165,39 @@ int loadfont_main(int argc UNUSED_PARAM, char **argv)
165} 165}
166#endif 166#endif
167 167
168/*
169kbd-1.12:
170
171setfont [-O font+umap.orig] [-o font.orig] [-om cmap.orig]
172[-ou umap.orig] [-N] [font.new ...] [-m cmap] [-u umap] [-C console]
173[-hNN] [-v] [-V]
174
175-h NN Override font height
176-o file
177 Save previous font in file
178-O file
179 Save previous font and Unicode map in file
180-om file
181 Store console map in file
182-ou file
183 Save previous Unicode map in file
184-m file
185 Load console map or Unicode console map from file
186-u file
187 Load Unicode table describing the font from file
188 Example:
189 # cp866
190 0x00-0x7f idem
191 #
192 0x80 U+0410 # CYRILLIC CAPITAL LETTER A
193 0x81 U+0411 # CYRILLIC CAPITAL LETTER BE
194 0x82 U+0412 # CYRILLIC CAPITAL LETTER VE
195-C console
196 Set the font for the indicated console
197-v Verbose
198-V Version
199*/
200
168#if ENABLE_SETFONT 201#if ENABLE_SETFONT
169int setfont_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; 202int setfont_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
170int setfont_main(int argc UNUSED_PARAM, char **argv) 203int setfont_main(int argc UNUSED_PARAM, char **argv)
@@ -188,6 +221,11 @@ int setfont_main(int argc UNUSED_PARAM, char **argv)
188 if (option_mask32 & 1) { // -m 221 if (option_mask32 & 1) { // -m
189 void *map = xmalloc_open_zipped_read_close(mapfilename, &len); 222 void *map = xmalloc_open_zipped_read_close(mapfilename, &len);
190 if (len == E_TABSZ || len == 2*E_TABSZ) { 223 if (len == E_TABSZ || len == 2*E_TABSZ) {
224 //TODO: support textual Unicode console maps:
225 // 0x00 U+0000 # NULL (NUL)
226 // 0x01 U+0001 # START OF HEADING (SOH)
227 // 0x02 U+0002 # START OF TEXT (STX)
228 // 0x03 U+0003 # END OF TEXT (ETX)
191 xioctl(fd, (len == 2*E_TABSZ) ? PIO_UNISCRNMAP : PIO_SCRNMAP, map); 229 xioctl(fd, (len == 2*E_TABSZ) ? PIO_UNISCRNMAP : PIO_SCRNMAP, map);
192 } 230 }
193 } 231 }