diff options
Diffstat (limited to 'src/3rdparty/harfbuzz-ng/patches/0001-Qt-specific-workaround-for-AAT-shaper.patch')
-rw-r--r-- | src/3rdparty/harfbuzz-ng/patches/0001-Qt-specific-workaround-for-AAT-shaper.patch | 44 |
1 files changed, 31 insertions, 13 deletions
diff --git a/src/3rdparty/harfbuzz-ng/patches/0001-Qt-specific-workaround-for-AAT-shaper.patch b/src/3rdparty/harfbuzz-ng/patches/0001-Qt-specific-workaround-for-AAT-shaper.patch index 470e0ffe5a..02bb57e779 100644 --- a/src/3rdparty/harfbuzz-ng/patches/0001-Qt-specific-workaround-for-AAT-shaper.patch +++ b/src/3rdparty/harfbuzz-ng/patches/0001-Qt-specific-workaround-for-AAT-shaper.patch @@ -1,23 +1,25 @@ -From: Konstantin Ritt <ritt.ks@gmail.com> -Date: Sun, 17 Dec 2017 07:46:20 +0400 -Subject: Qt-specific workaround for AAT shaper +From 96b71dc7c8ab8aa020f47dc659b32c2002001015 Mon Sep 17 00:00:00 2001 +From: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io> +Date: Thu, 28 Nov 2019 14:51:39 +0100 +Subject: [PATCH] Qt-specific workaround for AAT shaper CoreText API doesn't give us a fontdata to reconstruct the original font, so we have to store the CTFont and CGFont of interest in context object -passed to HB from native font engine +passed to HB from native font engine. + +Change-Id: I9a71ae71b7d22f32498a9dd386500fa867a5f6cd --- src/3rdparty/harfbuzz-ng/src/hb-coretext.cc | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/src/3rdparty/harfbuzz-ng/src/hb-coretext.cc b/src/3rdparty/harfbuzz-ng/src/hb-coretext.cc -index 2dd10d2..c993ec0 100644 +index 8885cfe..f4e3ef0 100644 --- a/src/3rdparty/harfbuzz-ng/src/hb-coretext.cc +++ b/src/3rdparty/harfbuzz-ng/src/hb-coretext.cc -@@ -35,6 +35,20 @@ - #include "hb-coretext.h" +@@ -36,6 +36,18 @@ + #include "hb-aat-layout.hh" #include <math.h> -+ +typedef bool (*qt_get_font_table_func_t) (void *user_data, unsigned int tag, unsigned char *buffer, unsigned int *length); + +struct FontEngineFaceData { @@ -30,11 +32,26 @@ index 2dd10d2..c993ec0 100644 + CGFontRef cgFont; +}; + -+ - /* https://developer.apple.com/documentation/coretext/1508745-ctfontcreatewithgraphicsfont */ - #define HB_CORETEXT_DEFAULT_FONT_SIZE 12.f -@@ -129,6 +143,7 @@ create_cg_font (hb_face_t *face) + /** + * SECTION:hb-coretext +@@ -107,6 +119,7 @@ get_last_resort_font_desc () + return font_desc; + } + ++#if 0 + static void + release_data (void *info, const void *data, size_t size) + { +@@ -115,6 +128,7 @@ release_data (void *info, const void *data, size_t size) + + hb_blob_destroy ((hb_blob_t *) info); + } ++#endif + + static CGFontRef + create_cg_font (hb_face_t *face) +@@ -126,6 +140,7 @@ create_cg_font (hb_face_t *face) } else { @@ -42,7 +59,7 @@ index 2dd10d2..c993ec0 100644 hb_blob_t *blob = hb_face_reference_blob (face); unsigned int blob_length; const char *blob_data = hb_blob_get_data (blob, &blob_length); -@@ -143,6 +158,11 @@ create_cg_font (hb_face_t *face) +@@ -140,6 +155,11 @@ create_cg_font (hb_face_t *face) DEBUG_MSG (CORETEXT, face, "Face CGFontCreateWithDataProvider() failed"); CGDataProviderRelease (provider); } @@ -55,4 +72,5 @@ index 2dd10d2..c993ec0 100644 return cg_font; } -- +2.8.1 |