diff options
author | Tomaž Vajngerl <tomaz.vajngerl@collabora.co.uk> | 2018-07-30 10:38:43 +0200 |
---|---|---|
committer | Tomaž Vajngerl <quikee@gmail.com> | 2018-07-31 18:29:39 +0200 |
commit | 74317ed5f794816bc9b33e087c5412833fbba420 (patch) | |
tree | b192e0a424d3434d3cbc8cc0db17029b9d640554 /vcl/qa | |
parent | aa2e694e8d9e22de94dbf21f81883f9af0e34ce9 (diff) |
Font features: Use Graphite instead of HarfBuzz if available
When searching for font features, use Graphtie if it is available
instead of HarfBuzz, because HarfBuzz will only give a subset of
OpenType features in a Graphite font, but will ignore additional
features specific to Graphite.
Change-Id: I00c8790ee4d1e1ab906928f649d2a3e54163557f
Reviewed-on: https://gerrit.libreoffice.org/58306
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
Diffstat (limited to 'vcl/qa')
-rw-r--r-- | vcl/qa/cppunit/FontFeatureTest.cxx | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/vcl/qa/cppunit/FontFeatureTest.cxx b/vcl/qa/cppunit/FontFeatureTest.cxx index 2e9507a3426c..7476162b976e 100644 --- a/vcl/qa/cppunit/FontFeatureTest.cxx +++ b/vcl/qa/cppunit/FontFeatureTest.cxx @@ -72,18 +72,23 @@ void FontFeatureTest::testGetFontFeatures() #if !defined(_WIN32) // periodically fails on windows tinderbox like tb77 with a value of 27 - CPPUNIT_ASSERT_EQUAL(size_t(20), rDefaultFontFeatures.size()); + CPPUNIT_ASSERT_EQUAL(size_t(53), rDefaultFontFeatures.size()); + + OUString aExpectedFeaturesString = "c2sc case dlig fina frac hlig liga lnum " + "locl onum pnum sa01 sa02 sa03 sa04 sa05 " + "sa06 sa07 sa08 salt sinf smcp ss01 ss02 " + "ss03 sups tnum zero ingl cpsp lith litt " + "itlc para algn arti circ dash dbls foot " + "frsp grkn hang lng minu nfsp name quot " + "texm thou vari caps ligc "; - OUString aExpectedFeaturesString = "aalt c2sc case dlig frac hlig liga lnum " - "onum pnum salt sinf smcp ss01 ss02 ss03 " - "sups tnum zero cpsp "; // periodically fails on windows tinderbox like tb72 with a missing "ss02" CPPUNIT_ASSERT_EQUAL(aExpectedFeaturesString, aFeaturesString); #endif // Check C2SC feature { - vcl::font::Feature& rFeature = rDefaultFontFeatures[1]; + vcl::font::Feature& rFeature = rDefaultFontFeatures[0]; CPPUNIT_ASSERT_EQUAL(vcl::font::featureCode("c2sc"), rFeature.m_aID.m_aFeatureCode); vcl::font::FeatureDefinition& rFracFeatureDefinition = rFeature.m_aDefinition; |