Ebrahim Byagowi [Wed, 9 Jan 2019 12:26:32 +0000 (15:56 +0330)]
Minor, hack .editorconfig for vscode use
As VSCode and Atom https://github.com/Microsoft/vscode/issues/44438 don't support it
Michiharu Ariza [Tue, 8 Jan 2019 20:37:48 +0000 (12:37 -0800)]
fix leak in subset_enc_supp_codes (#1537)
oss-fuzz issue 12310
Ebrahim Byagowi [Fri, 4 Jan 2019 19:40:39 +0000 (23:10 +0330)]
[ci] Enable more of GCC compile warnings (#1533)
Nathan Willis [Mon, 3 Dec 2018 18:49:44 +0000 (12:49 -0600)]
Usermanual: small formatting and wording fixes.
Nathan Willis [Wed, 28 Nov 2018 19:48:38 +0000 (13:48 -0600)]
Usermanual: small updates.
cclauss [Mon, 31 Dec 2018 03:30:43 +0000 (04:30 +0100)]
CircleCI: Test for Python 3 syntax errors and undefined names (#1522)
Catch missing imports and errors like #1520 and #1521
__E901,E999,F821,F822,F823__ are the "_showstopper_" [flake8](http://flake8.pycqa.org) issues that can halt the runtime with a SyntaxError, NameError, etc. Most other flake8 issues are merely "style violations" -- useful for readability but they do not effect runtime safety.
* F821: undefined name `name`
* F822: undefined name `name` in `__all__`
* F823: local variable name referenced before assignment
* E901: SyntaxError or IndentationError
* E999: SyntaxError -- failed to compile a file into an Abstract Syntax Tree
Behdad Esfahbod [Sun, 30 Dec 2018 16:27:42 +0000 (11:27 -0500)]
Fix automake warnings
[skip ci]
cclauss [Sun, 30 Dec 2018 12:07:28 +0000 (13:07 +0100)]
print() is a function in Python 3 (#1520)
cclauss [Sun, 30 Dec 2018 11:58:34 +0000 (12:58 +0100)]
Python 3 fixes to gen-os2-unicode-ranges.py (#1521)
In Python 3, __reload()__ was moved and __sys.setdefaultencoding()__ because the default is already utf-8. Also __Error()__ is an _undefined name_ and __Exception()__ creates a generic exception.
Ebrahim Byagowi [Sun, 30 Dec 2018 06:53:47 +0000 (10:23 +0330)]
[cmake] Enable C++11 on CMake (#1519)
Behdad Esfahbod [Sun, 30 Dec 2018 06:53:03 +0000 (01:53 -0500)]
Ouch! Fix build on C++<11
Behdad Esfahbod [Sun, 30 Dec 2018 06:52:19 +0000 (01:52 -0500)]
Fix ubsan with passing nullptr to qsort()
Behdad Esfahbod [Thu, 27 Dec 2018 23:29:23 +0000 (18:29 -0500)]
Fix build on C++ < 11
Behdad Esfahbod [Thu, 27 Dec 2018 23:27:36 +0000 (18:27 -0500)]
[vector] Fix warning
Behdad Esfahbod [Thu, 27 Dec 2018 23:27:11 +0000 (18:27 -0500)]
[aat] Minor
Behdad Esfahbod [Thu, 27 Dec 2018 23:01:06 +0000 (18:01 -0500)]
[vector] Remove use of arrayZ() by using casts
Behdad Esfahbod [Thu, 27 Dec 2018 22:56:22 +0000 (17:56 -0500)]
[vector] Remove static_array
Was good idea, but with C++ types with constructor/destructor, was getting in
the way as compiler was destructing those items where it was not desired.
Since C++ does not allow zero-sized arrays, just remove it...
Behdad Esfahbod [Thu, 27 Dec 2018 22:45:05 +0000 (17:45 -0500)]
[vector] Use allocated = -1 to signify failure
Michiharu Ariza [Thu, 27 Dec 2018 16:33:09 +0000 (08:33 -0800)]
fix lealk with cff2::accelerator_templ_t::topDict (#1517)
Behdad Esfahbod [Mon, 24 Dec 2018 16:31:04 +0000 (11:31 -0500)]
[vector] Change pre-alloced count from 8 to 2
I'm thinking about dropping it to zero, but that needs slight code changes.
Behdad Esfahbod [Mon, 24 Dec 2018 01:19:52 +0000 (20:19 -0500)]
Fix a few warnings
Behdad Esfahbod [Sat, 22 Dec 2018 21:19:10 +0000 (16:19 -0500)]
[iter] Fix warning
Behdad Esfahbod [Sat, 22 Dec 2018 21:11:22 +0000 (16:11 -0500)]
[set] Add iter_t as alias to const_iter_t
Behdad Esfahbod [Sat, 22 Dec 2018 20:10:18 +0000 (15:10 -0500)]
[set] Change to const_iter
Behdad Esfahbod [Sat, 22 Dec 2018 16:11:10 +0000 (11:11 -0500)]
[set] Cache length in iterator
Ebrahim Byagowi [Sat, 22 Dec 2018 16:17:48 +0000 (19:47 +0330)]
Minor, remove redundant inline
Ebrahim Byagowi [Sat, 22 Dec 2018 16:17:29 +0000 (19:47 +0330)]
Minor, tweak spaces
Michiharu Ariza [Sat, 22 Dec 2018 15:47:04 +0000 (07:47 -0800)]
CFF renaming (#1507)
* reimplement ByteStr as byte_str_t based on hb_ubytes_t
Unuse start_embed<ByteStr>
Also renamed SubByteStr to byte_str_ref_t
More renaming to come
* substr renamed to str_ref in line with its type byte_str_ref_t
* uncamelize non-table struct names
* uncamelized non-struct types OpCode etc
* add byte_str_t copy ctor
* test
* test2
* undo tests
* fix bot failure
* undo the previous change
* fixed tabs, added inline
* Revert "fixed tabs, added inline"
This reverts commit
21163c30e9d18759414f7fe2518628241599f039.
* fix tabs
Behdad Esfahbod [Sat, 22 Dec 2018 01:07:52 +0000 (20:07 -0500)]
[set] Actually derive iterator from hb_sorted_iter_t<>
Behdad Esfahbod [Sat, 22 Dec 2018 01:06:17 +0000 (20:06 -0500)]
[set] Implement unified iterator
Behdad Esfahbod [Sat, 22 Dec 2018 01:00:52 +0000 (20:00 -0500)]
[set] Mark some internals protected
Behdad Esfahbod [Sat, 22 Dec 2018 00:55:02 +0000 (19:55 -0500)]
[iter] Add hb_sorted_iter_t<>
Behdad Esfahbod [Sat, 22 Dec 2018 00:48:21 +0000 (19:48 -0500)]
[iter] Change operator[] operand to be signed
To fix older compilers again (this was the case in hb_array_t).
hb-ot-layout-common.hh:1353: note: candidate 2: operator[](T*, int) <built-in>
hb-ot-layout-common.hh:1354: error: ISO C++ says that these are ambiguous, even though the worst conversion for the first is better than the worst conversion for the second:
hb-iter.hh:63: note: candidate 1: Item& hb_iter_t<Iter, Item>::operator[](unsigned int) const [with Iter = hb_array_t<const OT::IntType<short unsigned int, 2u> >, Item = const OT::IntType<short unsigned int, 2u>]
hb-ot-layout-common.hh:1354: note: candidate 2: operator[](T*, int) <built-in>
hb-ot-layout-common.hh: In member function 'bool OT::ClassDef::serialize(hb_serialize_context_t*, hb_array_t<const OT::IntType<short unsigned int, 2u> >, hb_array_t<const OT::IntType<short unsigned int, 2u> >)':
hb-ot-layout-common.hh:1490: error: ISO C++ says that these are ambiguous, even though the worst conversion for the first is better than the worst conversion for the second:
hb-iter.hh:63: note: candidate 1: Item& hb_iter_t<Iter, Item>::operator[](unsigned int) const [with Iter = hb_array_t<const OT::IntType<short unsigned int, 2u> >, Item = const OT::IntType<short unsigned int, 2u>]
hb-ot-layout-common.hh:1490: note: candidate 2: operator[](T*, int) <built-in>
Behdad Esfahbod [Sat, 22 Dec 2018 00:29:00 +0000 (19:29 -0500)]
[array] Port to hb_iter_t<>
hb_array_t is its own iterator...
Behdad Esfahbod [Fri, 21 Dec 2018 23:49:27 +0000 (18:49 -0500)]
[iter] Change __more__ to fallback to __len__
Behdad Esfahbod [Fri, 21 Dec 2018 23:46:51 +0000 (18:46 -0500)]
[array/vector] Rename len to length
Behdad Esfahbod [Fri, 21 Dec 2018 23:09:45 +0000 (18:09 -0500)]
[iter] Split hb_iter_t<> into hb_iter_t<> and hb_iter_mixin_t<>
Behdad Esfahbod [Fri, 21 Dec 2018 22:35:58 +0000 (17:35 -0500)]
Adjust internal header dependencies
Behdad Esfahbod [Fri, 21 Dec 2018 22:29:11 +0000 (17:29 -0500)]
[Makefile.am] Minor
Behdad Esfahbod [Fri, 21 Dec 2018 22:22:09 +0000 (17:22 -0500)]
[iter] Include from hb.hh
Behdad Esfahbod [Fri, 21 Dec 2018 22:21:19 +0000 (17:21 -0500)]
[iter] Move hb_fill() and hb_copy() to hb-iter.hh
Behdad Esfahbod [Fri, 21 Dec 2018 21:39:57 +0000 (16:39 -0500)]
[iter] Disallow copy-construction or assignment of hb_iter_t<>
Should only be done by subclass.
Behdad Esfahbod [Fri, 21 Dec 2018 21:20:30 +0000 (16:20 -0500)]
[iter] Fix hb_copy() return value
Behdad Esfahbod [Fri, 21 Dec 2018 21:19:44 +0000 (16:19 -0500)]
[iter] Add const_iter_t / const_iter()
Behdad Esfahbod [Fri, 21 Dec 2018 21:04:38 +0000 (16:04 -0500)]
[iter] Make hb_fill() take collection type, not iter
Starting to get the hang of when take which.
Behdad Esfahbod [Fri, 21 Dec 2018 21:02:16 +0000 (16:02 -0500)]
[array] Add more hb_array() / hb_sorted_array() variants
Behdad Esfahbod [Fri, 21 Dec 2018 20:56:01 +0000 (15:56 -0500)]
[serialize] Use component_list by reference, as a supplier
Behdad Esfahbod [Fri, 21 Dec 2018 20:53:09 +0000 (15:53 -0500)]
[iter] Add .random_access()
Behdad Esfahbod [Fri, 21 Dec 2018 20:19:22 +0000 (15:19 -0500)]
[iter] Fix __end__()
Behdad Esfahbod [Fri, 21 Dec 2018 20:12:55 +0000 (15:12 -0500)]
[array] Remove copy constructor
Fixes https://github.com/harfbuzz/harfbuzz/issues/1502
Behdad Esfahbod [Fri, 21 Dec 2018 20:08:06 +0000 (15:08 -0500)]
Fix bot
C:\projects\harfbuzz\src\hb-uniscribe.cc(709): error C2666: 'hb_vector_t<OPENTYPE_FEATURE_RECORD,8>::operator +': 3 overloads have similar conversions [C:\projects\harfbuzz\build\harfbuzz.vcxproj]
Behdad Esfahbod [Fri, 21 Dec 2018 20:05:00 +0000 (15:05 -0500)]
Minor
Behdad Esfahbod [Fri, 21 Dec 2018 16:20:27 +0000 (11:20 -0500)]
[iter] Fix test again
Behdad Esfahbod [Fri, 21 Dec 2018 16:15:16 +0000 (11:15 -0500)]
Minor
Behdad Esfahbod [Fri, 21 Dec 2018 08:03:46 +0000 (03:03 -0500)]
[iter] More prototyping
Behdad Esfahbod [Fri, 21 Dec 2018 07:48:28 +0000 (02:48 -0500)]
[iter] Make hb_fill() and hb_copy() take iterators
I'm still going back and force...
Behdad Esfahbod [Fri, 21 Dec 2018 07:47:04 +0000 (02:47 -0500)]
[iter] Add hb_fill()
Behdad Esfahbod [Fri, 21 Dec 2018 07:12:55 +0000 (02:12 -0500)]
[iter] Start prototyping hb_copy()
Behdad Esfahbod [Fri, 21 Dec 2018 06:59:37 +0000 (01:59 -0500)]
[iter] Showcase implicit casts
Behdad Esfahbod [Fri, 21 Dec 2018 06:57:40 +0000 (01:57 -0500)]
Rename
Behdad Esfahbod [Fri, 21 Dec 2018 06:57:02 +0000 (01:57 -0500)]
[iter] Rename
Behdad Esfahbod [Fri, 21 Dec 2018 06:53:27 +0000 (01:53 -0500)]
[iter] First sample use
Behdad Esfahbod [Fri, 21 Dec 2018 06:17:35 +0000 (01:17 -0500)]
[iter] Add bidirectionality
Behdad Esfahbod [Fri, 21 Dec 2018 05:54:55 +0000 (00:54 -0500)]
[iter] Sketch new iterator design
Behdad Esfahbod [Fri, 21 Dec 2018 05:23:34 +0000 (00:23 -0500)]
[iter] Add empty test
Behdad Esfahbod [Fri, 21 Dec 2018 05:08:05 +0000 (00:08 -0500)]
Revert "Remove unused hb-iter.hh"
This reverts commit
969ff3c7aadbe721cdd414488eb170433f10d00c.
Behdad Esfahbod [Fri, 21 Dec 2018 04:15:49 +0000 (23:15 -0500)]
[vector] Add operator bool
Behdad Esfahbod [Fri, 21 Dec 2018 04:14:24 +0000 (23:14 -0500)]
Rename
Behdad Esfahbod [Fri, 21 Dec 2018 04:13:36 +0000 (23:13 -0500)]
Remove unused typedef
Behdad Esfahbod [Fri, 21 Dec 2018 02:48:57 +0000 (21:48 -0500)]
2.3.0
Behdad Esfahbod [Thu, 20 Dec 2018 20:54:17 +0000 (15:54 -0500)]
[serializer] Add operator <<
Not sure if we are going to use it. But might incentivize us to.
Behdad Esfahbod [Thu, 20 Dec 2018 20:38:59 +0000 (15:38 -0500)]
Add hb_assign(obj, value)
Behdad Esfahbod [Thu, 20 Dec 2018 17:26:30 +0000 (12:26 -0500)]
[serialize] Adjust ClassDef
[skip ci]
Behdad Esfahbod [Thu, 20 Dec 2018 16:48:45 +0000 (11:48 -0500)]
Fix code on big-endian gcc / clang
Ouch! We need a bigendian bot...
Fixes https://github.com/harfbuzz/harfbuzz/issues/1498
Behdad Esfahbod [Thu, 20 Dec 2018 03:28:16 +0000 (22:28 -0500)]
Minor [skip ci]
Behdad Esfahbod [Thu, 20 Dec 2018 02:07:53 +0000 (21:07 -0500)]
[saitnize] Minor
fanc999 [Thu, 20 Dec 2018 03:26:54 +0000 (11:26 +0800)]
Fix build on older Visual Studio versions (#1499)
* src/hb-cff-interp-dict-common.hh: Use ull for unsigned int64_t
The llu suffix does not work for older Visual Studio versions
(pre-2013), but ull works for all the compilers that we attempt to
support.
* test/api: Fix build on pre-C99 compilers
Ensure variables are declared at the top of the block.
* src/hb-dsalgs.hh: Add specialization for hb_is_signed<> for __int8
Pre-Visual Studio 2010 does not consider __int8 (which is typedef'ed to
int8_t) to be equivilant to signed char, so the compiler cannot find the
corresponding hb_is_signed<> specialization that is needed.
The interesting thing is unsigned __int8 is considered to be equivilant
to unsigned char, so as the other types (short, int, long) that we look
for here, so only the specialization for __int8 is added here.
This will fix builds on Visual Studio 2008 at least.
Behdad Esfahbod [Thu, 20 Dec 2018 02:05:00 +0000 (21:05 -0500)]
[sanitize] Use hb_static_size instead of ::static_size
https://github.com/harfbuzz/harfbuzz/issues/1496#issuecomment-
448818112
Ebrahim Byagowi [Wed, 19 Dec 2018 17:48:30 +0000 (21:18 +0330)]
[test] Fix test-name-table.cc leak issue
Spotted it accidentally but wanted to see if is anything serious so went for fixing it
Behdad Esfahbod [Wed, 19 Dec 2018 03:11:23 +0000 (22:11 -0500)]
[arrays] Add hb_ubytes_t for unsigned char
Behdad Esfahbod [Tue, 18 Dec 2018 21:49:08 +0000 (16:49 -0500)]
[arrays] Remove hb_supplier_t<>
Behdad Esfahbod [Tue, 18 Dec 2018 18:23:32 +0000 (13:23 -0500)]
[serialize] Propagate error from hb-face
Behdad Esfahbod [Tue, 18 Dec 2018 18:22:17 +0000 (13:22 -0500)]
[serialize] Streamline error propagation
Behdad Esfahbod [Tue, 18 Dec 2018 03:43:00 +0000 (22:43 -0500)]
Remove unused hb-iter.hh
The ideas there are all part of hb-array.hh now. To be determined how we
want to use generic iterator patterns.
Behdad Esfahbod [Tue, 18 Dec 2018 03:41:04 +0000 (22:41 -0500)]
[arrays] Minor tweaks to hb_supplier_t
I think I like to keep this hb_supplier_t thing separately from hb_array_t.
Behdad Esfahbod [Tue, 18 Dec 2018 03:36:23 +0000 (22:36 -0500)]
[arrays] Rename Supplier to hb_supplier_t
Behdad Esfahbod [Tue, 18 Dec 2018 02:55:33 +0000 (21:55 -0500)]
Hide hb_addressof()
Behdad Esfahbod [Tue, 18 Dec 2018 01:34:51 +0000 (20:34 -0500)]
Enable __builtin_* on clang
We'll see which old clang versions this breaks...
Behdad Esfahbod [Tue, 18 Dec 2018 01:23:26 +0000 (20:23 -0500)]
Add hb_addressof() and use it to fix bug after hb_bytes_t merge
We cannot take address hb_bytes_t direction. We need to use the
newly added hb_addressof(), ala std::addressof().
Behdad Esfahbod [Mon, 17 Dec 2018 23:27:36 +0000 (18:27 -0500)]
Enable system extensions in hb.hh
Fixes https://github.com/harfbuzz/harfbuzz/issues/1491
prrace [Mon, 17 Dec 2018 22:59:37 +0000 (14:59 -0800)]
Fix Solaris use after free (#1495)
Behdad Esfahbod [Mon, 17 Dec 2018 22:56:10 +0000 (17:56 -0500)]
Remove define GNU_SOURCE
Not needed. We get it in our config.h automatically thanks to
AC_USE_SYSTEM_EXTENSIONS. Let's see whose build it breaks...
If we end up putting it back, we should add other things from
that macro and remove the macro.
Behdad Esfahbod [Mon, 17 Dec 2018 22:19:42 +0000 (17:19 -0500)]
Fix more warnings
prrace [Mon, 17 Dec 2018 22:18:47 +0000 (14:18 -0800)]
Fix Solaris Trailing comma in enum warnings (#1490)
Ebrahim Byagowi [Mon, 17 Dec 2018 18:01:43 +0000 (21:31 +0330)]
Lower coretext_aat shaper priority (#1488)
Related to https://github.com/harfbuzz/harfbuzz/issues/1478
Ebrahim Byagowi [Mon, 17 Dec 2018 18:01:01 +0000 (21:31 +0330)]
Remove redundant void from C++ sources (#1486)
Ebrahim Byagowi [Mon, 17 Dec 2018 16:37:04 +0000 (20:07 +0330)]
Minor, fix two more ArrayOf incorrect operator logic
Behdad Esfahbod [Mon, 17 Dec 2018 15:44:14 +0000 (10:44 -0500)]
[arrays] Minor fix
Behdad Esfahbod [Mon, 17 Dec 2018 05:39:30 +0000 (00:39 -0500)]
[array] Add cast operator to add const to Type
In lieu of constructor removed in previous commit.
Behdad Esfahbod [Mon, 17 Dec 2018 05:38:13 +0000 (00:38 -0500)]
[array] Remove problematic constructor