Hello, The graphic card maintains information of how character glyphs are made out of their character code. Basically it is limited to being able to represent just 256 characters together at a time (there is a trick to double this to 512, but doesn't make a difference here).
Each of such configuration set is called a codepage, and the different codepages usually maintain the first 128 characters the same (ASCII), whereas the other 128 characters are used to represent different characters that may vary between countries. Ideally, one could define different codepages that do not change which character is represented, but the way the character is printed to screen. But it is usually not the case: codepages usually have the same "appearance" but different locale characters (at least in the characters 129-255). Also notice that after screen resolution changes usually reset the original codepage the BIOS came with (usually CP437, US-English), so your CP or font is wipped out. This means that you'd need some resident code that would restore your codepage after each time that resolution is changed. This "screen" stuff is, in the end, part of the Console management. Thus, it should be the responsibility of DOS' CON (console) devide. But as the codepage change is very rarely executed (I assume) inside the US, this particular resident code is not shipped with kernel's CON device, but you have to enlarge your CON and load it yourself as you boot your PC. SO, what are your options in FreeDOS? There are two options that I do know of: * DISPLAY is the standard DOS way of doing this (in MS-DOS, it is DISPLAY.SYS, in FreeDOS it is DISPLAY.COM). You can try and create a CPI file with your "font", and thus use standard (MODE CON...) mechanism to load this font within DISPLAY. DISPLAY will guarantee that the font remains after a change of resolution. In addition, this would be incompatible with any DOS user that wants to actually change a codepage (and set, for example, the standard western european with Euro CP858), unless you create fonts for each of the codepages. * There is GNU LOADFONT: you can create a font for GNU Loadfont, and load it within a single executable. However, I am not sure that Loadfont will help you keep your codepage on a resolution change (I believe it does not). Also I ignore how loadfont deals with different codepages (I seem to remember that some fonts have different configurations for different codepages). Aitor On Wed, 15 Jun 2022 at 19:37, Ralf Quint <freedos...@gmail.com> wrote: > On 6/15/2022 10:30 AM, Daniel wrote: > > Is anyone familiar with how DOS fonts work? > > > > There are some .com files that will change the original font with > > another and ya can create your own. I created a TI-99/4aA font to use. > > > > So how does it work? Is the hardware font cached and the cache is > > changed? Some programs will revert back to the original font when > > exiting back to DOS. > > > > Is there a location where one can read/write the font information? > > There is no such thing as a "DOS Font". Seriously! > > Any font functionality is totally dependent on the graphics card being > used. Any attempts to (kind of) standardize the use of fonts (incl. > modification) might be found in the description of INT 10h functions > (BIOS Video interrupt) but pretty much all of those, beside some VERY > BASIC stuff common on VGA adapters) is totally manufacturer dependent... > > > Ralf > > > > > _______________________________________________ > Freedos-user mailing list > Freedos-user@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/freedos-user >
_______________________________________________ Freedos-user mailing list Freedos-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/freedos-user