Add a comment here

Change-Id: I07f2fe400f20d8f52588db326851f310245b7d8d
This commit is contained in:
Khaled Hosny
2016-11-02 15:12:59 +02:00
parent b1f8cf3782
commit 1260bf28fc

View File

@@ -190,6 +190,9 @@ CommonSalLayout::CommonSalLayout(const CoreTextStyle& rCoreTextStyle)
mpHbFont = rCoreTextStyle.GetHbFont();
if (!mpHbFont)
{
// On macOS we use HarfBuzz for AAT shaping, but HarfBuzz will then
// need a CGFont (as it offloads the actual AAT shaping to Core Text),
// if we have one we use it to create the hb_face_t.
hb_face_t* pHbFace;
CTFontRef pCTFont = static_cast<CTFontRef>(CFDictionaryGetValue(rCoreTextStyle.GetStyleDict(), kCTFontAttributeName));
CGFontRef pCGFont = CTFontCopyGraphicsFont(pCTFont, nullptr);