1
0
mirror of https://github.com/OpenTTD/OpenTTD.git synced 2025-08-22 05:59:10 +00:00

(svn r7182) -Feature: Merge utf8 branch. This brings us support for Unicode/UTF-8 and the option for fonts rendered by FreeType. Language changes to come.

This commit is contained in:
2006-11-16 22:05:33 +00:00
parent 40d647ddde
commit 1a4f1c8177
43 changed files with 1778 additions and 867 deletions

11
gfx.h
View File

@@ -43,8 +43,8 @@ void GfxScroll(int left, int top, int width, int height, int xo, int yo);
// XXX doesn't really belong here, but the only
// consumers always use it in conjunction with DoDrawString()
#define UPARROW "\x80"
#define DOWNARROW "\xAA"
#define UPARROW "\xEE\x8A\x80"
#define DOWNARROW "\xEE\x8A\xAA"
int DrawStringCentered(int x, int y, StringID str, uint16 color);
@@ -96,13 +96,8 @@ void ToggleFullScreen(bool fs);
/* gfx.c */
#define ASCII_LETTERSTART 32
extern FontSize _cur_fontsize;
extern byte _stringwidth_table[FS_END][224];
static inline byte GetCharacterWidth(FontSize size, byte key)
{
assert(key >= ASCII_LETTERSTART);
return _stringwidth_table[size][key - ASCII_LETTERSTART];
}
byte GetCharacterWidth(FontSize size, uint32 key);
static inline byte GetCharacterHeight(FontSize size)
{