mirror of
https://github.com/python-pillow/Pillow.git
synced 2024-12-25 01:16:16 +03:00
Merge pull request #7087 from nulano/raqm-0.10.1
Update vendored Raqm to 0.10.1
This commit is contained in:
commit
dd3482d905
2
src/thirdparty/raqm/COPYING
vendored
2
src/thirdparty/raqm/COPYING
vendored
|
@ -1,7 +1,7 @@
|
|||
The MIT License (MIT)
|
||||
|
||||
Copyright © 2015 Information Technology Authority (ITA) <foss@ita.gov.om>
|
||||
Copyright © 2016-2022 Khaled Hosny <khaled@aliftype.com>
|
||||
Copyright © 2016-2023 Khaled Hosny <khaled@aliftype.com>
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
|
|
35
src/thirdparty/raqm/NEWS
vendored
35
src/thirdparty/raqm/NEWS
vendored
|
@ -1,3 +1,38 @@
|
|||
Overview of changes leading to 0.10.1
|
||||
Wednesday, April 12, 2023
|
||||
====================================
|
||||
|
||||
Make combining marks always inherit the script of their base.
|
||||
|
||||
Overview of changes leading to 0.10.0
|
||||
Wednesday, January 11, 2023
|
||||
====================================
|
||||
|
||||
Fix font feature ranges.
|
||||
|
||||
Fix resolved direction for all-neutral text.
|
||||
|
||||
Implement letter and word spacing support.
|
||||
|
||||
New API:
|
||||
* raqm_set_text_utf16
|
||||
|
||||
Overview of changes leading to 0.9.0
|
||||
Sunday, January 30, 2022
|
||||
====================================
|
||||
|
||||
Raise the minimum versions of Raqm dependencies: no longer conditionally
|
||||
enabling any features based on specific dependency version.
|
||||
|
||||
raqm_t objects can now be reused by calling raqm_clear_contents() before
|
||||
re-use, to potentially reduce the number memory allocations.
|
||||
|
||||
Don't hardcode python3 in tests.
|
||||
|
||||
New API:
|
||||
* raqm_set_freetype_load_flags_range
|
||||
* raqm_clear_contents
|
||||
|
||||
Overview of changes leading to 0.8.0
|
||||
Monday, December 13, 2021
|
||||
====================================
|
||||
|
|
2
src/thirdparty/raqm/README.md
vendored
2
src/thirdparty/raqm/README.md
vendored
|
@ -81,5 +81,5 @@ The following projects have patches to support complex text layout using Raqm:
|
|||
[1]: https://github.com/fribidi/fribidi
|
||||
[2]: https://github.com/Tehreer/SheenBidi
|
||||
[3]: https://github.com/harfbuzz/harfbuzz
|
||||
[4]: https://www.freetype.org
|
||||
[4]: https://freetype.org/
|
||||
[5]: https://www.gtk.org/gtk-doc
|
||||
|
|
4
src/thirdparty/raqm/raqm-version.h
vendored
4
src/thirdparty/raqm/raqm-version.h
vendored
|
@ -33,9 +33,9 @@
|
|||
|
||||
#define RAQM_VERSION_MAJOR 0
|
||||
#define RAQM_VERSION_MINOR 10
|
||||
#define RAQM_VERSION_MICRO 0
|
||||
#define RAQM_VERSION_MICRO 1
|
||||
|
||||
#define RAQM_VERSION_STRING "0.10.0"
|
||||
#define RAQM_VERSION_STRING "0.10.1"
|
||||
|
||||
#define RAQM_VERSION_ATLEAST(major,minor,micro) \
|
||||
((major)*10000+(minor)*100+(micro) <= \
|
||||
|
|
25
src/thirdparty/raqm/raqm.c
vendored
25
src/thirdparty/raqm/raqm.c
vendored
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
* Copyright © 2015 Information Technology Authority (ITA) <foss@ita.gov.om>
|
||||
* Copyright © 2016-2022 Khaled Hosny <khaled@aliftype.com>
|
||||
* Copyright © 2016-2023 Khaled Hosny <khaled@aliftype.com>
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to
|
||||
|
@ -1432,7 +1432,7 @@ raqm_get_glyphs (raqm_t *rq,
|
|||
*
|
||||
* Since: 0.8
|
||||
*/
|
||||
RAQM_API raqm_direction_t
|
||||
raqm_direction_t
|
||||
raqm_get_par_resolved_direction (raqm_t *rq)
|
||||
{
|
||||
if (!rq)
|
||||
|
@ -1455,7 +1455,7 @@ raqm_get_par_resolved_direction (raqm_t *rq)
|
|||
*
|
||||
* Since: 0.8
|
||||
*/
|
||||
RAQM_API raqm_direction_t
|
||||
raqm_direction_t
|
||||
raqm_get_direction_at_index (raqm_t *rq,
|
||||
size_t index)
|
||||
{
|
||||
|
@ -2021,6 +2021,22 @@ _get_pair_index (const uint32_t ch)
|
|||
#define STACK_IS_EMPTY(script) ((script)->size <= 0)
|
||||
#define IS_OPEN(pair_index) (((pair_index) & 1) == 0)
|
||||
|
||||
static hb_script_t
|
||||
_raqm_unicode_script (hb_codepoint_t u)
|
||||
{
|
||||
static hb_unicode_funcs_t* unicode_funcs;
|
||||
|
||||
unicode_funcs = hb_unicode_funcs_get_default ();
|
||||
|
||||
/* Make combining marks inherit the script of their bases, regardless of
|
||||
* their own script.
|
||||
*/
|
||||
if (hb_unicode_general_category (unicode_funcs, u) == HB_UNICODE_GENERAL_CATEGORY_NON_SPACING_MARK)
|
||||
return HB_SCRIPT_INHERITED;
|
||||
|
||||
return hb_unicode_script (unicode_funcs, u);
|
||||
}
|
||||
|
||||
/* Resolve the script for each character in the input string, if the character
|
||||
* script is common or inherited it takes the script of the character before it
|
||||
* except paired characters which we try to make them use the same script. We
|
||||
|
@ -2033,10 +2049,9 @@ _raqm_resolve_scripts (raqm_t *rq)
|
|||
int last_set_index = -1;
|
||||
hb_script_t last_script = HB_SCRIPT_INVALID;
|
||||
_raqm_stack_t *stack = NULL;
|
||||
hb_unicode_funcs_t* unicode_funcs = hb_unicode_funcs_get_default ();
|
||||
|
||||
for (size_t i = 0; i < rq->text_len; ++i)
|
||||
rq->text_info[i].script = hb_unicode_script (unicode_funcs, rq->text[i]);
|
||||
rq->text_info[i].script = _raqm_unicode_script (rq->text[i]);
|
||||
|
||||
#ifdef RAQM_TESTING
|
||||
RAQM_TEST ("Before script detection:\n");
|
||||
|
|
2
src/thirdparty/raqm/raqm.h
vendored
2
src/thirdparty/raqm/raqm.h
vendored
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
* Copyright © 2015 Information Technology Authority (ITA) <foss@ita.gov.om>
|
||||
* Copyright © 2016-2022 Khaled Hosny <khaled@aliftype.com>
|
||||
* Copyright © 2016-2023 Khaled Hosny <khaled@aliftype.com>
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to
|
||||
|
|
Loading…
Reference in New Issue
Block a user