Buffers    Files    Tools    Mule   
How to patch TextViewer to change built-in fonts
TextViewer version 1.20 and above have the built-in fonts stored in an
internal LHA archive.
Actually this archive can easily be found an replaced with the help of
a hex editor.
Finding the archive is easy: search for the string "INTERNAL
FONTS". For TextViewer v1.20 you should see something like this.
00004e30: 0400 0400 04ff ff49 4e54 4552 4e41 4c20 .......INTERNAL
00004e40: 464f 4e54 5361 2c22 432d 6c68 352d ce06 FONTSa,"C-lh5-..
00004e50: 0000 860a 0000 8273 632b 2000 0c41 6c70 .......sc+ ..Alp
00004e60: 6861 2d52 6f2e 7066 7446 3b06 6873 ef7e ha-Ro.pftF;.hs.~
Immediately after this signature there are two bytes, 0x61 and 0x2C in
this example. This is the length of the archive, read it as 0x2C61 =
11361 bytes.
The archive starts with the next bytes, 0x22, 0x43, 0x2D etc. and ends
at offset 0x4E47 + 0x2C61 = 0x7AA8.
00007a60: 2306 1966 36ac 0151 62fe 618b 1131 7b2c #..f6..Qb.a..1{,
00007a70: 4a36 14b3 0c17 4ea1 3e05 0611 a562 ce61 J6....N.>....b.a
00007a80: 80d9 19a7 30c2 25ae 6f26 5960 a8b0 a1cc ....0.%.o&Y`....
00007a90: 31b4 cbe2 39b4 f319 ae57 1ae6 d3ca cffb 1...9....W......
00007aa0: ede5 a769 c5a1 9392 558b ec81 ec8e 0051 ...i....U......Q
So the last bytes belonging to the archive are 0xA1, 0x93, 0x92. With
the byte 0x55 program code starts.
Now you can simply overwrite the bytes from offset 0x4E47 up to (but
not including) offset 0x7AA8 with your own LHA archive. Please
remember, your archive must not be longer than 11361 bytes. And really
overwrite the bytes, do not cut out the existing bytes and then insert
your own bytes. The bytes at offset 0x7AA8 and above must remain
intact at their specific location. Or, in other words, do not change
the total length of TextViewer.bin, e.g. for v1.20 it must remain
exactly 62100 bytes.
Please note: the above example matches version 1.20 only, further
versions will contain the archive at a different offset. Versions older
than 1.20 do not have such an internal archive at all.
You are encouraged to publish versions of TextViewer.bin with altered
internal archive. Please drop me a note, if you do so ;-)
Have fun!

--:%%  FontPatch_for_TextViewer.txt  (Text Fill)----ALL------
M-x view-file ../index.html