summaryrefslogtreecommitdiffstats
path: root/src/renderer/Font.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/renderer/Font.h')
-rw-r--r--src/renderer/Font.h27
1 files changed, 18 insertions, 9 deletions
diff --git a/src/renderer/Font.h b/src/renderer/Font.h
index 42eb7b4c..fdf5f3f2 100644
--- a/src/renderer/Font.h
+++ b/src/renderer/Font.h
@@ -39,6 +39,9 @@ struct CFontDetails
int nFlashTimer;
bool8 anonymous_23;
uint32 anonymous_25;
+ CRGBA outlineColor;
+ int bOutlineOn;
+ int line;
};
struct CFontRenderState
@@ -58,6 +61,9 @@ struct CFontRenderState
bool8 proportional;
bool8 anonymous_14;
int16 style;
+ int bOutlineOn;
+ int line;
+ bool8 rightJustify;
};
class CSprite2d;
@@ -66,10 +72,7 @@ enum {
FONT_BANK,
FONT_STANDARD,
FONT_HEADING,
-#ifdef MORE_LANGUAGES
- FONT_JAPANESE,
-#endif
- MAX_FONTS = FONT_HEADING
+ MAX_FONTS
};
enum {
@@ -127,9 +130,9 @@ class CFont
static uint8 LanguageSet;
static int32 Slot;
#else
- static int16 Size[MAX_FONTS][210];
+ static int16 Size[MAX_FONTS][419];
#endif
- static int16 NewLine;
+ static bool16 NewLine;
public:
static CSprite2d Sprite[MAX_FONTS];
static CFontDetails Details;
@@ -151,7 +154,6 @@ public:
static void PrintChar(float x, float y, wchar c);
static void PrintString(float x, float y, wchar *s);
#ifdef XBOX_SUBTITLES
- static void PrintStringFromBottom(float x, float y, wchar *str);
static void PrintOutlinedString(float x, float y, wchar *str, float outlineStrength, bool fromBottom, CRGBA outlineColor);
#endif
static int GetNumberLines(float xstart, float ystart, wchar *s);
@@ -162,7 +164,7 @@ public:
static void PrintString(float x, float y, uint32, wchar *start, wchar *end, float spwidth);
//#endif
static void PrintStringFromBottom(float x, float y, wchar *str);
- static float GetCharacterWidth(wchar c);
+ static float GetCharacterWidth(wchar c, bool forceProportional = false);
static float GetCharacterSize(wchar c);
static float GetStringWidth(wchar *s, bool spaces = false);
#ifdef MORE_LANGUAGES
@@ -194,6 +196,7 @@ public:
static void SetBackgroundOff(void);
static void SetBackGroundOnlyTextOn(void);
static void SetBackGroundOnlyTextOff(void);
+ static void SetFlashOff(void);
static void SetPropOn(void);
static void SetPropOff(void);
static void SetFontStyle(int16 style);
@@ -203,8 +206,14 @@ public:
static void SetBackgroundColor(CRGBA col);
static void SetColor(CRGBA col);
static void SetDropColor(CRGBA col);
- static wchar FindNewCharacter(wchar c);
+
+ static void SetOutlineColor(CRGBA col);
+ static void SetOutlineOn(int on);
+ static void SetNewLineAdd(int line);
+
+ static int16 FindNewCharacter(int16 c);
static void FilterOutTokensFromString(wchar*);
+ static bool16 CheckNewLine(wchar *s);
#ifdef MORE_LANGUAGES
static void ReloadFonts(uint8 set);