tdf#103680: Implement SupportsOpenTypeMath in outdev
Change-Id: I425735e91ce83c6c2225ad562c3549067b80f053 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/207987 Tested-by: Jenkins Reviewed-by: Khaled Hosny <khaled@libreoffice.org>
This commit is contained in:
@@ -1200,7 +1200,7 @@ public:
|
||||
|
||||
bool GetGlyphBoundRects( const Point& rOrigin, const OUString& rStr, int nIndex,
|
||||
int nLen, std::vector< tools::Rectangle >& rVector ) const;
|
||||
|
||||
bool SupportsOpenTypeMath() const;
|
||||
sal_Int32 HasGlyphs( const vcl::Font& rFont, std::u16string_view rStr,
|
||||
sal_Int32 nIndex = 0, sal_Int32 nLen = -1 ) const;
|
||||
|
||||
|
||||
@@ -1405,6 +1405,20 @@ sal_Int32 OutputDevice::HasGlyphs( const vcl::Font& rTempFont, std::u16string_vi
|
||||
return -1;
|
||||
}
|
||||
|
||||
bool OutputDevice::SupportsOpenTypeMath() const
|
||||
{
|
||||
if (!ImplNewFont())
|
||||
return false;
|
||||
|
||||
LogicalFontInstance* pFontInstance = mpFontInstance.get();
|
||||
|
||||
if (pFontInstance) {
|
||||
auto pFace = pFontInstance->GetFontFace();
|
||||
return pFace->HasOpenTypeMathTable();
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
void OutputDevice::ReleaseFontCache() { mxFontCache.reset(); }
|
||||
|
||||
void OutputDevice::ReleaseFontCollection() { mxFontCollection.reset(); }
|
||||
|
||||
Reference in New Issue
Block a user