From 4709bf3066cff2c05654103cd765c505f54e9ecf Mon Sep 17 00:00:00 2001 From: Graeme Geldenhuys Date: Thu, 16 May 2013 16:30:51 +0100 Subject: 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. --- src/corelib/render/software/Agg2D.pas | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/corelib/render/software/Agg2D.pas') 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} -- cgit v1.2.3-70-g09d2