Commit Graph

6575 Commits

Author SHA1 Message Date
Behdad Esfahbod 588a4ac8bc Rename 2018-10-02 13:16:43 +02:00
Behdad Esfahbod 10b6c7c638 Minor include cleanup 2018-10-02 13:11:18 +02:00
Behdad Esfahbod 1d1734e985 Shuffle code around 2018-10-02 13:04:05 +02:00
Ebrahim Byagowi bf5088b3dc
Minor, fix -Weverthing bot warnings (#1210) 2018-10-02 11:07:06 +03:30
Khaled Hosny d27e5ec3a2 Skip BOM in the Python sample file
Fixes https://github.com/harfbuzz/harfbuzz/issues/1208
2018-10-02 08:25:29 +02:00
HinTak f9ea3dc4c6 Missing "out" indicator (#1209)
Missing "out" indicator. Affect gobject introspection.
2018-10-02 09:13:06 +03:30
Ebrahim Byagowi 9742679b82
[circleci] Remove some of the not needed flags 2018-10-02 03:20:48 +03:30
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 ab4c37f73a [khmer] Add mark-ordering tests
Fixes https://github.com/harfbuzz/harfbuzz/issues/667
2018-10-01 19:35:48 +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 eb1e602877 [test] Try import unicodedata2 as unicodedata 2018-10-01 15:31:50 +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 3babb0813c [msan] Disable icu explicitly 2018-09-30 20:02:30 +02:00
Behdad Esfahbod dc9b47ae87 [msan] Remove uninstrumented libraries 2018-09-30 18:35:12 +02:00
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 dcfcb950b8 [test] Fix -Wunused-parameter warnings 2018-09-30 18:14:50 +02:00
Behdad Esfahbod be0b2ed316 More warning fixes 2018-09-30 18:02:04 +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
Ebrahim Byagowi 0a89f9572f
[circleci] Pass ‌freetype compile flags to right place 2018-09-30 17:44:15 +03:30
Ebrahim Byagowi ad701f05cc
[circleci] Use an instrumented freetype on msan bot 2018-09-30 17:30:42 +03:30
Ebrahim Byagowi 57aabbc29e
[circleci] Another on fixing msan 2018-09-30 16:31:28 +03:30
Ebrahim Byagowi 24f148df3e
[circleci] minor 2018-09-30 14:46:56 +03:30
Ebrahim Byagowi 0a9aab6722
[circleci] Try to fix msan bot 2018-09-30 14:45:43 +03:30
Behdad Esfahbod b5285b3479 [util] Remove unneeded virtual
clang warning:

../../util/options.hh:72:13: warning: destination for this 'memset' call is a pointer to dynamic class
      'option_parser_t'; vtable pointer will be overwritten [-Wdynamic-class-memaccess]
    memset (this, 0, sizeof (*this));
    ~~~~~~  ^
../../util/options.hh:72:13: note: explicitly cast the pointer to silence this warning
    memset (this, 0, sizeof (*this));
            ^
            (void*)
2018-09-30 12:23:01 +02:00
Behdad Esfahbod 89ed040b21 [util] Fix more non-virtual-destructor warnings 2018-09-30 06:08:11 -04:00
Behdad Esfahbod 2382dd07fa Minor 2018-09-30 06:08:11 -04:00
Behdad Esfahbod 9caa432d0c [util] Use HB_FALLTHROUGH
Sure, gcc knows to warn about this as well:

../../util/options.cc:175:17: warning: this statement may fall through [-Wimplicit-fallthrough=]
     case 1: m.r = m.t;
             ~~~~^~~~~
../../util/options.cc:176:5: note: here
     case 2: m.b = m.t;
     ^~~~

But HOLY SMOKES, look at clang -Weverything bot message:

options.cc:176:5: warning: unannotated fall-through between switch labels [-Wimplicit-fallthrough]
    case 2: m.b = m.t;
    ^
options.cc:176:5: note: insert 'HB_FALLTHROUGH;' to silence this warning
    case 2: m.b = m.t;
    ^
    HB_FALLTHROUGH;

Right, it's telling me to insert "HB_FALLTHROUGH;" there!!!!!!!!!
2018-09-30 06:08:11 -04:00
Behdad Esfahbod 2e728a7d86 [util] Mark var static
From clang -Weverything bot:

options.cc:39:3: warning: no previous extern declaration for non-static variable 'supported_font_funcs' [-Wmissing-variable-declarations]
2018-09-30 06:08:11 -04:00
Behdad Esfahbod e910a1aef4 [util] Add empty virtual destructor to option_group_t
From clang -Weverything bot:

./options.hh:57:8: warning: 'option_group_t' has virtual functions but non-virtual destructor [-Wnon-virtual-dtor]
struct option_group_t
       ^
2018-09-30 06:08:11 -04: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
Ebrahim Byagowi 06be2aa93f
[ci] Build glib and freetype and enable msan bot (#1198) 2018-09-30 00:15:25 +03:30
Ebrahim Byagowi cefdef0247
Minor on test-multithread, align the actual and expected results 2018-09-29 10:19:54 +03:30
Ebrahim Byagowi 678beff64c
[circleci] Add -Wno-reserved-id-macro to clang-everything 2018-09-29 10:16:14 +03:30
Behdad Esfahbod c763b94401 [test-multithread] Disable FreeType funcs 2018-09-28 20:53:23 -04:00
Behdad Esfahbod 9b0b40b3c1 Fix fallback kerning to check for current glyph's mask 2018-09-28 20:53:23 -04:00