Author Topic: "Complete" fonts  (Read 1345 times)

0 Members and 1 Guest are viewing this topic.

Offline Yarn

  • 210
(Well, they're as complete as I could make them)

For some time, I knew that FreeSpace did some remapping of certain non-ASCII characters (specifically, the ones in the German and French fonts) when loading files. What I didn't know until a few months ago is that the remapping is actually a conversion from Windows-1252 to code page 437. However, the conversion missed certain characters like ÿ and ñ, so I made a patch (which was committed at revision 10923) that adds support for every character that exists in both (but not just one) of those character sets.

With that patch committed, I thought that I would expand the standard fonts to include all the characters that are now supported. Here they are:
https://www.dropbox.com/s/7t0ku4nlwcblwf2/fs2_full_fonts.zip?dl=1

And here is a test mod that includes a mission called Character Test, which displays every supported character along with their Unicode names and CP437 code points in the briefing. The three expanded fonts are included in data\fonts; to try one in the test mission, rename the font to font01.vf.
https://www.dropbox.com/s/75l9ehkyb28r6q2/CharacterTest.zip?dl=1

These fonts place the special HUD characters at index 176 instead of 127 or 164, so to use them, you need to add a language list to the beginning of strings.tbl or *-str.tbl and set +Special Character Index: to 176 for each language, like this:
Code: [Select]
#Supported Languages

$Language: English
+Extension:
+Special Character Index: 176

$Language: German
+Extension: gr
+Special Character Index: 176

$Language: French
+Extension: fr
+Special Character Index: 176

#End

Here are all the characters, minus the HUD characters, that these fonts (and the game) support:
Quote
all ASCII characters
à, è, ì, ò, ù (lowercase only)
á, í, ó, ú (lowercase only)
é, É
â, ê, î, ô, û (lowercase only)
ë, ï, ÿ (lowercase only)
ä, ö, ü, Ä, Ö, Ü
å, Å
ç, Ç
ñ, Ñ
æ, Æ
ß (converted to ss)
¢, £, ¥, ƒ, ª, º, ¿, ¬, ½, ¼, ¡, «, », µ, ±, ÷, °, ·, ²
the no-break space

Remember that any files containing these characters must be encoded in Windows-1252, or else the characters may not display correctly in-game!

Also, these fonts are not fully compatible with retail, nor are they compatible with Polish, which uses a different character set (Windows-1250).
« Last Edit: September 15, 2017, 12:05:44 am by Yarn »
"Your fighter is running out of oil.  Please check under the hood and add more if necessary"
--strings.tbl, entry 177

"Freespace is very tired.  It is shutting down to get some rest."
--strings.tbl, entry 178