As getAdvancedTypefaceMetrics of SkTypefce is now private, In my old code it is using in below format.
int FontPlatformData::emSizeInFontUnits() const
{
if (m_emSizeInFontUnits)
return m_emSizeInFontUnits;
SkAdvancedTypefaceMetrics* metrics = 0;
if (m_typeface)
metrics = m_typeface->getAdvancedTypefaceMetrics(SkAdvancedTypefaceMetrics::kNo_PerGlyphInfo);
if (metrics) {
m_emSizeInFontUnits = metrics->fEmSize;
metrics->unref();
} else
m_emSizeInFontUnits = 1000; // default value copied from Skia.
return m_emSizeInFontUnits;
}
is there any alternative provided for this API in SKia.
SkTypeFace.h has "getUnitsPerEm()" method, that should help.