Team Fortress 2

Team Fortress 2

Not enough ratings
[Obsolete] Font Fixes (Linux)
By lightwo
Fixing unsupported characters and incorrect font sizes for the Linux version of the game.
GameBanana mod page[gamebanana.com]

Also available for Counter-Strike: Source
   
Award
Favorite
Favorited
Unfavorite
Guide Moved!
This guide has been moved here[blog.lightwo.net]

Read more
Preface
As the game was updated in an official capacity to fix all font issues, this guide is now obsolete! If you followed this guide prior, please delete all related files to avoid issues.





It is recommended that Windows fonts are installed before following the other instructions in this guide. Doing so also ensures the fallback DejaVu Sans (which is drawn way too small) is not used for any previously missing fonts. Instructions for Arch Linux are available in this ArchWiki article[wiki.archlinux.org]. You may use free fonts instead (please leave suggestions in the comments!), but especially in the case of the fallback font, you need to know what to look for.

Different Source games have slight variations in file locations and contents, but it is roughly the same procedure for every Source game using VGUI based on HL2 resources.

Special thanks to SvicidalBug for pointing out issues in previous versions of this guide.
Missing Glyphs
Before
After



Instructions
Either:
  • Install WenQuanYi Zen Hei font (wqy-zenhei). It's the hard coded fallback font used by the game for unsupported characters
  • Replace that font with Tahoma, the fallback font for the Windows version of the game
    1. Obtain tahoma.ttf. Read the ArchWiki article[wiki.archlinux.org] for some methods
    2. Install and launch FontForge
    3. Edit tahoma.ttf
    4. Navigate to Element > Font Info...
    5. Under PS Names (default pane), change Family Name to WenQuanYi Zen Hei, confirm with OK
    6. Navigate to File > Generate Fonts...
    7. Make sure Show Hidden Files is checked
    8. Navigate to Home > .local > share > fonts and enter the desired name, untick Validate Before Saving and press Generate
    Note that alternative free fonts may be used instead of Tahoma, in which case use a font with a large character set
Chat Font
Before
After



Instructions
  1. Obtain chatscheme.res
    1. Install vpk_fuse
    2. Enter the game directory using a terminal
      1. Hover over the game in your Steam Library
      2. Navigate to Context menu > Manage > Browse local files
      3. Copy the path and use it in the terminal
        cd "<paste here>/tf"
    3. Enter these commands:
      mkdir -p working custom/linux_fixes/resource cat >custom/linux_fixes/info.vdf <<EOL "linux_fixes" { "ui_version" "3" } EOL vpk_fuse tf2_misc_dir.vpk working cp working/resource/chatscheme.res custom/linux_fixes/resource umount working && rmdir working
    4. In the following steps, use the path it was copied to (under custom > linux_fixes > resource)
  2. Edit the chatscheme.res copied earlier using your preferred text editor
  3. Search for ChatFont.
    What the section should look like:
    "ChatFont" { "1" { "name" "Verdana" "tall" "12" [$WIN32] "tall" "15" [$X360] "weight" "700" "yres" "480 599" "dropshadow" "1" } "2" { ... } ... }
  4. For each preset (under "1" through "5"), add [$LINUX] overrides (must be above defaults):
    "name" "Verdana Bold" [$LINUX] "tall" "<replace me>" [$LINUX] // = [$WIN32] + 3
    Optionally replace Verdana Bold with a desired font (should be the bold variant since "weight" is broken for TTF fonts), and replace as instructed
Console Font
Before
After



Instructions
  1. Obtain sourceschemebase.res
    1. Install vpk_fuse
    2. Enter the game directory using a terminal
      1. Hover over the game in your Steam Library
      2. Navigate to Context menu > Manage > Browse local files
      3. Copy the path and use it in the terminal
        cd "<paste here>/tf"
    3. Enter these commands:
      mkdir -p working custom/linux_fixes/resource cat >custom/linux_fixes/info.vdf <<EOL "linux_fixes" { "ui_version" "3" } EOL vpk_fuse ../platform/platform_misc_dir.vpk working cp working/resource/sourceschemebase.res custom/linux_fixes/resource umount working && rmdir working
    4. In the following steps, use the path it was copied to (under custom > linux_fixes > resource)
  2. Edit the sourceschemebase.res copied earlier using your preferred text editor
  3. Search for ConsoleText.
    What the section should look like:
    "ConsoleText" { "1" { "name" "Lucida Console" [$WINDOWS] "name" "Lucida Console" [$X360] "name" "Verdana" [$POSIX] "tall" "11" [$OSX] "tall" "14" [$LINUX] "tall" "10" "weight" "500" } }
  4. For the preset "1", add the [$LINUX] override:
    "name" "Lucida Console" [$LINUX]
    Optionally replace Lucida Console with a desired, preferably monospace font
61 Comments
Jazztache Nov 18, 2024 @ 12:00am 
Fixed since the 64 bit update. Thanks for the help! Had this guide favorited for a long time.
 OGuiBlindao  May 11, 2024 @ 9:18am 
Yeah, i do have some custom huds, ill try removing them later
lightwo  [author] May 1, 2024 @ 9:10am 
I cannot really go any further than that with my findings other than actually checking the resource files that define what fonts are being used, since the game appears to be opening every single font available on the system.
lightwo  [author] May 1, 2024 @ 9:08am 
It seems like Valve already addressed the issue of fonts potentially missing on the user's operating system by bundling them with the game:

Team Fortress 2/resource/linux_fonts

...so I suspect it isn't going to be that. Do you have custom HUDs installed? If so, it is possible that one of them is referring to a font that doesn't exist on your system.
lightwo  [author] Apr 29, 2024 @ 9:42am 
It sounds like you're missing some fonts. I will see if I'll have time to investigate.
 OGuiBlindao  Apr 28, 2024 @ 6:11pm 
I do have them deleted tho
PhobosAnomaly Apr 25, 2024 @ 3:22am 
Delete the Linux fixes from your customs folder and it'll be normal-sized
 OGuiBlindao  Apr 24, 2024 @ 10:17am 
Fonts still tiny tho
Tiagoquix Apr 19, 2024 @ 7:13am 
Obsolete 👍
lightwo  [author] Apr 19, 2024 @ 1:59am 
Oh, right. They did post an announcement, I just failed to notice it in my RSS reader. Welp :cfacepalm: