Peter Nelson
c3b0d71973
Codechange: use EnumRange over many enum loops
2026-06-13 21:54:42 +01:00
Jonathan G Rennison
89174e891a
Codechange: typedef for EnumClassIndexContainer with std::array ( #15548 )
2026-04-30 14:59:10 -04:00
Rubidium
7434052eb6
Codechange: make FontSize a scoped enum
2026-04-12 18:10:34 +02:00
Peter Nelson
9a0af4387b
Codechange: pass required font/os_handle via FontProviderManager::LoadFont()
...
This allows fonts other than configured to be loaded.
2026-04-03 19:45:46 +01:00
Peter Nelson
cdfbb113ce
Codechange: MissingGlyphSearcher now contains which fontsizes to search for
2026-04-03 19:45:46 +01:00
Rubidium
bcaf3eaec2
Codefix: wrong parameter names and partially missing parameters
2026-02-02 18:18:51 +01:00
Peter Nelson
b03347f00c
Revert: "Change: Support side-by-side fallback FontCaches instead of hierarchical. ( #13303 )"
...
This reverts commit 1829f7926d .
2025-12-13 09:09:21 +00:00
Cyprian Klimaszewski
99f04f27de
Doc: Update information for receiving a copy of GPL. ( #14869 )
2025-12-07 11:25:08 +00:00
Peter Nelson
1829f7926d
Change: Support side-by-side fallback FontCaches instead of hierarchical. ( #13303 )
...
The text layouter system can now support using different fonts for different glyphs, including mixing scalable and sprite glyphs.
2025-12-06 10:47:12 +00:00
Peter Nelson
5d5d27841b
Fix: Bootstrap ignored default OpenTTD truetype fonts. ( #14684 )
...
Bootstrapping assumed that glyphs must be missing if there is no baseset, ignoring whether there actually are glyphs missing.
2025-09-30 22:16:50 +01:00
Rubidium
aa7eb089c6
Codechange: make all Providers fully const (Font/Screenshot/Sound)
2025-09-29 23:39:13 +03:00
Peter Nelson
5ed8f1203b
Codechange: Cleanup unnecessary includes of spritecache.h ( #14678 )
2025-09-28 17:09:57 +00:00
Peter Nelson
e1a50abcbb
Codechange: Move fallback font detection to FontCacheFactory.
...
Provides a standard interface instead of relying on defines.
2025-08-07 19:38:00 +01:00
Peter Nelson
140f2b291a
Codechange: Use ProviderManager interface to register FontCache factories.
...
This removes use of #ifdefs to select the appropriate loader, and also replaces FontCache self-registration.
2025-08-07 19:38:00 +01:00
Peter Nelson
b82ffa3542
Codechange: Decouple glyph map from SpriteFontCache instances. ( #14449 )
...
This makes the map independent from the SpriteFontCache instances.
2025-07-20 22:58:43 +01:00
Peter Nelson
61a299bc99
Codechange: Use SpriteID as GlyphID for SpriteFontCache. ( #14439 )
...
This reduces the amount of lookups in the character map as rendering a cached layout no longer needs to do so.
2025-07-14 13:28:10 +01:00
Peter Nelson
7546c1acab
Codefix f220ed179d: GetUnicodeGlyph takes a unicode character. ( #14438 )
...
Previous change erroneously changed type to GlyphID, based on naming. It should actually be char32_t.
2025-07-14 08:01:42 +00:00
Peter Nelson
a288644e20
Fix #12815 , 7e914a0568: Fallback detection failed with sprite font. ( #12816 )
...
How missing glyphs were detected was changed, but the sprite font still substituted `?`, which to missing glyph looked like all characters are present.
2024-06-27 07:34:01 +01:00
Peter Nelson
f220ed179d
Codechange: Use std::unordered_map for SpriteFontCache's glyph map. ( #12724 )
...
Replaces a C-style malloc'd array and malloc'd contents, and no manual memory clean up is necessary.
2024-05-28 19:34:03 +01:00
Rubidium
4f2412a272
Codechange: range based for loops instead of C-style for loops
2024-04-11 07:05:04 +02:00
Peter Nelson
9854553e10
Codechange: ZOOM_LVL_SHIFT/BASE are not actually ZOOM_LVLs.
...
Rename to ZOOM_BASE_SHIFT and ZOOM_BASE respectively, and derive from ZOOM_LVL instead of numeric value.
2024-04-04 22:27:03 +01:00
Patric Stout
a3cfd23cf9
Codechange: rename byte to uint8_t ( #12308 )
2024-03-16 23:59:32 +01:00
Rubidium
eaae0bb5e7
Codechange: automatic adding of _t to (u)int types, and WChar to char32_t
...
for i in `find src -type f|grep -v 3rdparty/fmt|grep -v 3rdparty/catch2|grep -v 3rdparty/opengl|grep -v stdafx.h`; do sed 's/uint16& /uint16 \&/g;s/int8\([ >*),;[]\)/int8_t\1/g;s/int16\([ >*),;[]\)/int16_t\1/g;s/int32\([ >*),;[]\)/int32_t\1/g;s/int64\([ >*),;[]\)/int64_t\1/g;s/ uint32(/ uint32_t(/g;s/_uint8_t/_uint8/;s/Uint8_t/Uint8/;s/ft_int64_t/ft_int64/g;s/uint64$/uint64_t/;s/WChar/char32_t/g;s/char32_t char32_t/char32_t WChar/' -i $i; done
2023-07-19 19:30:14 +02:00
PeterN
db573c8742
Fix #10660 : Sprite Font scale affected by viewport zoom level limits. ( #10668 )
2023-04-17 00:14:03 +02:00
PeterN
e97bf271dc
Codechange: Make SpriteType, CargoSortType, SourceType and ScriptType enum classes. ( #10663 )
...
This avoids a (soft) namespace conflict between the four ST_* enums.
2023-04-16 20:00:55 +01:00
Peter Nelson
8599041ce4
Fix: GetDefaultFontHeight() is static, don't use ->
2022-12-18 11:46:01 -05:00
Peter Nelson
9666e46739
Feature: Variable GUI scale.
...
GUI scale is now variable from 100% to 500%, and no longer restricted to
powers-of-2.
2022-11-12 18:28:39 +00:00
Peter Nelson
13d271217f
Change: Sprite-scale inter-character spacing of fonts.
2022-11-12 18:28:39 +00:00
Peter Nelson
2cdd8b7429
Change: Separate fontcache implementations.
2022-09-25 18:34:24 +01:00