diff options
author | Konstantin Ritt <ritt.ks@gmail.com> | 2020-03-18 05:36:49 +0300 |
---|---|---|
committer | Konstantin Ritt <ritt.ks@gmail.com> | 2020-03-24 01:58:08 +0300 |
commit | 1ab2e4baefaeca28b667415f7609649c2f826a17 (patch) | |
tree | 690b634dda394dce488047c455d5842ba61b04b3 /src/3rdparty/harfbuzz-ng | |
parent | 12d3d32f31182f1eb395ec9e5fa1874d06e2582b (diff) |
Harfbuzz: get rid of Qt-specific patch in CoreText shaper code
this code isn't used as of 21c242f9fd27523d0016b821d0a962231c4bafa6
and thus we do not need to keep the patch around
Change-Id: Ic3b836c6a68f40b8e450542a39db968ef3b09101
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
Diffstat (limited to 'src/3rdparty/harfbuzz-ng')
-rw-r--r-- | src/3rdparty/harfbuzz-ng/patches/0001-Qt-specific-workaround-for-AAT-shaper.patch | 76 | ||||
-rw-r--r-- | src/3rdparty/harfbuzz-ng/src/hb-coretext.cc | 20 |
2 files changed, 0 insertions, 96 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 deleted file mode 100644 index 02bb57e779..0000000000 --- a/src/3rdparty/harfbuzz-ng/patches/0001-Qt-specific-workaround-for-AAT-shaper.patch +++ /dev/null @@ -1,76 +0,0 @@ -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. - -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 8885cfe..f4e3ef0 100644 ---- a/src/3rdparty/harfbuzz-ng/src/hb-coretext.cc -+++ b/src/3rdparty/harfbuzz-ng/src/hb-coretext.cc -@@ -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 { -+ void *user_data; -+ qt_get_font_table_func_t get_font_table; -+}; -+ -+struct CoreTextFontEngineData { -+ CTFontRef ctFont; -+ CGFontRef cgFont; -+}; -+ - - /** - * 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 - { -+#if 0 - hb_blob_t *blob = hb_face_reference_blob (face); - unsigned int blob_length; - const char *blob_data = hb_blob_get_data (blob, &blob_length); -@@ -140,6 +155,11 @@ create_cg_font (hb_face_t *face) - DEBUG_MSG (CORETEXT, face, "Face CGFontCreateWithDataProvider() failed"); - CGDataProviderRelease (provider); - } -+#else -+ FontEngineFaceData *fontEngineFaceData = (FontEngineFaceData *) face->user_data; -+ CoreTextFontEngineData *coreTextFontEngineData = (CoreTextFontEngineData *) fontEngineFaceData->user_data; -+ cg_font = CGFontRetain (coreTextFontEngineData->cgFont); -+#endif - } - return cg_font; - } --- -2.8.1 - diff --git a/src/3rdparty/harfbuzz-ng/src/hb-coretext.cc b/src/3rdparty/harfbuzz-ng/src/hb-coretext.cc index f4e3ef0a22..8885cfe730 100644 --- a/src/3rdparty/harfbuzz-ng/src/hb-coretext.cc +++ b/src/3rdparty/harfbuzz-ng/src/hb-coretext.cc @@ -36,18 +36,6 @@ #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 { - void *user_data; - qt_get_font_table_func_t get_font_table; -}; - -struct CoreTextFontEngineData { - CTFontRef ctFont; - CGFontRef cgFont; -}; - /** * SECTION:hb-coretext @@ -119,7 +107,6 @@ get_last_resort_font_desc () return font_desc; } -#if 0 static void release_data (void *info, const void *data, size_t size) { @@ -128,7 +115,6 @@ 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) @@ -140,7 +126,6 @@ create_cg_font (hb_face_t *face) } else { -#if 0 hb_blob_t *blob = hb_face_reference_blob (face); unsigned int blob_length; const char *blob_data = hb_blob_get_data (blob, &blob_length); @@ -155,11 +140,6 @@ create_cg_font (hb_face_t *face) DEBUG_MSG (CORETEXT, face, "Face CGFontCreateWithDataProvider() failed"); CGDataProviderRelease (provider); } -#else - FontEngineFaceData *fontEngineFaceData = (FontEngineFaceData *) face->user_data; - CoreTextFontEngineData *coreTextFontEngineData = (CoreTextFontEngineData *) fontEngineFaceData->user_data; - cg_font = CGFontRetain (coreTextFontEngineData->cgFont); -#endif } return cg_font; } |