From 15e46bac82629ca03d7d856f1725fe510f225359 Mon Sep 17 00:00:00 2001 From: Andrzej Kapolka Date: Wed, 1 May 2013 11:59:21 -0700 Subject: [PATCH] Disable kerning, expand bounds to account for antialiasing. --- interface/src/ui/TextRenderer.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/interface/src/ui/TextRenderer.cpp b/interface/src/ui/TextRenderer.cpp index 5780c59ec1..3130463398 100644 --- a/interface/src/ui/TextRenderer.cpp +++ b/interface/src/ui/TextRenderer.cpp @@ -22,6 +22,7 @@ Glyph::Glyph(int textureID, const QPoint& location, const QRect& bounds, int wid TextRenderer::TextRenderer(const char* family, int pointSize, int weight, bool italic) : _font(family, pointSize, weight, italic), _metrics(_font), _x(IMAGE_SIZE), _y(IMAGE_SIZE), _rowHeight(0) { + _font.setKerning(false); } TextRenderer::~TextRenderer() { @@ -96,6 +97,8 @@ const Glyph& TextRenderer::getGlyph(char c) { glyph = Glyph(0, QPoint(), QRect(), _metrics.width(ch)); return glyph; } + // grow the bounds to account for antialiasing + bounds.adjust(-1, -1, 1, 1); if (_x + bounds.width() > IMAGE_SIZE) { // we can't fit it on the current row; move to next