Facepunch / garrysmod-issues

Garry's Mod issue tracker
139 stars 56 forks source link

Custom fonts not appearing in Linux specifically #415

Open Mors-Quaedam opened 11 years ago

Mors-Quaedam commented 11 years ago

I believe this is related to #129, however before switching to Linux from Windows, custom fonts DID load (for example, in HL2RP)

Here, for example, the counter-strike font isn't being loaded into GMod for when killing someone with a CSS weapon (the knife, in this example) http://screencloud.net/img/screenshots/c4a4d80d3fcd0cfc635116534f48b776.png

And where in Exsto's chat box it should be coolvetica... http://screencloud.net/img/screenshots/b4d16d3bea4e90411655ab3cfd9f8179.png

And the italic fonts in most menus... http://screencloud.net/img/screenshots/f347172e0f9d4bc6bbf17cc952d05221.png

(the following image is an example of how the previous two images SHOULD look...) http://puu.sh/44Ksg/a0675adbe3.jpg

robotboy655 commented 10 years ago

Gotta add, same happens on OS X.

Mors-Quaedam commented 10 years ago

I found out, on Linux and Mac OS, installing the font into the system itself allows GMod to load that font into the game.

See http://facepunch.com/showthread.php?t=1374457&p=44774515&viewfull=1#post44774515

Bo98 commented 10 years ago

For OS X you do not need to install the font as the bug is because the casing of the font name in surface.CreateFont matters - unlike Windows.

This should be corrected otherwise fonts in hundreds of addons and gamemodes (eg. TTT) will not work until updated.

Bo98 commented 10 years ago

PR for Derma fonts: garrynewman/garrysmod#720

jackwilsdon commented 10 years ago

Even after installing ttf-mscorefonts (Verdana included), chat is still quite small.

screenshot from 2014-07-15 21 19 31

This bug actually seems to be inherited from the source engine itself, as I get the following errors in the console;

m_face->glyph->bitmap.width is 0 for ch:32 Verdana
m_face->glyph->bitmap.width is 0 for ch:32 Arial
ludalex commented 9 years ago

I can confirm this happening on OSX too. Also, custom fonts fail to mount from Workshop addons.

Bo98 commented 9 years ago

The case sensitivity of font names on OS X is fixed in the dev branch. Was not aware of Workshop addon fonts bugging so I haven't checked that.

@Mors-Quaedam If you can, could you check whether the Linux bug of having to install the font is fixed (dev branch)?

Mors-Quaedam commented 9 years ago

Can confirm fonts are working in Linux now.

Screenshot

Screenshot 2

Screenshot 3

Bo98 commented 9 years ago

@ludalex The issue of Workshop fonts not working is already being tracked at #883 and is not OS specific like this issue.

jackwilsdon commented 9 years ago

@Mors-Quaedam Still doesn't look exactly right. Text is usually larger.

philxyz commented 8 years ago

Things still look quite different under Linux when compared with Windows.

Damianu commented 7 years ago

Some Unicode characters(even with extended set to true) just dont want to show on linux, they are blank, however when I force my fontconfig to use different font it displays square, because for some reason gmod cant render my fallback properly(It's WenQuanYi Zen Hei for japaneese characters). I am on archlinux.

ApertureDevelopment commented 7 years ago

I have also such a Problem. The Fonts are in the Servers content and the clients did downloaded it via ressource.AddWorkshop() but the fonts aren't loading. Most of the HUD stuff is broken .. The strange part is some work and some don't, I restaretd my game now 3 times, cleared cache and downloads, let it Re-Download but still .. the bug is happening.

Extra Details: My System: Win 10 Pro My Server: Linux Debian 8.7 Jessie

JShorthouse commented 7 years ago

Still having this issue, custom fonts just fallback to the default font. Font name is in the correct case, font is downloaded to the client but doesn't display in game and there are no console errors either.

JShorthouse commented 7 years ago

Just tried the earlier solution by @Mors-Quaedam and can confirm that it works, installing the font locally makes it load in game as intended, so there's obviously an issue with how fonts are loaded rather than it being gamemode / rendering related.

JShorthouse commented 7 years ago

Sorry to keep commenting but I've discovered that this issue happens even with the included fonts, not just custom server ones. csd.ttf (cs:s killicon font) doesn't display correctly unless manually installed to the system font directory.

Xalalau commented 3 months ago

This issue remains relevant... I can confirm the workaround is still the only thing we can do, manually install the fonts in the system. E.g. My Zombie Survival v1.11 restoration text:

image

What I did on Ubuntu:

We can also install MS fonts on Proton using protontricks: https://github.com/Matoking/protontricks https://www.reddit.com/r/wine_gaming/comments/lt6mux/text_rendering_issues_with_source_engine_games/

For Source Generally you should Need Tahoma, Arial, Verdana, Trebuchet MS, Helvetica and Courier New. using wine/protontricks install arial,corefonts,trebuchet,verdana and it should look pretty much perfect in most ways.

But I got mixed results after that. The "install all power point fonts" option seems to make things better.