[Libreoffice-commits] core.git: vcl/source
Tomaž Vajngerl
tomaz.vajngerl at collabora.co.uk
Wed Jun 27 13:11:24 UTC 2018
vcl/source/font/FeatureCollector.cxx | 17 +++++++++--------
1 file changed, 9 insertions(+), 8 deletions(-)
New commits:
commit 1a651c3fffee4c1e7674c8b4af4b1982af8072f5
Author: Tomaž Vajngerl <tomaz.vajngerl at collabora.co.uk>
Date: Sat Jun 23 16:09:13 2018 +0200
vcl: prefer OpenType font feature description over Graphite
If the fon supports Graphite features we can get the feature
descriptions from the font, but this descriptions are mostly
limited (available in a limited number of languages), so it is
better to only use this descriptions only if the feature does not
have an OpenType description available.
Change-Id: Ic0b81cb8cc22e1e73f30e6a960167cfa982fbfc7
Reviewed-on: https://gerrit.libreoffice.org/56318
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl <quikee at gmail.com>
diff --git a/vcl/source/font/FeatureCollector.cxx b/vcl/source/font/FeatureCollector.cxx
index 790c3a484dcb..8f6b8180c3e9 100644
--- a/vcl/source/font/FeatureCollector.cxx
+++ b/vcl/source/font/FeatureCollector.cxx
@@ -98,15 +98,16 @@ void FeatureCollector::collectForLanguage(hb_tag_t aTableTag, sal_uInt32 nScript
m_rFontFeatures.emplace_back();
vcl::font::Feature& rFeature = m_rFontFeatures.back();
rFeature.m_aID = { aFeatureTag, aScriptTag, aLanguageTag };
- bool bResult = collectGraphiteFeatureDefinition(rFeature);
- if (!bResult)
+
+ FeatureDefinition aDefinition
+ = OpenTypeFeatureDefinitonList::get().getDefinition(aFeatureTag);
+ if (aDefinition)
{
- FeatureDefinition aDefinition
- = OpenTypeFeatureDefinitonList::get().getDefinition(aFeatureTag);
- if (aDefinition)
- {
- rFeature.m_aDefinition = vcl::font::FeatureDefinition(aDefinition);
- }
+ rFeature.m_aDefinition = vcl::font::FeatureDefinition(aDefinition);
+ }
+ else
+ {
+ collectGraphiteFeatureDefinition(rFeature);
}
}
}
More information about the Libreoffice-commits
mailing list