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:
Aya Jamal
2026-07-20 15:13:17 +02:00
committed by Khaled Hosny
parent 56ef560f84
commit 92d2a4bec5
2 changed files with 15 additions and 1 deletions
+1 -1
View File
@@ -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;
+14
View File
@@ -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(); }