OpenTTD Source  20240919-master-gdf0233f4c2
spritefontcache.cpp File Reference
#include "../stdafx.h"
#include "../fontcache.h"
#include "../gfx_layout.h"
#include "../zoom_func.h"
#include "spritefontcache.h"
#include "../table/sprites.h"
#include "../table/control_codes.h"
#include "../table/unicode.h"
#include "../safeguards.h"

Go to the source code of this file.

Functions

static int ScaleFontTrad (int value)
 Scale traditional pixel dimensions to font zoom level, for drawing sprite fonts. More...
 

Variables

static const int ASCII_LETTERSTART = 32
 First printable ASCII letter.
 

Detailed Description

Sprite fontcache implementation.

Definition in file spritefontcache.cpp.

Function Documentation

◆ ScaleFontTrad()

static int ScaleFontTrad ( int  value)
static

Scale traditional pixel dimensions to font zoom level, for drawing sprite fonts.

Parameters
valuePixel amount at #ZOOM_BASE (traditional "normal" interface size).
Returns
Pixel amount at _font_zoom (current interface size).

Definition at line 29 of file spritefontcache.cpp.

References UnScaleByZoom().

Referenced by SpriteFontCache::ClearFontCache(), and SpriteFontCache::SpriteFontCache().