Add support for TrueType fonts

* Keeps original font system in place
* Uses the same API as original font system:
   - You can render only one line at a time
   - You can only use one font and color for one gr_text* call
* Caches all rendered text, with a string cache limited to 400
  entries, then it trucates to 250, which results in memory
  usage hovering around 5-10MB

Change-Id: I36107b9dcd8d57bae4486fce8b8f64e49ef3d906
Signed-off-by: Vojtech Bocek <vbocek@gmail.com>
This commit is contained in:
Vojtech Bocek
2014-09-07 15:01:56 +02:00
committed by Dees Troy
parent b4bd697f27
commit 76ee903d84
35 changed files with 938 additions and 122 deletions
+1 -1
View File
@@ -177,7 +177,7 @@ GUIConsole::GUIConsole(xml_node<>* node) : GUIObject(node)
}
}
gr_getFontDetails(mFont, &mFontHeight, NULL);
mFontHeight = gr_getMaxFontHeight(mFont ? mFont->GetResource() : NULL);
SetActionPos(mRenderX, mRenderY, mRenderW, mRenderH);
SetRenderPos(mConsoleX, mConsoleY);
return;