summaryrefslogtreecommitdiffstats
path: root/src/render/Font.cpp
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/render/Font.cpp24
1 files changed, 21 insertions, 3 deletions
diff --git a/src/render/Font.cpp b/src/render/Font.cpp
index 78a8599e..9b022394 100644
--- a/src/render/Font.cpp
+++ b/src/render/Font.cpp
@@ -390,9 +390,9 @@ CFont::PrintChar(float x, float y, wchar c)
x + 32.0f * RenderState.scaleX * 1.0f,
y + 33.0f * RenderState.scaleY * 0.5f),
RenderState.color,
- xoff / 16.0f, yoff / 12.8f,
- (xoff + 1.0f) / 16.0f - 0.001f, yoff / 12.8f - 0.017f,
- xoff / 16.0f, (yoff + 1.0f) / 12.8f,
+ xoff / 16.0f, yoff / 12.8f + 0.0021f,
+ (xoff + 1.0f) / 16.0f - 0.001f, yoff / 12.8f + 0.0021f,
+ xoff / 16.0f, (yoff + 1.0f) / 12.8f - 0.017f,
(xoff + 1.0f) / 16.0f - 0.001f, (yoff + 1.0f) / 12.8f - 0.017f);
}
} else
@@ -1437,3 +1437,21 @@ CFont::SetDropColor(CRGBA col)
if (Details.alphaFade < 255.0f)
Details.dropColor.a *= Details.alphaFade / 255.0f;
}
+
+void
+CFont::FilterOutTokensFromString(wchar *str)
+{
+ int newIdx = 0;
+ wchar copy[256], *c;
+ UnicodeStrcpy(copy, str);
+
+ for (c = copy; *c != '\0'; c++) {
+ if (*c == '~') {
+ c++;
+ while (*c != '~') c++;
+ } else {
+ str[newIdx++] = *c;
+ }
+ }
+ str[newIdx] = '\0';
+}