diff --git a/vcl/CppunitTest_vcl_fontmetric.mk b/vcl/CppunitTest_vcl_fontmetric.mk index 70e2386e5f50..5496a75c14f9 100644 --- a/vcl/CppunitTest_vcl_fontmetric.mk +++ b/vcl/CppunitTest_vcl_fontmetric.mk @@ -50,4 +50,6 @@ $(eval $(call gb_CppunitTest_use_externals,vcl_fontmetric,\ harfbuzz \ )) +$(eval $(call gb_CppunitTest_use_more_fonts,vcl_fontmetric)) + # vim: set noet sw=4 ts=4: diff --git a/vcl/qa/cppunit/FontFeatureTest.cxx b/vcl/qa/cppunit/FontFeatureTest.cxx index 96785f75f42c..eba092140450 100644 --- a/vcl/qa/cppunit/FontFeatureTest.cxx +++ b/vcl/qa/cppunit/FontFeatureTest.cxx @@ -35,16 +35,13 @@ public: void FontFeatureTest::testGetFontFeatures() { -// "Linux Libertine G" is a font bundled with LO, but sometimes the -// bundled fonts aren't available so we need to disable test in that case #if HAVE_MORE_FONTS ScopedVclPtrInstance aVDev(*Application::GetDefaultDevice(), DeviceFormat::DEFAULT, DeviceFormat::DEFAULT); aVDev->SetOutputSizePixel(Size(10, 10)); OUString aFontName("Linux Libertine G"); - if (aVDev->IsFontAvailable(aFontName)) - return; // Can't test this because the font is not available, so exit + CPPUNIT_ASSERT(aVDev->IsFontAvailable(aFontName)); vcl::Font aFont = aVDev->GetFont(); aFont.SetFamilyName(aFontName); diff --git a/vcl/source/outdev/font.cxx b/vcl/source/outdev/font.cxx index d73d987a56d7..22fd7b4e0d9c 100644 --- a/vcl/source/outdev/font.cxx +++ b/vcl/source/outdev/font.cxx @@ -90,6 +90,7 @@ int OutputDevice::GetDevFontCount() const bool OutputDevice::IsFontAvailable( const OUString& rFontName ) const { + ImplInitFontList(); PhysicalFontFamily* pFound = mxFontCollection->FindFontFamily( rFontName ); return (pFound != nullptr); }