DONE. Now GLFont.getFont() retturns a proxy that automatically selects the best font for the required size

This commit is contained in:
vsonnier
2016-06-23 21:17:02 +02:00
parent 83b62cddeb
commit 78cfe9c755
8 changed files with 142 additions and 196 deletions
+3 -2
View File
@@ -35,7 +35,7 @@ void ScopeContext::DrawTunerTitles(bool ppmMode) {
glColor3f(0.65f, 0.65f, 0.65f);
GLFont& refDrawingFont = GLFont::getFont(GLFont::GLFONT_SIZE12);
GLFont::Drawer refDrawingFont = GLFont::getFont(12, GLFont::getScaleFactor());
refDrawingFont.drawString(ppmMode?"Device PPM":"Frequency", -0.66f, -1.0+hPos, GLFont::GLFONT_ALIGN_CENTER, GLFont::GLFONT_ALIGN_CENTER, 0, 0, true);
refDrawingFont.drawString("Bandwidth", 0.0, -1.0+hPos, GLFont::GLFONT_ALIGN_CENTER, GLFont::GLFONT_ALIGN_CENTER, 0, 0, true);
@@ -49,7 +49,8 @@ void ScopeContext::DrawDeviceName(std::string deviceName) {
float hPos = (float) (viewHeight - 20) / viewHeight;
glColor3f(0.65f, 0.65f, 0.65f);
GLFont::getFont(GLFont::GLFONT_SIZE12).drawString(deviceName.c_str(), 1.0, hPos, GLFont::GLFONT_ALIGN_RIGHT, GLFont::GLFONT_ALIGN_CENTER, 0, 0, true);
GLFont::getFont(12, GLFont::getScaleFactor()).drawString(deviceName.c_str(), 1.0, hPos, GLFont::GLFONT_ALIGN_RIGHT, GLFont::GLFONT_ALIGN_CENTER, 0, 0, true);
}
void ScopeContext::DrawEnd() {