"Fossies" - the Fresh Open Source Software Archive 
Member "seed7/prg/testfont.sd7" (29 Nov 2020, 4173 Bytes) of package /linux/misc/seed7_05_20210223.tgz:
As a special service "Fossies" has tried to format the requested text file into HTML format (style:
standard) with prefixed line numbers.
Alternatively you can here
view or
download the uninterpreted source code file.
See also the last
Fossies "Diffs" side-by-side code changes report for "testfont.sd7":
05_20200929_vs_05_20201208.
1
2 (********************************************************************)
3 (* *)
4 (* testfont.sd7 Program to demonstrate bitmap fonts. *)
5 (* Copyright (C) 2010, 2012 Thomas Mertes *)
6 (* *)
7 (* This program is free software; you can redistribute it and/or *)
8 (* modify it under the terms of the GNU General Public License as *)
9 (* published by the Free Software Foundation; either version 2 of *)
10 (* the License, or (at your option) any later version. *)
11 (* *)
12 (* This program is distributed in the hope that it will be useful, *)
13 (* but WITHOUT ANY WARRANTY; without even the implied warranty of *)
14 (* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *)
15 (* GNU General Public License for more details. *)
16 (* *)
17 (* You should have received a copy of the GNU General Public *)
18 (* License along with this program; if not, write to the *)
19 (* Free Software Foundation, Inc., 51 Franklin Street, *)
20 (* Fifth Floor, Boston, MA 02110-1301, USA. *)
21 (* *)
22 (********************************************************************)
23
24
25 $ include "seed7_05.s7i";
26 include "float.s7i";
27 include "draw.s7i";
28 include "keybd.s7i";
29 include "text.s7i";
30 include "stdfont10.s7i";
31 include "stdfont12.s7i";
32 include "stdfont14.s7i";
33 include "stdfont16.s7i";
34 include "stdfont18.s7i";
35 include "stdfont20.s7i";
36 include "stdfont24.s7i";
37 include "vecfont10.s7i";
38 include "vecfont18.s7i";
39 include "cronos16.s7i";
40 include "cronos27.s7i";
41 include "pixmap_file.s7i";
42
43 var text: screen is text.value;
44
45 const array font: fontList is [] (
46 stdFont10, stdFont12, stdFont14, stdFont16,
47 stdFont18, stdFont20, stdFont24, cronos27);
48
49
50 const proc: main is func
51 local
52 var integer: yPos is 0;
53 var integer: index is 0;
54 begin
55 screen(1024, 768);
56 clear(curr_win, white);
57 KEYBOARD := GRAPH_KEYBOARD;
58 screen := openPixmapFontFile(curr_win);
59 color(screen, black, white);
60 for yPos key index range [] (38, 76, 108, 138, 163, 186, 205, 222) do
61 setFont(screen, fontList[length(fontList) - index + 1]);
62 setPosXY(screen, 6, yPos);
63 write(screen, " !\"#$%&'()*+,-./0123456789:;<=>?");
64 end for;
65 for yPos key index range [] (58, 76, 98, 122, 151, 182, 219, 260) do
66 setFont(screen, fontList[index]);
67 setPosXY(screen, 1018 -
68 width(fontList[index], "@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_"), yPos);
69 write(screen, "@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_");
70 end for;
71 for yPos key index range [] (306, 344, 376, 406, 431, 454, 473, 490) do
72 setFont(screen, fontList[length(fontList) - index + 1]);
73 setPosXY(screen, 6, yPos);
74 write(screen, "`abcdefghijklmnopqrstuvwxyz{|}~");
75 end for;
76 for yPos key index range [] (284, 302, 324, 348, 377, 408, 445, 486) do
77 setFont(screen, fontList[index]);
78 setPosXY(screen, 1018 -
79 width(fontList[index], "\160;¡¢£¤¥¦§¨©ª«¬®¯°±²³´µ¶·¸¹º»¼½¾¿"), yPos);
80 write(screen, "\160;¡¢£¤¥¦§¨©ª«¬®¯°±²³´µ¶·¸¹º»¼½¾¿");
81 end for;
82 for yPos key index range [] (532, 570, 602, 632, 657, 680, 699, 716) do
83 setFont(screen, fontList[length(fontList) - index + 1]);
84 setPosXY(screen, 6, yPos);
85 write(screen, "ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖרÙÚÛÜÝÞß");
86 end for;
87 for yPos key index range [] (554, 572, 594, 618, 647, 678, 715, 756) do
88 setFont(screen, fontList[index]);
89 setPosXY(screen, 1018 -
90 width(fontList[index], "àáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿ€"), yPos);
91 write(screen, "àáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿ€");
92 end for;
93 ignore(getc(KEYBOARD));
94 end func;