Commit Graph

9963 Commits

Author SHA1 Message Date
Khaled Hosny 76cd8a4737 [arabic] Update to AMTRA revision 6
https://www.unicode.org/reports/tr53/tr53-6.html#Modifications
2022-02-08 12:38:51 -06:00
Khaled Hosny ac46c3248e 3.3.2 2022-02-06 15:41:18 +02:00
Behdad Esfahbod 88798ee8be [GPOS] Disable split-kerning
Fixes https://github.com/harfbuzz/harfbuzz/issues/3408
Reverts https://github.com/harfbuzz/harfbuzz/pull/3235
Fixes https://github.com/harfbuzz/harfbuzz/pull/3235#issuecomment-1029814978
2022-02-04 19:01:57 -06:00
Behdad Esfahbod 9177953720 [atexit] Allow hb_atexit redefinition
Fixes https://github.com/harfbuzz/harfbuzz/issues/3412
2022-02-04 12:38:45 -06:00
Behdad Esfahbod 8670ffbf4c [buffer] Comment 2022-02-03 11:19:23 -06:00
Behdad Esfahbod e59da2871a [glyf] Don't store face in accelerator 2022-02-01 16:32:39 -06:00
Khaled Hosny 45df259538 3.3.1 2022-01-31 23:06:10 +02:00
Garret Rieger 4e2f409bce [subset] Don't hold references to members of the active_glyph_stack.
These references may get invalidated after the vector for the stack is resized. Fixes: https://oss-fuzz.com/testcase-detail/5422577634377728
2022-01-31 22:58:53 +02:00
Khaled Hosny 98da330638 3.3.0 2022-01-31 18:39:06 +02:00
David Corbett ae9afd9772 Let BCP 47 tag "mo" fall back to OT tag 'ROM ' 2022-01-30 14:32:59 -05:00
David Corbett a184c5f851 Don’t always inherit from macrolanguages
If an OpenType tag maps to a BCP 47 macrolanguage, that is presumably to
support the use of the macrolanguage as a vague stand-in for one of its
individual languages. For example, "ar" and "zh" are often used for
"arb" and "cmn". When the OpenType tag maps to a macrolanguage and some
but not all of its individual languages, that indicates that the
OpenType tag only corresponds to the listed individual languages (which
may be referred to using the macrolanguage subtag) but not the missing
individual languages. In particular, INUK (Nunavik Inuktitut) is mapped
to "ike" (Eastern Canadian Inuktitut) and "iu" (Inuktitut) but not to
"ikt" (Inuinnaqtun), so "ikt" should not inherit the INUK mapping from
its macrolanguage "iu".
2022-01-30 13:28:23 -05:00
Behdad Esfahbod b47b3b9972 [fallback-kern] Move buffer message to correct position 2022-01-29 10:24:38 -07:00
Behdad Esfahbod e986c12075 [verify] Show buffer input text when verification fails 2022-01-29 09:08:48 -07:00
Behdad Esfahbod 3972e0a8f1 [buffer] Whitespace 2022-01-29 08:22:19 -07:00
David Corbett 0b1bf89cc2 Replace “[family]” with “[collection]”
Not all language collections are language families.
2022-01-29 10:15:23 -05:00
David Corbett 0e31595e0d Infer tag mappings for unregistered macrolanguages
Every macrolanguage not mentioned in the OT language system tag registry
is mapped to every tag of its individual languages, if those have
registered tags.
2022-01-29 10:15:23 -05:00
David Corbett 5a6545940a Add the language system tag INUK 2022-01-28 21:29:43 -05:00
Garret Rieger bc899650c7 [subset] Fix for issue #3397.
cur_intersected_glyphs gets modified during recursion leading to incorrect filtering of sub tables in some cases. So don't use cur_intersected_glyphs. Instead just add an additional entry onto the parent_active_glyphs () stack.

Additionaly expands NotoNastaliqUrdu tests to include coverage of the issue from #3397.
2022-01-28 14:20:33 -08:00
Garret Rieger f3c1f4f0da [subset] convert active_glyphs_stack to be a vector of hb_set_t instead of hb_set_t*. 2022-01-28 14:20:33 -08:00
Behdad Esfahbod 476a6377a5 [buffer] Document HB_BUFFER_FLAG_VERIFY 2022-01-28 15:05:10 -07:00
Behdad Esfahbod 5b1d813b69 [config] Enable HB_NO_BUFFER_VERIFY in HB_LEAN 2022-01-28 13:53:44 -07:00
Behdad Esfahbod 61823838f9 [buffer] Add HB_BUFFER_FLAG_VERIFY
Move buffer verification code inside the library, from util/.

Part of https://github.com/harfbuzz/harfbuzz/issues/3010
2022-01-28 13:53:44 -07:00
Behdad Esfahbod 7c704d8982 [buffer] Make hb_buffer_append() take a const argument 2022-01-28 13:53:44 -07:00
Behdad Esfahbod 24650624c8 [font] Fix build with no-var configs 2022-01-28 13:53:21 -07:00
Behdad Esfahbod 91b779e23c Avoid redefinition of HB_NO_SETLOCALE in certain configs 2022-01-28 13:52:15 -07:00
Khaled Hosny fa29006bfa [doc] Fix generation of hb_glyph_flags_t docs
GTK-Doc does not like the empty lines here, and interprets everything
after the first empty line as the description of the enum itself not a
specific member and the generated text makes no sense.

Removing the empty lines makes the text harder to read (both in source
and HTML), but at least it is correctly organized.
2022-01-26 19:10:23 -08:00
Behdad Esfahbod e9cc5f6cdb
Merge pull request #3297 from harfbuzz/unsafe-to-concat
Implement UNSAFE_TO_CONCAT flag
2022-01-26 12:23:29 -08:00
Behdad Esfahbod 540af548dc [unsafe-to-concat] Clarify documentation as per feedback
Fixes https://github.com/harfbuzz/harfbuzz/pull/3297#discussion_r754395825
2022-01-25 09:10:56 -07:00
Behdad Esfahbod bad5c94562 [test] Remove HB_UNUSED 2022-01-23 10:53:19 -07:00
Behdad Esfahbod 6c09a8b5b0 [test-serialize] Assert len 2022-01-23 10:52:13 -07:00
Behdad Esfahbod 76c6f4164f [test] Add test-serialize 2022-01-23 10:43:37 -07:00
Behdad Esfahbod 3324606492 [buffer] Oops 2022-01-22 15:46:13 -07:00
Behdad Esfahbod 20031ddbb8 [unsafe-to-concat] Mark in all other shapers
unsafe_to_break() implies unsafe-to-concat; but setting the flag
manually wasn't.
2022-01-22 11:53:18 -07:00
Behdad Esfahbod 6e345f709d Cosmetic 2022-01-22 11:53:18 -07:00
Behdad Esfahbod 374a6f186d [fallback-shape] Add buffer trace log 2022-01-22 11:53:18 -07:00
Behdad Esfahbod bcdfedbc09 [unsafe-to-concat] Mark as unsafe in kern machine
Fixes that last test. Yay!
2022-01-22 11:53:18 -07:00
Behdad Esfahbod 14d43d1235 [unsafe-to-concat] Adjust end conditions 2022-01-22 11:53:18 -07:00
Behdad Esfahbod 8663eda4fd [unsafe-to-concat] More annotations for MarkMarkPos
Failures down to one:

265/401 harfbuzz:shaping+aots / lookupflag_ignore_attach         FAIL
2022-01-22 11:53:18 -07:00
Behdad Esfahbod 6a7d6d4b64 [unsafe-to-concat] More annotations for MarkLigaturePos 2022-01-22 11:53:18 -07:00
Behdad Esfahbod a575992057 [unsafe-to-concat] Mark LigatureSubst
Failures down to two:

209/401 harfbuzz:shaping+aots / gpos6                            FAIL             0.06s   exit status 1
265/401 harfbuzz:shaping+aots / lookupflag_ignore_attach         FAIL             0.06s   exit status 1
2022-01-22 11:53:18 -07:00
Behdad Esfahbod b443898cce [unsafe-to-concat] Adjust MarkBasePos
A couple more aots tests down. Four failing:

209/401 harfbuzz:shaping+aots / gpos6                            FAIL             0.06s   exit status 1
261/401 harfbuzz:shaping+aots / gsub4_1_multiple_ligatures       FAIL             0.07s   exit status 1
265/401 harfbuzz:shaping+aots / lookupflag_ignore_attach         FAIL             0.07s   exit status 1
267/401 harfbuzz:shaping+aots / lookupflag_ignore_combination    FAIL             0.07s   exit status 1
2022-01-22 11:53:18 -07:00
Behdad Esfahbod 95d052a791 [unsafe-to-concat] Adjust GPOS lookbacks
Fixes Cursive aots test, fails a couple new aots ones.
2022-01-22 11:53:18 -07:00
Behdad Esfahbod 909e34f68a [unsafe-to-concat] Adjust Arabic-joining start boundary condition more 2022-01-22 11:53:18 -07:00
Behdad Esfahbod 11bdd7a020 [unsafe-to-concat] Adjust CursivePos
Doesn't fix the test yet.
2022-01-22 11:53:18 -07:00
Behdad Esfahbod ea1b32c8c1 [unsafe-to-concat] Adjust "interior"ness of "from_out_buffer" 2022-01-22 11:53:18 -07:00
Behdad Esfahbod 4f04baef17 [unsafe-to-concat] Further adjust Arabic joining logic at boundary 2022-01-22 11:53:18 -07:00
Behdad Esfahbod 235c3a1295 [unsafe-to-concat] Adjust Arabic joining logic
Test failures done one more. Fixed the mongolian-variation-selector
test.  Another test case:

$ util/hb-shape NotoSansArabic-Regular.ttf -u 628,200c,628 --show-flags --verify
2022-01-22 11:53:18 -07:00
Behdad Esfahbod 48c5f26199 [unsafe-to-concat] Fix PairPos2 logic
Test failures down from 8 to 6:

113/400 harfbuzz:shaping+in-house / mongolian-variation-selector FAIL             0.06s   exit status 1
203/400 harfbuzz:shaping+aots / gpos3                            FAIL             0.06s   exit status 1
204/400 harfbuzz:shaping+aots / gpos4_lookupflag                 FAIL             0.06s   exit status 1
260/400 harfbuzz:shaping+aots / gsub4_1_multiple_ligatures       FAIL             0.06s   exit status 1
264/400 harfbuzz:shaping+aots / lookupflag_ignore_attach         FAIL             0.06s   exit status 1
266/400 harfbuzz:shaping+aots / lookupflag_ignore_combination    FAIL             0.06s   exit status 1
2022-01-22 11:53:18 -07:00
Behdad Esfahbod c0058892be [unsafe-to-concat] Mark entire buffer unsafe-to-concat if kerx format2 2022-01-22 11:53:18 -07:00
Behdad Esfahbod 60006d3687 [gsubgpos] Adjust chaining unsafe-to-concat application
Fixes three tests.
2022-01-22 11:53:18 -07:00
Behdad Esfahbod d98a0fc88e [buffer] Consolidate glyph-flags implementation 2022-01-22 11:53:18 -07:00
Behdad Esfahbod f91ce56e08 [buffer] Add default cluster value in find_min_cluster 2022-01-22 11:53:18 -07:00
Behdad Esfahbod 56d081955c [buffer] Rename _unsafe_to_break_set_mask to _infos_set_glyph_flags 2022-01-22 11:53:18 -07:00
Behdad Esfahbod 78481b32c0 [gsubgpos] Combine input/backtrack/lookahead unsafe-to-concat
I feel like this is correct logic. Still have to prove.

Errors unchanged at 10.
2022-01-22 11:53:18 -07:00
Behdad Esfahbod 596bc7e939 [unsafe-to-concat] Add to GPOS kerning 2022-01-22 11:53:18 -07:00
Behdad Esfahbod e1cbd4539f [unsafe-to-concat] Add annotations to GPOS and kern
Failures from 13 to 14.
2022-01-22 11:53:18 -07:00
Behdad Esfahbod 3122c2cdc4 [buffer] Add HB_GLYPH_FLAG_UNSAFE_TO_CONCAT
Fixes https://github.com/harfbuzz/harfbuzz/issues/1463
2022-01-22 11:53:18 -07:00
Behdad Esfahbod a8b7f18804 [cff] Initialize accelerator members 2022-01-21 07:38:33 -07:00
Behdad Esfahbod cce37a6f10 [gpos] Fix conditional 2022-01-21 07:31:21 -07:00
Behdad Esfahbod 773cf4fdd3 [post] Initialize variables 2022-01-21 07:30:09 -07:00
Behdad Esfahbod 84aa1a836c
[PairPos] Split GPOS kerning to both sides (#3235) 2022-01-20 14:18:19 -07:00
Behdad Esfahbod ae9fc7f533 Clean accelerators a bit more 2022-01-20 12:37:21 -07:00
Behdad Esfahbod 0ae6659398
Merge pull request #3392 from harfbuzz/auto-accelerators
Auto accelerators
2022-01-20 11:28:59 -08:00
Behdad Esfahbod ac1bb3e39e [machinery] Move accelerators to constructor/destructor 2022-01-20 12:10:05 -07:00
Garret Rieger 112cb9fe69 [repacker] Fix missing initilization of obj in vertex_t. 2022-01-20 08:03:52 -08:00
Behdad Esfahbod e062376ef1 [machinery] Make accelerator lazy-loader call Xinit/Xfini
Instead of init/fini. To isolate those functions. To be turned into
constructor/destructors, ideally one per commit (after some SFINAE
foo.)
2022-01-19 17:09:34 -07:00
Behdad Esfahbod 2d12fc90a4 [ms-feature-ranges] Pass reference to cmp function 2022-01-19 14:01:34 -07:00
Behdad Esfahbod ac109c9353 [ms-feature-ranges] Inline code in header file
Fixes https://github.com/harfbuzz/harfbuzz/issues/3387
2022-01-19 12:22:02 -08:00
Behdad Esfahbod 376738d411 [coretext] Fix lsearch 2022-01-19 11:58:42 -07:00
Behdad Esfahbod 106388e766 [vector] Merge sorted-vector into vector
Was easier than I thought!

Let's see what the bot gods think...
2022-01-19 11:38:37 -07:00
Behdad Esfahbod 294d50ff35 [vector] Add sorted template argument 2022-01-19 11:32:14 -07:00
Behdad Esfahbod cd9799784c [vector] Remove old find() method 2022-01-19 11:14:25 -07:00
Behdad Esfahbod 849e40b4db [ms-feature-ranges] Use preferred vector search API 2022-01-19 11:06:33 -07:00
Behdad Esfahbod 7e160dc347 [gpos] Fix unsafe-to-break of mark-attachment
This was undetected because most of the time marks were in same
cluster of their base already.

Fixes https://github.com/harfbuzz/harfbuzz/issues/3093
2022-01-19 09:27:55 -07:00
Behdad Esfahbod c8195dbc01
Merge pull request #3365 from harfbuzz/gdef-fix
GDEF fix
2022-01-19 06:56:05 -08:00
Garret Rieger 94ba4d5a44 [subset] Fix bound check when setting overlap bit.
length() shouldn't be used again as the end of instruction offset is already included in flags_offset.
2022-01-18 19:16:37 -08:00
Behdad Esfahbod fe783ac091 [cff] Remove op_str_t nop init/fini 2022-01-18 13:38:28 -07:00
Behdad Esfahbod 8d24ac2662 [cff] Remove init/fini from number_t 2022-01-18 13:14:42 -07:00
Behdad Esfahbod 6ef83c2c31 [vector] Remove .fini_deep() 2022-01-18 13:08:34 -07:00
Behdad Esfahbod 4eb6e6ea16 [cff] Remove some more fini_deep() 2022-01-18 12:07:05 -07:00
Behdad Esfahbod 29f60d1eaa [cff] Remove init/fini from blend_arg_t 2022-01-18 11:58:16 -07:00
Behdad Esfahbod 213e3f09b1 [vector] Add TODO Emplace? 2022-01-18 11:53:52 -07:00
Garret Rieger f1dc8b087c [subset-cff] Convert subr_closures_t to constructor/destructor instead of init/fini. 2022-01-18 10:29:04 -08:00
Behdad Esfahbod a48aa9850a [subset-cff] Remove another set of fini_deep 2022-01-18 09:32:58 -07:00
Behdad Esfahbod 07474aa8c6 [subset-cff1] Remove a constructor/destructor pair 2022-01-18 09:29:43 -07:00
Behdad Esfahbod a1e9a276eb [subset-cff2] Drop an constructor/destructor pair 2022-01-18 09:27:32 -07:00
Behdad Esfahbod 035f03346d [str_buff_vec_t] Remove unused fini method 2022-01-18 09:26:30 -07:00
Behdad Esfahbod de2cef42b4 [bimap] Remove init/fini 2022-01-18 09:21:31 -07:00
Behdad Esfahbod c3dd21f110 [cff] Remove unneeded init/fini 2022-01-18 09:11:08 -07:00
Behdad Esfahbod 15cceff3d7 [repacker] Replace fini_deep() with fini()
Vector calls destructor now.
2022-01-17 16:46:45 -07:00
Behdad Esfahbod 1198fb2468 [vector] Adjust construction criteria 2022-01-17 16:46:45 -07:00
Behdad Esfahbod c58bfa35fb [vector] Move semantics in vector remove() 2022-01-17 16:46:45 -07:00
Behdad Esfahbod 5946e945d5 [vector] Destruct in pop() 2022-01-17 16:46:45 -07:00
Behdad Esfahbod 7171917b52 [vector] Construct items when enlarging 2022-01-17 16:46:45 -07:00
Behdad Esfahbod 813eaba6ea [vector] Start adding destruction
Now we need to remove manual destruction, ouch!
2022-01-17 16:46:45 -07:00
Behdad Esfahbod 65a22836f8 [vector] Add XXX markers for remaining places that need work 2022-01-17 16:46:45 -07:00
Behdad Esfahbod 92f179075f Make hb_coerce static inline
That's the pattern we follow.

985b63b3ee (commitcomment-63973544)
2022-01-16 07:51:35 -07:00
Behdad Esfahbod 19793f333b Better try at previous commit
985b63b3ee (commitcomment-63973544)
2022-01-16 07:49:40 -07:00
Behdad Esfahbod 1173ed1f7f Try fix Mac build
985b63b3ee (commitcomment-63973544)
2022-01-16 07:48:02 -07:00
Behdad Esfahbod c0f57ccc88 [algs] Add default-construtor to hb_pair_t 2022-01-16 07:01:05 -07:00