You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-12-01 16:38:31 +00:00
HarfBuzz: Update to upstream version 2.7.4
This commit is contained in:
41
thirdparty/harfbuzz/src/hb-buffer.hh
vendored
41
thirdparty/harfbuzz/src/hb-buffer.hh
vendored
@@ -35,20 +35,20 @@
|
||||
|
||||
|
||||
#ifndef HB_BUFFER_MAX_LEN_FACTOR
|
||||
#define HB_BUFFER_MAX_LEN_FACTOR 32
|
||||
#define HB_BUFFER_MAX_LEN_FACTOR 64
|
||||
#endif
|
||||
#ifndef HB_BUFFER_MAX_LEN_MIN
|
||||
#define HB_BUFFER_MAX_LEN_MIN 8192
|
||||
#define HB_BUFFER_MAX_LEN_MIN 16384
|
||||
#endif
|
||||
#ifndef HB_BUFFER_MAX_LEN_DEFAULT
|
||||
#define HB_BUFFER_MAX_LEN_DEFAULT 0x3FFFFFFF /* Shaping more than a billion chars? Let us know! */
|
||||
#endif
|
||||
|
||||
#ifndef HB_BUFFER_MAX_OPS_FACTOR
|
||||
#define HB_BUFFER_MAX_OPS_FACTOR 64
|
||||
#define HB_BUFFER_MAX_OPS_FACTOR 1024
|
||||
#endif
|
||||
#ifndef HB_BUFFER_MAX_OPS_MIN
|
||||
#define HB_BUFFER_MAX_OPS_MIN 1024
|
||||
#define HB_BUFFER_MAX_OPS_MIN 16384
|
||||
#endif
|
||||
#ifndef HB_BUFFER_MAX_OPS_DEFAULT
|
||||
#define HB_BUFFER_MAX_OPS_DEFAULT 0x1FFFFFFF /* Shaping more than a billion operations? Let us know! */
|
||||
@@ -339,6 +339,39 @@ struct hb_buffer_t
|
||||
bool ensure_inplace (unsigned int size)
|
||||
{ return likely (!size || size < allocated); }
|
||||
|
||||
void assert_glyphs ()
|
||||
{
|
||||
assert ((content_type == HB_BUFFER_CONTENT_TYPE_GLYPHS) ||
|
||||
(!len && (content_type == HB_BUFFER_CONTENT_TYPE_INVALID)));
|
||||
}
|
||||
void assert_unicode ()
|
||||
{
|
||||
assert ((content_type == HB_BUFFER_CONTENT_TYPE_UNICODE) ||
|
||||
(!len && (content_type == HB_BUFFER_CONTENT_TYPE_INVALID)));
|
||||
}
|
||||
bool ensure_glyphs ()
|
||||
{
|
||||
if (unlikely (content_type != HB_BUFFER_CONTENT_TYPE_GLYPHS))
|
||||
{
|
||||
if (content_type != HB_BUFFER_CONTENT_TYPE_INVALID)
|
||||
return false;
|
||||
assert (len == 0);
|
||||
content_type = HB_BUFFER_CONTENT_TYPE_GLYPHS;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
bool ensure_unicode ()
|
||||
{
|
||||
if (unlikely (content_type != HB_BUFFER_CONTENT_TYPE_UNICODE))
|
||||
{
|
||||
if (content_type != HB_BUFFER_CONTENT_TYPE_INVALID)
|
||||
return false;
|
||||
assert (len == 0);
|
||||
content_type = HB_BUFFER_CONTENT_TYPE_UNICODE;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
HB_INTERNAL bool make_room_for (unsigned int num_in, unsigned int num_out);
|
||||
HB_INTERNAL bool shift_forward (unsigned int count);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user