Kaydet (Commit) 5de0472e authored tarafından Khaled Hosny's avatar Khaled Hosny

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: 's avatarKhaled Hosny <khaledhosny@eglug.org>
üst a507d54e
......@@ -38,7 +38,6 @@ $(call gb_ExternalProject_get_state_target,harfbuzz,build) :
--with-glib=no \
--with-ucdn=no \
--with-graphite2=yes \
$(if $(filter iOS MACOSX,$(OS)),--with-coretext=yes) \
$(if $(verbose),--disable-silent-rules,--enable-silent-rules) \
--libdir=$(call gb_UnpackedTarball_get_dir,harfbuzz/src/.libs) \
$(if $(CROSS_COMPILING),--build=$(BUILD_PLATFORM) --host=$(HOST_PLATFORM)) \
......
......@@ -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);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment