MCPcopy Create free account
hub / github.com/OpenTTD/OpenTTD / ScaleFontTrad

Function ScaleFontTrad

src/fontcache/spritefontcache.cpp:31–34  ·  view source on GitHub ↗

* Scale traditional pixel dimensions to font zoom level, for drawing sprite fonts. * @param value Pixel amount at #ZOOM_BASE (traditional "normal" interface size). * @return Pixel amount at _font_zoom (current interface size). */

Source from the content-addressed store, hash-verified

29 * @return Pixel amount at _font_zoom (current interface size).
30 */
31static int ScaleFontTrad(int value)
32{
33 return UnScaleByZoom(value * ZOOM_BASE, _font_zoom);
34}
35
36static std::array<std::unordered_map<char32_t, SpriteID>, FS_END> _char_maps{}; ///< Glyph map for each font size.
37

Callers 3

SpriteFontCacheMethod · 0.85
ClearFontCacheMethod · 0.85
GetGlyphWidthMethod · 0.85

Calls 1

UnScaleByZoomFunction · 0.85

Tested by

no test coverage detected