Font Conversion & Repair: Difference between revisions

From The DarkMod Wiki
Jump to navigationJump to search
(Start of redo. Break out Q3Font info into separate article)
(Replace old WebLinks section with new For More)
Line 5: Line 5:
As of 2024, there are four tools for TDM font conversion and repair:
As of 2024, there are four tools for TDM font conversion and repair:


* [[ExportFontToDoom]] (ARTICLE COMING SOON)
* [[ExportFontToDoom3]]
* [[Q3Font]]
* [[Q3Font]]
* [[Refont]] - New in 2024
* [[Refont]] - New in 2024
Line 11: Line 11:


== Fidcal's Original Take ==
== Fidcal's Original Take ==
These are some rough notes about converting ttf fonts to doom3 and repairing if necessary.
These are some rough notes ''[from 2009]'' about converting ttf fonts to doom3 and repairing if necessary.


My understanding is that ''ExportFontToDoom'' is more suitable than Q3Font for converting. It is what I used to convert a lot of TTF fonts. See notes with that tool as to how use it. But be aware of copyright issues if converting TTF fonts.
My understanding is that ''ExportFontToDoom3'' is more suitable than Q3Font for converting. It is what I used to convert a lot of TTF fonts. See notes with that tool as to how use it. But be aware of copyright issues if converting TTF fonts.


With ''ExportFontToDoom'' there were quite a few spacing errors. ''Q3Font'' I found a bit puzzling so never did any conversions (it may be better for all I know.) '''BUT''' it can convert the dat files to readables for editing and back again so I used Q3Font to fix the errors.
With ''ExportFontToDoom3'' there were quite a few spacing errors. ''Q3Font'' I found a bit puzzling so never did any conversions (it may be better for all I know.) '''BUT''' it can convert the dat files to readables for editing and back again so I used Q3Font to fix the errors.
 
''Geep adds: Check out newer Font Patcher and Refont to fix errors too.''


Doom fonts have multiple dat files for each size. However, only the following are loaded by the code:
Doom fonts have multiple dat files for each size. However, only the following are loaded by the code:
Line 24: Line 26:


The size 24 is used mostly by readables, while the menu uses 48 (the big headlines and the main menu) and 24 (settings and other headlines).
The size 24 is used mostly by readables, while the menu uses 48 (the big headlines and the main menu) and 24 (settings and other headlines).
This means it is not necessary to create other sizes, as these will be ignored, anyway.
This means it is not necessary to create other sizes, as these will be ignored, anyway.


== Further Thoughts and Updates ==
''Geep adds: Size 48 is also used for titles of some readables, like those Stone font. The subtitle system as of TDM 2.12 uses Stone size 24, with (at render time) horizontal compression.''
* Usage of font sizes. Some readables, like those with the Stone font, use 48 pt for titles. The subtitle system (as of TDM 2.12) uses Stone 24 pt, with (at render time) horizontal compression.
* [[Q3Font]] is where you can find updated info about using this Windows utility program, including Fidcal's simple example. (Some of this info used to be here in Font Conversion & Repair.).
* [[Refont]] describes this command-line program, that handles some of Q3font's functionality, but is easier to use. This new article has a detailed comparison.
* [[ExportFontToDoom]] (ARTICLE COMING SOON)
* [[Font Patcher]] has details about the font_patcher.pl utility, which is a preferred method (over Q3font) to fix and change fonts.
* I18N (Internationalization). If you convert a Russian font, you need to move the character 0xFF to 0xB6, otherwise it will not show in the GUI or readables. See [[I18N - Charset]] for details.
 
== Weblinks ==


* [http://www.inventivedingo.com/stuff/exportfonttodoom3_modified.zip Fixed version of ExportFontToDoom] (exports special chars, too)
== For More ==
* [https://www.wolffiles.de/index.php?filebaseDEV&fid=1868 Q3Font]
* [[ExportFontToDoom3]] is, as Fidcal says, the recommended method, if you want to start a Doom3/TDM font project by generating from a TrueType font.
* [http://www.bloodgate.com/mirrors/tdm/pub/scripts/font_patcher/ font_patcher.pl and examples]
* [[Q3Font]] is the traditional Windows utility program to fix Doom3/TDM fonts. Fidcal provides a simple example of using it. (Some of this info used to be here in Font Conversion & Repair; some is an update.)
* [[Font Patcher]]
* [[Refont]] is another command-line program, new in 2024, that handles some of Q3font's functionality, but is easier to use. This article includes a detailed comparison.
* [[I18N]]
* [[Font Patcher]] details the font_patcher.pl utility, which is a preferred method (over Q3font) to fix and change fonts. Includes links to examples.
* [[I18N]] (Internationalization) introduces consideration for non-English languages.
* [[I18N - Charset]] details the TDM-specific character mapping for non-English languages. For instance, if you convert a Russian font, you need to move the character 0xFF to 0xB6, otherwise it will not show in the GUI or readables.


{{tutorial}} [[Category:Fonts]]
{{tutorial}} [[Category:Fonts]]

Revision as of 16:32, 6 March 2024


As of 2024, there are four tools for TDM font conversion and repair:

Fidcal's Original Take

These are some rough notes [from 2009] about converting ttf fonts to doom3 and repairing if necessary.

My understanding is that ExportFontToDoom3 is more suitable than Q3Font for converting. It is what I used to convert a lot of TTF fonts. See notes with that tool as to how use it. But be aware of copyright issues if converting TTF fonts.

With ExportFontToDoom3 there were quite a few spacing errors. Q3Font I found a bit puzzling so never did any conversions (it may be better for all I know.) BUT it can convert the dat files to readables for editing and back again so I used Q3Font to fix the errors.

Geep adds: Check out newer Font Patcher and Refont to fix errors too.

Doom fonts have multiple dat files for each size. However, only the following are loaded by the code:

  • fontImage_12.dat
  • fontImage_24.dat
  • fontImage_48.dat

The size 24 is used mostly by readables, while the menu uses 48 (the big headlines and the main menu) and 24 (settings and other headlines). This means it is not necessary to create other sizes, as these will be ignored, anyway.

Geep adds: Size 48 is also used for titles of some readables, like those Stone font. The subtitle system as of TDM 2.12 uses Stone size 24, with (at render time) horizontal compression.

For More

  • ExportFontToDoom3 is, as Fidcal says, the recommended method, if you want to start a Doom3/TDM font project by generating from a TrueType font.
  • Q3Font is the traditional Windows utility program to fix Doom3/TDM fonts. Fidcal provides a simple example of using it. (Some of this info used to be here in Font Conversion & Repair; some is an update.)
  • Refont is another command-line program, new in 2024, that handles some of Q3font's functionality, but is easier to use. This article includes a detailed comparison.
  • Font Patcher details the font_patcher.pl utility, which is a preferred method (over Q3font) to fix and change fonts. Includes links to examples.
  • I18N (Internationalization) introduces consideration for non-English languages.
  • I18N - Charset details the TDM-specific character mapping for non-English languages. For instance, if you convert a Russian font, you need to move the character 0xFF to 0xB6, otherwise it will not show in the GUI or readables.