OpenTTD Source 20241224-master-gee860a5c8e
spritefontcache.cpp File Reference

Sprite fontcache implementation. More...

#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.
 

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 _font_zoom, and UnScaleByZoom().

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

Variable Documentation

◆ ASCII_LETTERSTART

const int ASCII_LETTERSTART = 32
static

First printable ASCII letter.

Definition at line 22 of file spritefontcache.cpp.

Referenced by SpriteFontCache::InitializeUnicodeGlyphMap().