Commit Graph

11 Commits

Author SHA1 Message Date
PeterN eda3defcb5
Codechange: Pass language for font detection as std::string. (#10964) 2023-06-06 20:55:56 +00:00
PeterN 7a0b6b7ddf
Codechange: Remove Freetype bits on Win32/OSX. (#10960)
These platforms have their own specific font rendering.
2023-06-06 19:43:27 +01:00
Patric Stout cd751a598a
Fix: Wayland crash on startup due to Pango also using FontConfig (#10916)
Basically, we haven't been a good neighbour. Turns out you shouldn't
actually call FcFini when you are done, as some library might still
want to use FontConfig. And they use a shared instance for their
administration.

The idea is that you call FcInit once, and use FcConfigReference
after that to get an instance, you can release. This entry is
ref-counted, and things happen automatically based on that.

At least, I think.
2023-06-03 19:09:02 +00:00
PeterN 876871157f
Fix: Ask FontConfig for the face index when opening fonts. (#10878)
This allows selection of the correct face in truetype fonts containing
multiple faces.
2023-05-26 18:56:13 +00:00
Rubidium 6f2f38b3ed Codechange: fmt (and std::format) do explicitly not support enums out-of-the-box
That it works for the version we have packaged it pure coincidence, as that is
one of the few versions that due to a bug allow it. So add the appropriate
template specialisations to support it out-of-the-box within OpenTTD.
2023-05-22 14:42:18 +02:00
Rubidium 86786a7af6 Codechange: introduce StrEqualsIgnoreCase/StrCompareIgnoreCase to replace strcasecmp 2023-04-29 10:25:25 +02:00
Rubidium f5f6306af3 Codechange: use string/fmt instead of printf for ShowInfo(F) 2023-04-24 17:51:54 +02:00
Peter Nelson f6ad8e1c9c Change: Rename some freetype things to fontcache.
The font cache supports more than just FreeType as a font provider, but still used freetype in some naming.

This now uses more suitable terms.
2022-09-25 18:34:24 +01:00
Rubidium f904aef176 Cleanup: use nullptr instead of 0 or NULL 2021-06-17 16:18:30 +02:00
rubidium42 55a11710a6 Codechange: convert printf DEBUG statements to fmt Debug statements 2021-06-13 12:45:45 +02:00
Michael Lutz 63ed3f3575 Codechange: Move Fontconfig-specific code to a seperate file. 2021-02-13 20:09:14 +01:00
Renamed from src/fontdetection.cpp (Browse further)