diff options
author | r.kuznetsov <r.kuznetsov@corp.mail.ru> | 2015-10-07 12:24:45 +0300 |
---|---|---|
committer | r.kuznetsov <r.kuznetsov@corp.mail.ru> | 2015-11-30 16:16:36 +0300 |
commit | 1a2b29e96f02c042db5c149bd9ee884ece5aba74 (patch) | |
tree | 25ffb1f34c7fd5c49bbfd4289b76179ee2614e2a /drape_frontend/visual_params.cpp | |
parent | b1bb2a37df59a50023b8ec0c102d88fa9b2b455b (diff) |
Fixed font rendering on low-res screens
Diffstat (limited to 'drape_frontend/visual_params.cpp')
-rw-r--r-- | drape_frontend/visual_params.cpp | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/drape_frontend/visual_params.cpp b/drape_frontend/visual_params.cpp index 2d8a2c3e2d..2408919374 100644 --- a/drape_frontend/visual_params.cpp +++ b/drape_frontend/visual_params.cpp @@ -39,9 +39,21 @@ void VisualParams::Init(double vs, uint32_t tileSize, vector<uint32_t> const & a g_VizParams.m_visualScale = vs; if (find(additionalOptions.begin(), additionalOptions.end(), YotaDevice) != additionalOptions.end()) g_VizParams.m_isYotaDevice = true; + + // Here we set up glyphs rendering parameters separately for high-res and low-res screens. + if (vs <= 1.0) + g_VizParams.m_glyphVisualParams = { 0.48, 0.625, 0.64, 0.95, 0.48, 0.625 }; + else + g_VizParams.m_glyphVisualParams = { 0.41, 0.565, 0.57, 0.95, 0.45, 0.6 }; + RISE_INITED; } +uint32_t VisualParams::GetGlyphSdfScale() const +{ + return (m_visualScale <= 1.0) ? 3 : 4; +} + VisualParams & VisualParams::Instance() { ASSERT_INITED; @@ -110,6 +122,11 @@ double VisualParams::GetDragThreshold() const return 10.0 * GetVisualScale(); } +VisualParams::GlyphVisualParams const & VisualParams::GetGlyphVisualParams() const +{ + return m_glyphVisualParams; +} + VisualParams::VisualParams() : m_tileSize(0) , m_visualScale(0.0) |