summaryrefslogtreecommitdiff
path: root/vcl/quartz
diff options
context:
space:
mode:
authorKhaled Hosny <khaledhosny@eglug.org>2019-03-08 14:56:15 +0200
committerKhaled Hosny <khaledhosny@eglug.org>2019-03-08 17:23:23 +0100
commit5de0472e27d4bd7d2ff0d1b54a7324c67ec98de7 (patch)
tree7fdb13a25f6cd5c6d7a347d26b03dffcca2e337a /vcl/quartz
parenta507d54e4e0764de951ae3de5a0b8b994a4ce7d7 (diff)
Don'tbuild HarfBuzz with Core Text support on macOS/iOS
HarfBuzz 2.x has native support for AAT fonts which is, according to Chrome developers, sgnificantly faster that HarfBuzz Core Text integration. Change-Id: I4d5e861a1958402a6e3ccb720b10f40828c3db6a Reviewed-on: https://gerrit.libreoffice.org/68919 Tested-by: Jenkins Reviewed-by: Khaled Hosny <khaledhosny@eglug.org>
Diffstat (limited to 'vcl/quartz')
-rw-r--r--vcl/quartz/ctfonts.cxx12
1 files changed, 1 insertions, 11 deletions
diff --git a/vcl/quartz/ctfonts.cxx b/vcl/quartz/ctfonts.cxx
index d15fb1376784..5a0b5b62916d 100644
--- a/vcl/quartz/ctfonts.cxx
+++ b/vcl/quartz/ctfonts.cxx
@@ -270,17 +270,7 @@ static hb_blob_t* getFontTable(hb_face_t* /*face*/, hb_tag_t nTableTag, void* pU
hb_font_t* CoreTextStyle::ImplInitHbFont()
{
- // 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(GetStyleDict(), kCTFontAttributeName));
- CGFontRef pCGFont = CTFontCopyGraphicsFont(pCTFont, nullptr);
- if (pCGFont)
- pHbFace = hb_coretext_face_create(pCGFont);
- else
- pHbFace = hb_face_create_for_tables(getFontTable, const_cast<PhysicalFontFace*>(GetFontFace()), nullptr);
- CGFontRelease(pCGFont);
+ hb_face_t* pHbFace = hb_face_create_for_tables(getFontTable, const_cast<PhysicalFontFace*>(GetFontFace()), nullptr);
return InitHbFont(pHbFace);
}