vcl: cleanup CoreTextFontFace() a bit

Change-Id: Idcef772802636efab7e7b92415a6d31fec0ba979
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142348
Tested-by: Jenkins
Reviewed-by: خالد حسني <khaled@aliftype.com>
This commit is contained in:
Khaled Hosny
2022-11-06 00:07:15 +02:00
committed by خالد حسني
parent 3792b1b770
commit 35eaff1ad0
2 changed files with 4 additions and 5 deletions

View File

@ -58,11 +58,11 @@ class FontAttributes;
class XorEmulation;
// CoreText-specific physically available font face
class CoreTextFontFace : public vcl::font::PhysicalFontFace
class CoreTextFontFace final : public vcl::font::PhysicalFontFace
{
public:
CoreTextFontFace( const FontAttributes&, CTFontDescriptorRef xRef );
virtual ~CoreTextFontFace() override;
~CoreTextFontFace() override;
sal_IntPtr GetFontId() const override;
@ -70,7 +70,7 @@ public:
rtl::Reference<LogicalFontInstance> CreateFontInstance(const vcl::font::FontSelectPattern&) const override;
virtual hb_blob_t* GetHbTable(hb_tag_t nTag) const override;
hb_blob_t* GetHbTable(hb_tag_t nTag) const override;
std::vector<hb_variation_t> GetVariations() const override;

View File

@ -218,8 +218,7 @@ bool CoreTextFont::GetGlyphOutline(sal_GlyphId nId, basegfx::B2DPolyPolygon& rRe
hb_blob_t* CoreTextFontFace::GetHbTable(hb_tag_t nTag) const
{
hb_blob_t* pBlob = nullptr;
CTFontDescriptorRef pFontDesc = reinterpret_cast<CTFontDescriptorRef>(GetFontId());
CTFontRef pFont = CTFontCreateWithFontDescriptor(pFontDesc, 0.0, nullptr);
CTFontRef pFont = CTFontCreateWithFontDescriptor(mxFontDescriptor, 0.0, nullptr);
if (!nTag)
{