summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGraeme Geldenhuys <graemeg@gmail.com>2013-05-16 16:30:51 +0100
committerGraeme Geldenhuys <graemeg@gmail.com>2013-05-16 16:30:51 +0100
commit4709bf3066cff2c05654103cd765c505f54e9ecf (patch)
tree2603469e5166d7aef4597bd4642f2239e19779e6
parent27f7b51c78fba871ad7a84d2601f4f4298cba5f7 (diff)
downloadfpGUI-4709bf3066cff2c05654103cd765c505f54e9ecf.tar.xz
Agg2D: rought conversion of font point size to pixel size.
Agg2D/AggPas defines font sizes in pixels, whereas the rest of fpGUI uses point sizes. So we needed to translate between the two. This is just a temporary implementation. A more accurate DPI aware version will come later.
-rw-r--r--src/corelib/render/software/Agg2D.pas3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/corelib/render/software/Agg2D.pas b/src/corelib/render/software/Agg2D.pas
index 84bb2351..dffc64c7 100644
--- a/src/corelib/render/software/Agg2D.pas
+++ b/src/corelib/render/software/Agg2D.pas
@@ -2670,7 +2670,8 @@ begin
m_fontEngine.hinting_(m_textHints );
if cache = AGG_VectorFontCache then
- m_fontEngine.height_(height{ * 1.3333} ) // 9pt = ~12px so that is a ration of 1.3333
+ {$NOTE We need to fix this. Translating from font pt to pixels is inaccurate. This is just a temp fix for now. }
+ m_fontEngine.height_(height * 1.3333 ) // 9pt = ~12px so that is a ration of 1.3333
else
m_fontEngine.height_(worldToScreen(height ) );
{$ENDIF}