Commits:
-
5f4959bd
by Alexei Podtelezhnikov at 2023-02-11T09:33:05-05:00
* src/ftmulti.c (main): Synchronize options with the others.
-
195908f4
by Alexei Podtelezhnikov at 2023-02-11T09:48:09-05:00
* src/ftmulti.c (Init_Display): Use automatic color depth.
1 changed file:
Changes:
src/ftmulti.c
... |
... |
@@ -99,7 +99,7 @@ |
99
|
99
|
|
100
|
100
|
static int res = 72;
|
101
|
101
|
|
102
|
|
- static grColor fore_color = { 255 };
|
|
102
|
+ static grColor fore_color;
|
103
|
103
|
|
104
|
104
|
static int Fail;
|
105
|
105
|
|
... |
... |
@@ -293,7 +293,7 @@ |
293
|
293
|
static void
|
294
|
294
|
Init_Display( void )
|
295
|
295
|
{
|
296
|
|
- grBitmap bitmap = { height, width, 0, gr_pixel_mode_gray, 256, NULL };
|
|
296
|
+ grBitmap bitmap = { height, width, 0, gr_pixel_mode_none, 256, NULL };
|
297
|
297
|
|
298
|
298
|
|
299
|
299
|
grInitDevices();
|
... |
... |
@@ -304,6 +304,8 @@ |
304
|
304
|
|
305
|
305
|
bit = (grBitmap*)surface;
|
306
|
306
|
|
|
307
|
+ fore_color = grFindColor( bit, 255, 255, 255, 255 ); /* white */
|
|
308
|
+
|
307
|
309
|
graph_init = 1;
|
308
|
310
|
}
|
309
|
311
|
|
... |
... |
@@ -889,9 +891,7 @@ |
889
|
891
|
" font The font file(s) to display.\n"
|
890
|
892
|
"\n" );
|
891
|
893
|
fprintf( stderr,
|
892
|
|
- " -w W Set window width to W pixels (default: %dpx).\n"
|
893
|
|
- " -h H Set window height to H pixels (default: %dpx).\n"
|
894
|
|
- "\n",
|
|
894
|
+ " -d WxH Set window dimentions (default: %ux%u).\n",
|
895
|
895
|
DIM_X, DIM_Y );
|
896
|
896
|
fprintf( stderr,
|
897
|
897
|
" -e encoding Specify encoding tag (default: no encoding).\n"
|
... |
... |
@@ -899,7 +899,7 @@ |
899
|
899
|
" `ADOB' (Adobe standard), `ADBC' (Adobe custom).\n"
|
900
|
900
|
" -r R Use resolution R dpi (default: 72dpi).\n"
|
901
|
901
|
" -f index Specify first glyph index to display.\n"
|
902
|
|
- " -d \"axis1 axis2 ...\"\n"
|
|
902
|
+ " -a \"axis1 axis2 ...\"\n"
|
903
|
903
|
" Specify the design coordinates for each\n"
|
904
|
904
|
" variation axis at start-up.\n"
|
905
|
905
|
"\n"
|
... |
... |
@@ -973,10 +973,15 @@ |
973
|
973
|
|
974
|
974
|
switch ( option )
|
975
|
975
|
{
|
976
|
|
- case 'd':
|
|
976
|
+ case 'a':
|
977
|
977
|
parse_design_coords( optarg );
|
978
|
978
|
break;
|
979
|
979
|
|
|
980
|
+ case 'd':
|
|
981
|
+ if ( sscanf( optarg, "%ux%u", &width, &height ) != 2 )
|
|
982
|
+ usage( execname );
|
|
983
|
+ break;
|
|
984
|
+
|
980
|
985
|
case 'e':
|
981
|
986
|
encoding = make_tag( optarg );
|
982
|
987
|
break;
|
... |
... |
@@ -985,12 +990,6 @@ |
985
|
990
|
sscanf( optarg, "%i", &first_glyph );
|
986
|
991
|
break;
|
987
|
992
|
|
988
|
|
- case 'h':
|
989
|
|
- height = atoi( optarg );
|
990
|
|
- if ( height < 1 )
|
991
|
|
- usage( execname );
|
992
|
|
- break;
|
993
|
|
-
|
994
|
993
|
case 'r':
|
995
|
994
|
res = atoi( optarg );
|
996
|
995
|
if ( res < 1 )
|
... |
... |
@@ -1012,12 +1011,6 @@ |
1012
|
1011
|
}
|
1013
|
1012
|
/* break; */
|
1014
|
1013
|
|
1015
|
|
- case 'w':
|
1016
|
|
- width = atoi( optarg );
|
1017
|
|
- if ( width < 1 )
|
1018
|
|
- usage( execname );
|
1019
|
|
- break;
|
1020
|
|
-
|
1021
|
1014
|
default:
|
1022
|
1015
|
usage( execname );
|
1023
|
1016
|
break;
|
|