source: trunk/tools/internal/packfont.bas@ 57

Last change on this file since 57 was 57, checked in by Ben Rietbroek, 10 years ago

All source-files lowercased [v1.1.1-testing]

Some standard files like 'COPYING', 'LICENSE', etc. have not been
converted to lower case because they are usually distributed uppercased.

File size: 1.1 KB
Line 
1$COMPILE EXE
2
3$INCLUDE "CRTC.inc"
4
5Open "CYR.BIN" For BINARY As #1
6Get$ #1, 1024, CyrillicFont$
7Close #1
8
9Compressed$ = "": CurPos%=0
10Do
11 NULcount% = 0
12 Do
13 incr CurPos%: incr NULcount%
14 Loop Until Asc(CyrillicFont$,CurPos%)<>0
15 Decr NULcount%
16 CharCount% = 0: StartPos% = CurPos%
17 Do
18 incr CurPos%: incr CharCount%
19 Loop Until Asc(CyrillicFont$,CurPos%)=0
20 Decr CurPos%
21 Shift Left CharCount%, 4
22 Compressed$ = Compressed$+Chr$(CharCount%+NULcount%)+Mid$(CyrillicFont$,StartPos%,CurPos%-StartPos%+1)
23Loop Until CurPos%=>1020
24Open "COMPRESS.BIN" For BINARY As #2
25Put$ #2, Compressed$
26Close #2
27end
28
29NewFont$ = @CRTC_Font_ROM_25x80
30Mid$(NewFont$, 2049, 768) = Left$(CyrillicFont$, 768)
31Mid$(NewFont$, 3584, 256) = Right$(CyrillicFont$, 256)
32
33CRTC_LoadFont_25x80 StrPtr32(NewFont$)
34cls
35for a%=0 to 255
36 print chr$(a%);
37 if (a% and 15)=15 Then print
38next a%
39end
40
41Open "KOI8.F16" For BINARY As #1
42Get$ #1, 4096, CyrillicFont$
43close #1
44
45print CyrillicFont$
46CyrillicFont$ = Mid$(CyrillicFont$, 3073, 1024)
47Open "CYRILLIC.BIN" For BINARY As #2
48Put$ #2, CyrillicFont$
49Close #2
Note: See TracBrowser for help on using the repository browser.