Commit Graph
54 Commits
Author SHA1 Message Date
Aaron van Geffen 6ee798337a Introduce EnumUtils header (#23407) 2024-12-15 17:39:52 +01:00
jason-millsandTulio Leao 09b66e9075 Part of #21421: Update FontFamilies.h, audio.h with new constant notation (#22838)
Co-authored-by: Tulio Leao <tupaschoal@gmail.com>
2024-09-28 07:01:10 -03:00
Aaron van Geffen 51873dc0f6 Include Diagnostic.h at unit level 2024-07-09 16:23:31 +02:00
Aaron van Geffen a63d86c488 Introduce Config namespace and struct 2024-05-10 12:10:21 +02:00
Michał Janiszewski dfcb527ada Ensure TTF system is torn down in correct order (#21707)
`TTFDispose` uses `gCurrentTTFFontSet` to deallocate internal resources.
Having the function called after global variable got changed meant it
tried to deallocate incorrect font and would subsequently call
`FT_Done_Face` on a struct having internal data set to nullptr.

Reproduction is fairly easy:
1. launch the game in Korean (I made sure to have all the indexes primed
   for this language beforehand - i.e. launch it twice),
2. switch to Japanese,
3. switch back to Korean

Fixes #21664
2024-04-02 00:52:40 +02:00
James103 1d8dc111f1 Replace 2023 with 2024 in copyright headers (#21139)
Replace all instances of the year 2023 with 2024 in all copyright headers
2024-01-01 12:52:28 +01:00
Hielke Morsinkandduncanspumpkin 6b7dc8fcdb Rename snake_case functions in openrct2/src folder
Co-authored-by: duncanspumpkin <duncans_pumpkin@hotmail.co.uk>
2023-01-17 13:24:51 +01:00
Duncan 8504c8d05e Finish Removing snake_case from Drawing Methods 2023-01-16 22:31:34 +00:00
Gymnasiast b6d422ff95 Migrate remaining C strings in config handling 2023-01-08 15:41:10 +01:00
James103 73738bbdc8 Replace 2022 with 2023 in copyright headers
Replace all instances of the year 2022 with 2023 in all copyright headers
2023-01-01 11:58:01 +01:00
Gymnasiast 14f9a75e0a Refactor FontSpriteBase and font size into FontStyle 2022-10-19 11:59:26 +02:00
Hielke Morsink 0ca7bb058f Rename public font config data members 2022-10-16 21:46:07 +02:00
73 b9e677945d Replace 20XX with 2022 (#18158)
* Replace 2020 with 2022

Replace all 2020 headers with 2022

* replace other years with 2022

add missing years
2022-10-01 08:42:14 +01:00
TELK 82e72afde5 Change y_offset and hintings of Nanum Gothic TTF Font for Korean 2021-07-03 15:32:41 +09:00
TELK a642b53088 Add Malgun Gothic as a TTF font alternative for Korean 2021-07-03 15:21:54 +09:00
Michael Steenbeek 6ac23fbabb Make Arabic font easier to read 2020-09-07 19:21:32 +02:00
Aaron van Geffen 7b5087f057 Update copyright year to 2020 2020-07-21 15:04:34 +02:00
Aaron van Geffen 91301eb0d0 Add Noto Sans as a TTF font alternative for Japanese. (#10971) 2020-03-19 12:36:33 +01:00
Michael Steenbeek e2e7079f17 Fix YaHei detection (#10820) 2020-02-22 22:35:51 +01:00
FredFucks d44e89d9a4 Fix Chinese fonts on Linux with "WenQuanYi Micro Hei" (#9584) 2019-07-17 11:22:38 +02:00
Aaron van Geffen 2af13904c5 Update copyright notices for 2019. (#8903) 2019-03-17 07:16:15 +00:00
clang-formatandHielke Morsink b02dfdbc93 Binpack function arguments together
Previously when the arguments of a function wouldn't fit on a single line, clang-format would put each argument on its own line instead. By enabling the binpack parameter setting, it tried to fit as many on one line as possible instead.

Co-authored-by: Hielke Morsink <hielke.morsink@gmail.com>
2018-07-23 16:00:22 +02:00
clang-format 17d2693422 clang-format interface 2018-07-23 16:00:04 +02:00
Michael Steenbeek 41dcae581a Remove support for the unused big font 2018-07-20 15:56:21 +02:00
Michael Steenbeek 1b08fb4e69 Replace our own integer types with standard ones 2018-06-20 17:30:40 +02:00
Hielke Morsink 0cf256ac9e Ready copyright notice for clang-format
Clang-format sees the text behind `#pragma region` as code and formats it. Instead of stating the copyright and date there, it's now in the comment block right below it. The text "Copyright" is left in the `#pragma region` line, as clang-format sees it as a single identifier.

I took the opportunity to normalize the dates, and add the copyright notice to the source files where it was missing them (except for third-party and the generated resources.h file).
2018-06-15 14:07:34 +02:00
Ted John 35df72e61f Remove use of gCurrentLanguage 2018-05-11 20:39:00 +01:00
Ted John 7b28078da2 Remove use of gUseTrueTypeFont 2018-05-11 20:37:48 +01:00
Michał Janiszewski 3303246b09 Reduce header inclusions 2018-03-20 00:27:58 +01:00
Aaron van Geffen bd928bc27e Make font hinting optional on a per-font basis.
Previously, hinting could only be disabled globally.
This commit disables hinting if the hinting threshold is set to 0.
Note that this parameter is configurable through config.ini, too.
2018-02-13 10:15:27 +01:00
Aaron van Geffen 1809eec079 Improve TrueType font appearance for scrolling texts.
This makes the scrolling text drawing code respect banner font y-offset definitions.
Font definitions are also adjusted accordingly. Definitions set prior were ignored
by the game thus far, hence the need for adjustment.
2018-02-13 10:15:27 +01:00
Michał Janiszewski 5a8cfb16c8 Clang-format guards for static data
This guards most of the hardcoded data from clang-format.

[ci skip]
2018-01-11 09:19:56 +01:00
Michael Steenbeek 755add6c9a Compile localisation folder as C++ 2018-01-06 18:32:25 +01:00
Ted John 3dcbebcf68 Refactor drawing.c to C++ 2018-01-05 22:57:57 +01:00
Ted John 144dbf431c Refactor ttf.c to C++ 2018-01-05 22:57:55 +01:00
Aaron van Geffen 13f99e495e Reduce console verbosity for TTF loading. 2017-11-17 10:31:26 +01:00
Aaron van Geffen dd4f5ff93b Use 'STHeiti' for Chinese (Simplified) on macOS. 2017-10-30 12:06:05 +01:00
Aaron van Geffen 9cb25e6106 Use 'LiHei Pro' for Chinese (Traditional) on macOS. 2017-10-30 12:06:05 +01:00
Aaron van Geffen b393ce3f11 Introduce 'Nanum' as a macOS alternative for Gulim when using Korean. 2017-10-30 12:06:05 +01:00
Aaron van Geffen 744341af07 Introduce 'Arial Unicode MS' as a more compatible alternative to regular Arial. 2017-10-30 12:06:05 +01:00
Aaron van Geffen 58add28604 Introduce 'Hiragino Maru Gothic' for Japanese on macOS. 2017-10-30 12:06:05 +01:00
Aaron van Geffen 8c8a2317f6 Initial prototype for font families. 2017-10-30 12:06:05 +01:00
Aaron van Geffen 9984fcac88 Set default TTF font heights to more sensible values. 2017-10-22 21:47:17 +02:00
Aaron van Geffen 551fdabc7f Make the hinting threshold configurable per font.
This addresses the issue that tofu would not show up in Arial on macOS if the
threshold was set to 60. It being the fallback font, it is important that they
do, which requires lowering to at most 43.

However, it is even more important that the threshold is left at 60 for kanji
in e.g. Japanese to render properly.

Hence, for the moment, Arial is the only font now using a hinting threshold
of 40, for now.
2017-10-15 22:31:11 +02:00
Aaron van Geffen bfc999aac9 Order language list by native name 2017-10-09 10:53:09 +02:00
Michael Steenbeek c8d6cf12e3 Add experimental Arabic language support 2017-09-21 09:24:06 +02:00
Michał Janiszewski 00fd18809c Move extern "C" {} blocks to headers (#6282) 2017-09-18 17:05:28 +02:00
Ted John 2c07a55696 Refactor TTF into new source and remove SDL2_ttf 2017-06-24 14:50:30 +01:00
Michał Janiszewski 79d76759bb Fix #5516: Update copyrights for 2017
Not all files were necessarily _changed_, but all were touched, see
https://github.com/OpenRCT2/OpenRCT2/pull/4932
2017-06-01 21:55:10 +02:00
CraigCraig 26287f5a3e More readability, grammar, spelling fixes 2017-05-15 09:28:43 +02:00