diff options
author | Andreas Hartmetz <ahartmetz@gmail.com> | 2011-01-21 23:33:47 +0000 |
---|---|---|
committer | Albert Astals Cid <aacid@kde.org> | 2011-01-21 23:33:47 +0000 |
commit | 88812e716c1a0c87a504118d47eb4cc6f52962fa (patch) | |
tree | e3cb41ed6c439f1765f56722ab9acaaea251d64c /poppler/ArthurOutputDev.cc | |
parent | dc5ec4668bdfe3b6ba41f0a2e551bbc07f8839ba (diff) |
Add Hinting API to ArthurOutputDev
Diffstat (limited to 'poppler/ArthurOutputDev.cc')
-rw-r--r-- | poppler/ArthurOutputDev.cc | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/poppler/ArthurOutputDev.cc b/poppler/ArthurOutputDev.cc index 71faeb5e..d065d9b7 100644 --- a/poppler/ArthurOutputDev.cc +++ b/poppler/ArthurOutputDev.cc @@ -19,6 +19,7 @@ // Copyright (C) 2009 Carlos Garcia Campos <carlosgc@gnome.org> // Copyright (C) 2009 Petr Gajdos <pgajdos@novell.com> // Copyright (C) 2010 Matthias Fauconneau <matthias.fauconneau@gmail.com> +// Copyright (C) 2011 Andreas Hartmetz <ahartmetz@gmail.com> // // To see a description of the changes please see the Changelog file that // came with your tarball or type make ChangeLog if you are building from git @@ -86,7 +87,8 @@ private: //------------------------------------------------------------------------ ArthurOutputDev::ArthurOutputDev(QPainter *painter): - m_painter(painter) + m_painter(painter), + m_fontHinting(NoHinting) { m_currentBrush = QBrush(Qt::SolidPattern); m_fontEngine = 0; @@ -104,13 +106,18 @@ void ArthurOutputDev::startDoc(XRef *xrefA) { xref = xrefA; #ifdef HAVE_SPLASH delete m_fontEngine; + + const bool isHintingEnabled = m_fontHinting != NoHinting; + const bool isSlightHinting = m_fontHinting == SlightHinting; + m_fontEngine = new SplashFontEngine( #if HAVE_T1LIB_H globalParams->getEnableT1lib(), #endif #if HAVE_FREETYPE_FREETYPE_H || HAVE_FREETYPE_H globalParams->getEnableFreeType(), - gFalse, + isHintingEnabled, + isSlightHinting, #endif m_painter->testRenderHint(QPainter::TextAntialiasing)); #endif |