Commit Graph

5172 Commits

Author SHA1 Message Date
Ebrahim Byagowi f72b748371
[circleci] Fix "msan" and "everything" bots (#1205) 2018-10-02 00:16:08 +03:30
Behdad Esfahbod 8bf4027d23 [indic] Remove Consonant_Medial from grammar and code
The only Indic CM is U+0A75 GURMUKHI SIGN YAKASH, which Uniscribe doesn't treat
specially, and font designers design for that.  So, do the same.
2018-10-01 20:05:00 +02:00
Behdad Esfahbod 5143654716 [khmer] Rewrite grammar completely
Based on experimenting with Uniscribe to extract grammar and categories.

Failures down from 44 to 35:

KHMER: 299089 out of 299124 tests passed. 35 failed (0.0117008%)

We still don't enforce the one-matra rule pre-decomposition, but enforce
an order and one-matra-per-position post-decomposition.

https://github.com/harfbuzz/harfbuzz/issues/667
2018-10-01 19:23:47 +02:00
Behdad Esfahbod aaaa65baa7 [khmer] Remove unused code 2018-10-01 16:59:48 +02:00
Behdad Esfahbod 81afdbe803 [use] Disable automatic ZWJ for 'akhn' feature
Fixes https://github.com/harfbuzz/harfbuzz/issues/746
2018-10-01 15:27:35 +02:00
Behdad Esfahbod ceef311dca [use] Change categories for Left_And_* matras
These are only relevant to Sinhala, because they decompose in other
cases.  The USE spec categorizes them all as VPst.  No idea why we
weren't following that before.
2018-10-01 13:04:49 +02:00
Behdad Esfahbod 3426a36157 Unbreak bots 2018-10-01 12:55:57 +02:00
Behdad Esfahbod 98ac01d3b3 [morx] Break out if buffer gets into error
Was getting stuck not making progress somehow.
2018-10-01 12:10:00 +02:00
Behdad Esfahbod df827a6ab8 [cache] Fix cache coherency corner-case
If key_bits+value_bits-cache_bits==32 then -1 is ambiguous...
2018-10-01 11:39:29 +02:00
Ebrahim Byagowi 0fa1edbd3b
[circleci] Couple of fixes (#1200)
* Raise error on warnings on -everything
* Enable fontconfig to two bots
* Fix msan bot now that all of its real complain are gone
2018-10-01 09:40:29 +03:30
Behdad Esfahbod ad1c190ecf Correct fix for glib-mkenum warning 2018-09-30 18:26:45 +02:00
Behdad Esfahbod 1dd1e56bf4 Revert "Fix glib-mkenum warning"
This reverts commit 247756a7d8.

Was wrong.  Right fix coming.
2018-09-30 18:25:58 +02:00
Behdad Esfahbod 3f08750fa6 Move _POSIX_SOURCE to hb.hh 2018-09-30 18:23:34 +02:00
Behdad Esfahbod 90dd255e57 Change _HB_SCRIPT_MAX_VALUE from 0xFFFFFFFF to 0x7FFFFFFF
Fixes https://github.com/harfbuzz/harfbuzz/issues/504
2018-09-30 18:19:54 +02:00
Behdad Esfahbod 5c65ed800d Fix bug introduced in 9b0b40b3c1
Also discovered by msan bot.
2018-09-30 17:49:33 +02:00
Behdad Esfahbod 247756a7d8 Fix glib-mkenum warning
GEN      hb-gobject-enums.h
WARNING: Failed to parse "/*< private >*/" in ../../src/hb-buffer.h
2018-09-30 17:49:33 +02:00
Behdad Esfahbod b1e07e1e6c [indic/khmer] Remove use of global constructors
Alternative woul have been to resurrect F_COMBINE that I removed in
70136a78cb

But this does it for now.  I'm not sure why check-static-inits.sh didn't
catch this before.  Clang -Weverything bot did:

  CXX      libharfbuzz_la-hb-ot-shape-complex-indic.lo
hb-ot-shape-complex-indic.cc:99:1: warning: declaration requires a global constructor [-Wglobal-constructors]
indic_features[] =
^
1 warning generated.
  CXX      libharfbuzz_la-hb-ot-shape-complex-khmer.lo
hb-ot-shape-complex-khmer.cc:36:1: warning: declaration requires a global constructor [-Wglobal-constructors]
khmer_features[] =
^
1 warning generated.
2018-09-30 06:08:11 -04:00
Behdad Esfahbod 00cd00e641 Tweak HB_TAG and HB_UNTAG
uint32_t was getting promoted to signed int, which is not what we wanted...

Wow, clang has become good at generating warnings...

../../src/hb-common.h:349:29: warning: signed shift result (0xFF000000) sets the sign bit of the shift expression's type ('int') and becomes negative [-Wshift-sign-overflow]
  _HB_SCRIPT_MAX_VALUE                          = HB_TAG_MAX, /*< skip >*/
                                                  ^~~~~~~~~~
../../src/hb-common.h:93:20: note: expanded from macro 'HB_TAG_MAX'
 define HB_TAG_MAX HB_TAG(0xff,0xff,0xff,0xff)
                   ^~~~~~~~~~~~~~~~~~~~~~~~~~~
../../src/hb-common.h:89:57: note: expanded from macro 'HB_TAG'
 define HB_TAG(c1,c2,c3,c4) ((hb_tag_t)((((uint8_t)(c1))<<24)|(((uint8_t)(c2))<<16)|(((uint8_t)(c3))<<8)|((uint8_t)(c4))))
                                         ~~~~~~~~~~~~~~~^ ~~
../../src/hb-common.h:349:3: warning: ISO C restricts enumerator values to range of 'int' (4294967295 is too large) [-Wpedantic]
  _HB_SCRIPT_MAX_VALUE                          = HB_TAG_MAX, /*< skip >*/
  ^                                               ~~~~~~~~~~
2018-09-30 06:08:11 -04:00
Behdad Esfahbod 8a31e40629 [font] Make *_advance() fallback to *_advances
And remove redundant implementations.
2018-09-30 06:08:11 -04:00
Behdad Esfahbod bd07d2878f Use buffer scratch_flags to remember if we had any joiners 2018-09-30 06:08:11 -04:00
Behdad Esfahbod ba0f0f156f Document setlocale() threadsafety issue
"Fixes" //github.com/harfbuzz/harfbuzz/issues/1191
2018-09-30 06:08:11 -04:00
Behdad Esfahbod 9b0b40b3c1 Fix fallback kerning to check for current glyph's mask 2018-09-28 20:53:23 -04:00
Behdad Esfahbod f4072e8cb8 [morx] Remove mark_set from Insertion
text-rendering-tests test MORX-32 shows that for Insertion, an unset mark is treated
as mark set at 0.  This is unlike the Reordering lookup where un unset mark performs
nothing.

Fixes MORX-32.
2018-09-28 10:14:23 -04:00
Behdad Esfahbod 0d18ec5467 [morx] unsafe-to-break in Insertion
Makes MORX-29, MORX-30, MORX-31 pass.
2018-09-28 10:01:59 -04:00
Behdad Esfahbod b435df3a5b More atomic tuneup 2018-09-28 09:13:14 -04:00
Behdad Esfahbod d2542cd28c More atomic fixup 2018-09-27 17:23:24 -04:00
Behdad Esfahbod 3ee96984f4 Fixup atomics from recent change 2018-09-27 17:20:26 -04:00
Behdad Esfahbod 305468708d [cache] Use atomic writes in clear()
To help TSan.
2018-09-27 16:54:23 -04:00
Volker Krause 9e9a36ee65 Fix infinite loop when walking up the directory hierarchy (#1183)
A single find_package(harfbuzz) line in user code resulted in this loop
getting stuck when _harfbuzz_libdir_iter became "/".
2018-09-27 18:03:49 +03:30
Behdad Esfahbod 662f7d7e8b [arabic] Do the joiner-flipping only for rlig feature
See comment.
2018-09-26 18:54:09 -04:00
Behdad Esfahbod 7f30629cdd [ft] Make TSan happy 2018-09-26 16:40:59 -04:00
Behdad Esfahbod ec743fce2a Add more atomic intrinsics 2018-09-26 16:40:59 -04:00
Behdad Esfahbod 90a0f9fa0c Make TSan happy with make_immutable() 2018-09-26 15:03:07 -04:00
Behdad Esfahbod 824111d484 Fix iOS build
Fixes https://github.com/harfbuzz/harfbuzz/pull/1179
2018-09-25 12:47:48 -04:00
Behdad Esfahbod 6c0e7eb6a6 Minor 2018-09-24 19:07:23 -04:00
Behdad Esfahbod d748dc7664 More iter inits 2018-09-24 18:30:50 -04:00
Behdad Esfahbod d9867497d0 Minor 2018-09-24 18:11:59 -04:00
Behdad Esfahbod 70136a78cb Remove F_COMBINE
Now I wonder if any bots will be unhappy we calling | in static const initializations...
Or would that cost runtime init?  Our tests don't detect any..
2018-09-24 18:04:17 -04:00
Behdad Esfahbod f048ead84a Some more 2018-09-24 18:04:17 -04:00
Behdad Esfahbod 1676f608c8 Minor refactoring 2018-09-24 18:04:17 -04:00
Behdad Esfahbod 4839807340 [check-static-inits.sh] Allow some if ubsan is in effect 2018-09-24 13:11:34 -04:00
Behdad Esfahbod e45ba31dc7 [check-symbols.sh] Allow weak objects "V"
ubsan generates these.
2018-09-24 13:04:48 -04:00
Behdad Esfahbod 2d93148a0f Ignore weak symbols in check-symbols.sh
Some clang versions leave a std::round(float) weak symbol around...
2018-09-24 11:52:22 -04:00
Behdad Esfahbod 55bae6825e [docs] A few improvements
If we wrote just this much every day...
2018-09-24 10:43:06 -04:00
Behdad Esfahbod 57fa2c23de Readjust Hebrew composition again 2018-09-24 09:57:52 -04:00
Behdad Esfahbod 7f335390f3 Revert change that would decompose text if GPOS mark feature is available
https://github.com/harfbuzz/harfbuzz/issues/653#issuecomment-423905920
2018-09-24 09:56:18 -04:00
Behdad Esfahbod a6f4b2f7cd Fix normalization
62d1e0852a (commitcomment-30613091)
2018-09-24 09:54:37 -04:00
Behdad Esfahbod 3583fb03b1 Simplify ZWJ-skipping a bit
Towards disabling ZWJ-skipping in certain GPOS contexts.

Part of https://github.com/flutter/flutter/issues/16886
2018-09-23 22:33:38 -04:00
Behdad Esfahbod 9516cbd3df Reinit skippy iters when auto_zwj / auto_zwnj change
Ouch.  How did we not hit this bug before...
2018-09-23 22:00:34 -04:00
Behdad Esfahbod 62d1e0852a Prefer decomposed form if font has GPOS mark feature
Fixes https://github.com/harfbuzz/harfbuzz/issues/653
2018-09-23 21:32:18 -04:00