dhansel / VersaTerm

A versatile DIY serial terminal
GNU General Public License v3.0
93 stars 23 forks source link

Feature request / discussion: Additional (font) characters #7

Open Commander1024 opened 4 months ago

Commander1024 commented 4 months ago

Ohai,

I built a VersaTerm and it work totally fine. But aside of retro computers (following the VT102 standard), I do like using it on (modern) Linux/BSD boxes as well. It's fantastic that it does support ridiculous high baud rates and ANSI color support fills my heart with love, too.

I have just a minor thing that bothers me a bit, and that is the German umlauts (or other language-specific chars and maybe a few (?) pseudo graphic UTF-8 characters). Those are printed as escape sequences and "destroy" or shift the layout. Would it even be possible to add additional characters to the font(s)? I see international characters being mentioned in VT5xx standard. (https://en.wikipedia.org/wiki/VT520)

I totally get it, that something like this is totally off-scope for this project (being a VT102 terminal), I'm rather interested in hearing, what had to be done to achieve such a goal.

Regards, Commander1024

dhansel commented 4 months ago

VersaTerm allows you to upload up to four user-defined fonts. That should allow you to define any non-english language character you need. It's not trivial but doable, I'll be happy to help if you run into problems.

To create a font, create a Windows BMP bitmap file with the following characteristics:

It's easiest to start out with a downloaded bitmap such as this 8x16 VGA font: http://www.alexandrugroza.ro/microelectronics/essays-research/vga-rom-fonts/_pict/vga-rom-fonts-ag869x16.bmp I found that on this site: http://www.alexandrugroza.ro/microelectronics/essays-research/vga-rom-fonts/index.html but with a bit of searching you can find many more on the web.

You can then modify (or re-order) the characters to in the bitmap your liking. Or find a font bitmap that has all the characters you need at their expected location. VersaTerm will the font characters defined in the bitmap to ASCII codes in order left-to-right, top-to-bottom.

Once you have a font bitmap, connect your PC to VersaTerm either via a usb-to-serial adapter or by connecting the PC USB port to the Pi Pico's on-board USB micro port. Note that if you use the Pico's USB micro port then you can't have a USB keyboard connected at the same time - so you must use a PS/2 keyboard in that case.

Open TeraTerm on your computer and make sure you have a proper connection. Easy to test by just typing characters in VersaTerm/TeraTerm and checking whether they show up on the other end.

Once everything is connected properly: 1) In VersaTerm, go to Font Settings->Edit user font 1->Upload font bitmap 2) In TeraTerm, select "File->Transfer->XModem->Send" 3) Select the font bitmap file and click "Ok". That should upload the font. 4) Once the font is uploaded successful you can test it by selecting "View font" in VersaTerm. 5) To make VersaTerm use the font, change the "Font Settings->Normal Font" setting to "User 1"

Writing this out it sounds pretty complicated but it really isn't. I would suggest just trying to upload the font file I referenced above to test it out. Once you know how it works you can modify the font to suit your needs.

Commander1024 commented 4 months ago

That's a pretty wholesome answer. Didn't realize that's possible with the font upload feature. Will give that a try, should be well within my capabilities. Thank you very much!