summaryrefslogtreecommitdiff
path: root/vcl/generic/fontmanager
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2015-07-10 11:04:50 +0100
committerCaolán McNamara <caolanm@redhat.com>2015-08-20 07:40:21 +0000
commitaf6daec72b71b1d72a2555efdc5b2fb2e0ba2b90 (patch)
tree1f16be1fd99edcdc3237ee3fa038ca0f1b88b4fd /vcl/generic/fontmanager
parent00754461516416f8ee59ec97632bff84f4d9b155 (diff)
more config skipping stuff and a tester tool
Change-Id: I5e93a4c84b3a0940239213766eb24d21fb5fd649 Reviewed-on: https://gerrit.libreoffice.org/17863 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'vcl/generic/fontmanager')
-rw-r--r--vcl/generic/fontmanager/fontconfig.cxx6
1 files changed, 5 insertions, 1 deletions
diff --git a/vcl/generic/fontmanager/fontconfig.cxx b/vcl/generic/fontmanager/fontconfig.cxx
index 59ed6aee9bd8..4f81f3dfaaf7 100644
--- a/vcl/generic/fontmanager/fontconfig.cxx
+++ b/vcl/generic/fontmanager/fontconfig.cxx
@@ -44,7 +44,8 @@ using namespace psp;
#include <cstdio>
#include <cstdarg>
-#include "unotools/atom.hxx"
+#include <unotools/atom.hxx>
+#include <unotools/configmgr.hxx>
#include "osl/module.h"
#include "osl/thread.h"
@@ -475,6 +476,7 @@ void PrintFontManager::countFontconfigFonts( std::unordered_map<OString, int, OS
FontCfgWrapper& rWrapper = FontCfgWrapper::get();
FcFontSet* pFSet = rWrapper.getFontSet();
+ const bool bMinimalFontset = utl::ConfigManager::IsAvoidConfig();
if( pFSet )
{
#if OSL_DEBUG_LEVEL > 1
@@ -495,6 +497,8 @@ void PrintFontManager::countFontconfigFonts( std::unordered_map<OString, int, OS
FcResult eFileRes = FcPatternGetString(pFSet->fonts[i], FC_FILE, 0, &file);
FcResult eFamilyRes = rWrapper.LocalizedElementFromPattern( pFSet->fonts[i], &family, FC_FAMILY, FC_FAMILYLANG );
+ if (bMinimalFontset && strncmp((char*)family, "Liberation", strlen("Liberation")))
+ continue;
FcResult eStyleRes = rWrapper.LocalizedElementFromPattern( pFSet->fonts[i], &style, FC_STYLE, FC_STYLELANG );
FcResult eSlantRes = FcPatternGetInteger(pFSet->fonts[i], FC_SLANT, 0, &slant);
FcResult eWeightRes = FcPatternGetInteger(pFSet->fonts[i], FC_WEIGHT, 0, &weight);