unsignedint nFeatureIdx; if (hb_ot_layout_language_find_feature(m_pHbFace, aTableTag, 0,
HB_OT_LAYOUT_DEFAULT_LANGUAGE_INDEX, aFeatureTag,
&nFeatureIdx))
{ // ssXX and cvXX can have name ID defined for them, check for // them and use as appropriate.
hb_ot_name_id_t aLabelID;
hb_ot_name_id_t aFirstParameterID; unsigned nNamedParameters; if (hb_ot_layout_feature_get_name_ids(m_pHbFace, aTableTag, nFeatureIdx, &aLabelID,
nullptr, nullptr, &nNamedParameters,
&aFirstParameterID))
{
OUString sLabel = m_pFace->GetName(NameID(aLabelID), m_rLanguageTag); if (!sLabel.isEmpty())
aDefinition = vcl::font::FeatureDefinition(aFeatureTag, sLabel);
// cvXX features can have parameters name IDs, check for // them and populate feature parameters as appropriate. for (unsigned i = 0; i < nNamedParameters; i++)
{
hb_ot_name_id_t aNameID = aFirstParameterID + i;
OUString sName = m_pFace->GetName(NameID(aNameID), m_rLanguageTag); if (!sName.isEmpty())
aParameters.emplace_back(uint32_t(i + 1), sName); else
aParameters.emplace_back(uint32_t(i + 1), OUString::number(i + 1));
}
}
unsignedint nAlternates = 0; if (aTableTag == HB_OT_TAG_GSUB)
{ // Collect lookups in this feature, and input glyphs for each // lookup, and calculate the max number of alternates they have. unsignedint nLookups = hb_ot_layout_feature_get_lookups(
m_pHbFace, aTableTag, nFeatureIdx, 0, nullptr, nullptr);
std::vector<unsignedint> aLookups(nLookups);
hb_ot_layout_feature_get_lookups(m_pHbFace, aTableTag, nFeatureIdx, 0, &nLookups,
aLookups.data());
// Append the alternates to the feature parameters, keeping any // existing ones calculated from cvXX features above. for (unsignedint i = aParameters.size() - 1; i < nAlternates; i++)
aParameters.emplace_back(uint32_t(i + 1), OUString::number(i + 1));
if (grFace)
{ return collectGraphite();
} else
{ // tdf#163213: Font Features dialog should not show OpenType features if the font has "morx" table if (!hb_aat_layout_has_substitution(m_pHbFace))
collectForTable(HB_OT_TAG_GSUB); // substitution
collectForTable(HB_OT_TAG_GPOS); // positioning returntrue;
}
}
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.