summaryrefslogtreecommitdiff
path: root/src/fontcache.cpp
AgeCommit message (Collapse)Author
2021-05-13Codechange: move font settings to std::stringrubidium42
2021-05-13Codechange: make explicit that virtual functions in a con/destructor are ↵Rubidium
resolved statically This as during construction the sub class has not been initialized yet, and during destruction the sub class has already been destroyed, so the overriding virtual function would be accessing uninitialized data.
2021-05-01Codechange: Scale sprite font height once on init instead of every call to ↵Peter Nelson
GetHeight(). Scaling is not expensive, but it does not change either, and this avoids the need for a virtual method call. This cascades back to all GetCharacterHeight(FS_xxx) and FONT_HEIGHT_xxx calls.
2021-05-01Cleanup: Use GetDefaultFontHeight() call instead of direct access.Peter Nelson
This makes this part of font size setup in FreeTypeFontCache consist with OSX and Windows variants.
2021-02-23Fix #8731: Always use a 32bpp blitter if font anti-aliasing is enabled.Michael Lutz
2021-02-22Codechange: Make the simple Malloc sprite allocator globally usable.Michael Lutz
2021-02-22Codechange: Give sprite encoders a hint which colour components of a sprite ↵Michael Lutz
are filled with useful information.
2021-02-14Add: [OSX] Native font rendering without using FreeType.Michael Lutz
2021-02-14Codechange: Replace magic numbers by constants.Michael Lutz
2021-02-13Codechange: Move Fontconfig-specific code to a seperate file.Michael Lutz
2021-02-13Codechange: [Win32] Move Win32-specific font code to a seperate file.Michael Lutz
2021-02-13Codechange: Make OS font handle of the FontCache read-only.Michael Lutz
2021-02-05Codechange: Apply coding style (#8640)SamuXarick
* Fix: Missing or needed spaces * Codechange: Remove space * Codechange: Remove space * Codechange: More missing spaces * Codechange: Missing spaces * Codechange: Remove space * Codechange: Remove space
2021-01-08Codechange: Remove min/max functions in favour of STL variants (#8502)Charles Pigott
2021-01-03Fix: [OSX] Fonts loaded directly from a file have to be registered with ↵Michael Lutz
CoreText for proper text layout.
2021-01-02Add: use our search-paths to find fonts based on relative filenames tooPatric Stout
This allows "small_font = ./myfont.ttf", with "myfont.ttf" located in "~/.openttd".
2020-12-15Add: support for emscripten (play-OpenTTD-in-the-browser)Patric Stout
Emscripten compiles to WASM, which can be loaded via HTML / JavaScript. This allows you to play OpenTTD inside a browser. Co-authored-by: milek7 <me@milek7.pl>
2020-05-21Codechange: Consistently use WChar when passing characters around, and also ↵Michael Lutz
define it as char32_t.
2020-05-21Codechange: Replace SmallPair with std::pair.Michael Lutz
std::pair is already the smallest possible pair, and it already handles non-POD types correctly.
2019-11-10Cleanup: Removed SVN headersS. D. Cloudt
2019-09-29Fix: Some typos found using codespellJMcKiern
2019-05-14Add: [Win32] Support for loading fonts from a file for the GDI font renderer.Michael Lutz
2019-05-14Codechange: [Win32] Pass a native GDI font description around when we have ↵Michael Lutz
one, instead of repeatedly guessing the font.
2019-05-14Add: [Win32] GDI engine for font glyph rendering as a replacement for ↵Michael Lutz
including FreeType. Building with FreeType is still possible and will take precedence over the GDI renderer, but the project files don't include FreeType anymore by default. Combining GDI rendering with ICU text layout is untested.
2019-05-14Codechange: Refactor the Freetype font cache into a generic part that does ↵Michael Lutz
not depend on Freetype and into one that does. This makes it easier to add other TrueType font rendering engines.
2019-04-10Codechange: Use null pointer literal instead of the NULL macroHenry Wilson
2019-03-26Codechange: Replaced SmallVector::[Begin|End]() with std alternativesHenry Wilson
2019-02-24Fix #7266: Reorder reinitialization of caches when changing font zoom level. ↵PeterN
(#7273)
2019-02-23Fix #7003: Freetype fonts were scaled by both GUI and Font zoom levels. (#7267)PeterN
2019-02-23Feature: Add option to adjust font size separately from GUI size. (#7003)Greg Carlin
Adds an option in the "Game Options" next to "Interface Size" called "Font Size". Available options are normal, double, and quad.
2019-01-17Fix #7032: use the same mode to load and render glyphsglx
2018-12-08Add: [OSX] Text layout using the native CoreText API.Michael Lutz
By default, the native API will be used instead of ICU, but if ICU is forced in using configure, it will take precedence.
2018-06-17Fix: Scale default FreeType font size selection by UI zoom level.Michael Lutz
2018-06-06Add: [Win32] Text layout using the native Windows Uniscribe library.Michael Lutz
Uniscribe is sometimes producing different results compared to ICU, especially when RTL and LTR content is mixed. Comparing the results to other programs (like editors or web browsers) leads me to believe that the result are at least not worse than ICU and possibly better.
2017-08-13(svn r27893) -Codechange: Use fallthrough attribute. (LordAro)frosch
2017-07-11(svn r27888) -Fix: Member access coding style (adf88)frosch
2017-04-23(svn r27859) -Revert (r27858): Committed too much :(peter1138
2017-04-23(svn r27858) -Change [FS#6560]: Add missing game script event for ships ↵peter1138
arriving at a station. (juanjo)
2015-03-15(svn r27187) -Fix: Code style.frosch
2015-02-01(svn r27134) -Codechange: Simplify GUI scaling by adding UnScaleGUI() and ↵frosch
ScaleGUITrad().
2014-12-11(svn r27079) -Fix: Compilation with freetype2 version 2.5.4 and newer (AMDmi3)planetmaker
2014-10-15(svn r27020) -Cleanup: some coding style consistency improvements (mostly ↵rubidium
spaces)
2014-10-14(svn r27015) -Codechange: Also scale the character spacing for fonts without ↵peter1138
shadow.
2014-10-12(svn r27004) -Codechange: Make GUI size apply to (sprite-font) text as well.peter1138
2014-10-12(svn r27003) -Cleanup: fix the use of spaces and asterices "around" some ↵rubidium
comments
2014-04-23(svn r26482) -Codechange: add an include that allows us to undefine/redefine ↵rubidium
"unsafe" functions to prevent them from being used, and thus having to care about certain aspects of their return values
2014-03-03(svn r26389) -Fix [FS#5885]: Select a specific font size when freetype fails ↵fonsinchen
to select one automatically.
2014-01-02(svn r26209) -Codechange: remove some template magic and simplify some coderubidium
2013-12-22(svn r26170) -Feature-ish: add the currently used fonts to the crash logrubidium
2013-10-13(svn r25860) -Fix [FS#5737] (r25570): When clearing font cache, also clear ↵frosch
layout cache. (adf88)