1
0
mirror of https://github.com/godotengine/godot.git synced 2025-12-01 16:38:31 +00:00

HarfBuzz: Update to version 3.3.2

This commit is contained in:
bruvzg
2022-02-09 14:18:08 +02:00
parent f88a83f611
commit c768189bd2
6 changed files with 35 additions and 24 deletions

View File

@@ -206,7 +206,7 @@ Files extracted from upstream source:
## harfbuzz ## harfbuzz
- Upstream: https://github.com/harfbuzz/harfbuzz - Upstream: https://github.com/harfbuzz/harfbuzz
- Version: 3.3.1 (45df259538c204540819d74456d30ffb40df488a, 2022) - Version: 3.3.2 (ac46c3248e8b0316235943175c4d4a11c24dd4a9, 2022)
- License: MIT - License: MIT
Files extracted from upstream source: Files extracted from upstream source:

View File

@@ -386,7 +386,10 @@ struct hb_buffer_t
HB_INTERNAL void delete_glyph (); HB_INTERNAL void delete_glyph ();
void set_glyph_flags (hb_mask_t mask, /* Adds glyph flags in mask to infos with clusters between start and end.
* The start index will be from out-buffer if from_out_buffer is true.
* If interior is true, then the cluster having the minimum value is skipped. */
void _set_glyph_flags (hb_mask_t mask,
unsigned start = 0, unsigned start = 0,
unsigned end = (unsigned) -1, unsigned end = (unsigned) -1,
bool interior = false, bool interior = false,
@@ -437,25 +440,25 @@ struct hb_buffer_t
void unsafe_to_break (unsigned int start = 0, unsigned int end = -1) void unsafe_to_break (unsigned int start = 0, unsigned int end = -1)
{ {
set_glyph_flags (HB_GLYPH_FLAG_UNSAFE_TO_BREAK | HB_GLYPH_FLAG_UNSAFE_TO_CONCAT, _set_glyph_flags (HB_GLYPH_FLAG_UNSAFE_TO_BREAK | HB_GLYPH_FLAG_UNSAFE_TO_CONCAT,
start, end, start, end,
true); true);
} }
void unsafe_to_concat (unsigned int start = 0, unsigned int end = -1) void unsafe_to_concat (unsigned int start = 0, unsigned int end = -1)
{ {
set_glyph_flags (HB_GLYPH_FLAG_UNSAFE_TO_CONCAT, _set_glyph_flags (HB_GLYPH_FLAG_UNSAFE_TO_CONCAT,
start, end, start, end,
true); true);
} }
void unsafe_to_break_from_outbuffer (unsigned int start = 0, unsigned int end = -1) void unsafe_to_break_from_outbuffer (unsigned int start = 0, unsigned int end = -1)
{ {
set_glyph_flags (HB_GLYPH_FLAG_UNSAFE_TO_BREAK | HB_GLYPH_FLAG_UNSAFE_TO_CONCAT, _set_glyph_flags (HB_GLYPH_FLAG_UNSAFE_TO_BREAK | HB_GLYPH_FLAG_UNSAFE_TO_CONCAT,
start, end, start, end,
true, true); true, true);
} }
void unsafe_to_concat_from_outbuffer (unsigned int start = 0, unsigned int end = -1) void unsafe_to_concat_from_outbuffer (unsigned int start = 0, unsigned int end = -1)
{ {
set_glyph_flags (HB_GLYPH_FLAG_UNSAFE_TO_CONCAT, _set_glyph_flags (HB_GLYPH_FLAG_UNSAFE_TO_CONCAT,
start, end, start, end,
false, true); false, true);
} }

View File

@@ -917,7 +917,7 @@ struct glyf
struct accelerator_t struct accelerator_t
{ {
accelerator_t (hb_face_t *face_) accelerator_t (hb_face_t *face)
{ {
short_offset = false; short_offset = false;
num_glyphs = 0; num_glyphs = 0;
@@ -930,7 +930,6 @@ struct glyf
#ifndef HB_NO_VERTICAL #ifndef HB_NO_VERTICAL
vmtx = nullptr; vmtx = nullptr;
#endif #endif
face = face_;
const OT::head &head = *face->table.head; const OT::head &head = *face->table.head;
if (head.indexToLocFormat > 1 || head.glyphDataFormat > 0) if (head.indexToLocFormat > 1 || head.glyphDataFormat > 0)
/* Unknown format. Leave num_glyphs=0, that takes care of disabling us. */ /* Unknown format. Leave num_glyphs=0, that takes care of disabling us. */
@@ -1287,7 +1286,6 @@ struct glyf
unsigned int num_glyphs; unsigned int num_glyphs;
hb_blob_ptr_t<loca> loca_table; hb_blob_ptr_t<loca> loca_table;
hb_blob_ptr_t<glyf> glyf_table; hb_blob_ptr_t<glyf> glyf_table;
hb_face_t *face;
}; };
struct SubsetGlyph struct SubsetGlyph

View File

@@ -1586,7 +1586,15 @@ struct PairPosFormat2
/* Isolate simple kerning and apply it half to each side. /* Isolate simple kerning and apply it half to each side.
* Results in better cursor positinoing / underline drawing. */ * Results in better cursor positinoing / underline drawing.
*
* Disabled, because causes issues... :-(
* https://github.com/harfbuzz/harfbuzz/issues/3408
* https://github.com/harfbuzz/harfbuzz/pull/3235#issuecomment-1029814978
*/
#ifndef HB_SPLIT_KERN
if (0)
#endif
{ {
if (!len2) if (!len2)
{ {

View File

@@ -53,14 +53,14 @@ HB_BEGIN_DECLS
* *
* The micro component of the library version available at compile-time. * The micro component of the library version available at compile-time.
*/ */
#define HB_VERSION_MICRO 1 #define HB_VERSION_MICRO 2
/** /**
* HB_VERSION_STRING: * HB_VERSION_STRING:
* *
* A string literal containing the library version available at compile-time. * A string literal containing the library version available at compile-time.
*/ */
#define HB_VERSION_STRING "3.3.1" #define HB_VERSION_STRING "3.3.2"
/** /**
* HB_VERSION_ATLEAST: * HB_VERSION_ATLEAST:

View File

@@ -447,6 +447,7 @@ static int HB_UNUSED _hb_errno = 0;
#ifndef HB_USE_ATEXIT #ifndef HB_USE_ATEXIT
# define HB_USE_ATEXIT 0 # define HB_USE_ATEXIT 0
#endif #endif
#ifndef hb_atexit
#if !HB_USE_ATEXIT #if !HB_USE_ATEXIT
# define hb_atexit(_) HB_STMT_START { if (0) (_) (); } HB_STMT_END # define hb_atexit(_) HB_STMT_START { if (0) (_) (); } HB_STMT_END
#else /* HB_USE_ATEXIT */ #else /* HB_USE_ATEXIT */
@@ -457,6 +458,7 @@ static int HB_UNUSED _hb_errno = 0;
# define hb_atexit(f) static hb_atexit_t<f> _hb_atexit_##__LINE__; # define hb_atexit(f) static hb_atexit_t<f> _hb_atexit_##__LINE__;
# endif # endif
#endif #endif
#endif
/* Lets assert int types. Saves trouble down the road. */ /* Lets assert int types. Saves trouble down the road. */
static_assert ((sizeof (hb_codepoint_t) == 4), ""); static_assert ((sizeof (hb_codepoint_t) == 4), "");