cc65 / cc65

cc65 - a freeware C compiler for 6502 based systems

Home Page:https://cc65.github.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

TGI Vector Font Issues - missing documentation, missing default font, missing example

mrdudz opened this issue · comments

Someone approached me on IRC and asked about how to use text output in TGI. Should be easy enough - i thought. Until i tried to add some simple text output to the existing TGI sample. Apparently not only several important things are missing - but there also seem to be different ideas of how it even works at all (unless i have misunderstood something):

  • There is no font in the tree at all. (the lynx port is apparently an exception, a font is hardcoded into the driver)
  • The docs hide quite well how to create such font, chrcvt65 is not mentioned on the TGI page at all. If i didnt try to find some working code with google, i would have not noticed it even exists.
  • The format of the font is not documented anywhere. And despite it being called "vector font" in the docs (and source/headers) the existing lynx font appears to be a bitmap font and NOT a vector font.
  • Generally the lynx implementation seems to not follow the specs, nor is documented how to create, or install a different font in TGI for the lynx.

This really needs to change :) We need at least one font that can be used as a default, and a working example. And preferably fix all the rest too :)

So, first we need some font(s) we can include - unfortunately most sources i found just contain the hand full fonts borland provided (we cant use those because of license issues). However:

http://cd.textfiles.com/aztechsg/QUIKMENU/ (Borland fonts)

https://ftp.sunet.se/mirror/archive/ftp.sunet.se/pub/simtelnet/msdos/borland/ (Bunch of tools and fonts from other sources)
https://ftp.sunet.se/mirror/archive/ftp.sunet.se/pub/simtelnet/msdos/borland/lcdfonts.zip seems to contain freeware fonts

https://moddingwiki.shikadi.net/wiki/BGI_Stroked_Font (CHR Format info)

Indeed, "The TGI library has two types of typography support: vector and bitmap fonts. The Lynx only has support for bitmaps and a single system supplied bitmap font. It is part of and inside the TGI driver."
https://atarilynxdeveloper.wordpress.com/page/3/
At least there's Uz's tgi-preview-0.0.1.zip :-)
By the way lcdfonts just contains digits, hence the name...