First post, by doomlazer
Edit: this issue has been solved. Most of the problems were due to issues with the AGI interpreter, not DOSBox itself. Some of the information may still be helpful for DOSBox users who would like to create custom codepages and/or AGI fan translations, so I will leave it up to the moderators if it needs to be moved or deleted for not being on topic.
Ok this is a bit convoluted, but I'm assisting with a French translation of SQ1 and we are trying to fine tune the font in graphics mode.
Normally in AGI there is no extended character support in graphics mode, only text mode, but thanks to a string hack by the creator of WinAGI, we are able to display accented letters in both graphics and text mode. With the default DOSBox settings the accent marks are flat and dull looking.
Changing the DOSBox config to:
which most French users will likely do, makes the accents look objectively better.
The problem is that graphics mode appears to use a different font than text mode. The text mode 'fr' font squashed several characters and moves everything down one pixel to maintain a consistent level. The graphics mode font has all accented letters positioned one pixel lower than the other characters to allow for the slanted accents, but does not adjust the standard characters. This creates an undesirable wavy effect to accented text in graphics mode.
Edit: this turns out to be caused by AGI interpreter using two different sources for graphics mode text glyphs depending if the it's an extended character or not.
With ScummVM we can include a custom font used with both modes that matches the "squashed/slanted accents" of the French layout text mode font. It's not perfect, but looks better than the wavy text in our opinion .
Edit: The problem was partially solved a few posts down. It may be possible to adjust the AGI string hack to do a full custom font replacement, but currently there are still some issues. Thank you _Rob for pointing out DOSBox-X which helped in researching how codepages are used.
We'd like to be able to do the same in DOSBox. It doesn't seem possible to supply a user font file in our game folder for DOSBox, so I'm researching the possibility of compiling a custom version of DOSBox with an edited graphics mode font. As I'm looking through the source code it appears that the fonts are stored in dos_codepages.h in .CPI / .CPX format.
I'm really just a hobby programmer, so this is a bit outside my comfort zone. If I can figure out which of the codepages the french keyboard layout is using for graphics mode, then modify the font with CPIadd (which is mentioned in the source code, but I haven't tried yet), I can potentially compile a custom version to include with the SQ1 translation patch installer so everything is the way we want.
My questions are first, I'm assuming there is no problem with distributing a modified version of DOSBox with our translation patcher, right?
Second, is it obvious to anyone which codepage the French layout is using for graphics mode?
Finally, is there an easier way to force DOSBox to use the same "French font", that text mode is already using, for graphics mode as well?
If anyone has any general recommendations on a different approach to accomplish this, I'm open to researching/implementing alternative solutions as well, but the goal here is to get a consistent look between both text/graphics mode in DOSBox and SVM.
I hope that all this is clear and this is the most appropriate place to pose this question. I looked at creating a ticket on the DOSBox Sourceforge, but this seemed better. Thank you.