platform/upstream/libHarfBuzzSharp.git
5 years ago[aat] Minor
Behdad Esfahbod [Thu, 27 Dec 2018 23:27:11 +0000 (18:27 -0500)]
[aat] Minor

5 years ago[vector] Remove use of arrayZ() by using casts
Behdad Esfahbod [Thu, 27 Dec 2018 23:01:06 +0000 (18:01 -0500)]
[vector] Remove use of arrayZ() by using casts

5 years ago[vector] Remove static_array
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...

5 years ago[vector] Use allocated = -1 to signify failure
Behdad Esfahbod [Thu, 27 Dec 2018 22:45:05 +0000 (17:45 -0500)]
[vector] Use allocated = -1 to signify failure

5 years agofix lealk with cff2::accelerator_templ_t::topDict (#1517)
Michiharu Ariza [Thu, 27 Dec 2018 16:33:09 +0000 (08:33 -0800)]
fix lealk with cff2::accelerator_templ_t::topDict (#1517)

5 years ago[vector] Change pre-alloced count from 8 to 2
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.

5 years agoFix a few warnings
Behdad Esfahbod [Mon, 24 Dec 2018 01:19:52 +0000 (20:19 -0500)]
Fix a few warnings

5 years ago[iter] Fix warning
Behdad Esfahbod [Sat, 22 Dec 2018 21:19:10 +0000 (16:19 -0500)]
[iter] Fix warning

5 years ago[set] Add iter_t as alias to const_iter_t
Behdad Esfahbod [Sat, 22 Dec 2018 21:11:22 +0000 (16:11 -0500)]
[set] Add iter_t as alias to const_iter_t

5 years ago[set] Change to const_iter
Behdad Esfahbod [Sat, 22 Dec 2018 20:10:18 +0000 (15:10 -0500)]
[set] Change to const_iter

5 years ago[set] Cache length in iterator
Behdad Esfahbod [Sat, 22 Dec 2018 16:11:10 +0000 (11:11 -0500)]
[set] Cache length in iterator

5 years agoMinor, remove redundant inline
Ebrahim Byagowi [Sat, 22 Dec 2018 16:17:48 +0000 (19:47 +0330)]
Minor, remove redundant inline

5 years agoMinor, tweak spaces
Ebrahim Byagowi [Sat, 22 Dec 2018 16:17:29 +0000 (19:47 +0330)]
Minor, tweak spaces

5 years agoCFF renaming (#1507)
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

5 years ago[set] Actually derive iterator from hb_sorted_iter_t<>
Behdad Esfahbod [Sat, 22 Dec 2018 01:07:52 +0000 (20:07 -0500)]
[set] Actually derive iterator from hb_sorted_iter_t<>

5 years ago[set] Implement unified iterator
Behdad Esfahbod [Sat, 22 Dec 2018 01:06:17 +0000 (20:06 -0500)]
[set] Implement unified iterator

5 years ago[set] Mark some internals protected
Behdad Esfahbod [Sat, 22 Dec 2018 01:00:52 +0000 (20:00 -0500)]
[set] Mark some internals protected

5 years ago[iter] Add hb_sorted_iter_t<>
Behdad Esfahbod [Sat, 22 Dec 2018 00:55:02 +0000 (19:55 -0500)]
[iter] Add hb_sorted_iter_t<>

5 years ago[iter] Change operator[] operand to be signed
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>

5 years ago[array] Port to hb_iter_t<>
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...

5 years ago[iter] Change __more__ to fallback to __len__
Behdad Esfahbod [Fri, 21 Dec 2018 23:49:27 +0000 (18:49 -0500)]
[iter] Change __more__ to fallback to __len__

5 years ago[array/vector] Rename len to length
Behdad Esfahbod [Fri, 21 Dec 2018 23:46:51 +0000 (18:46 -0500)]
[array/vector] Rename len to length

5 years ago[iter] Split hb_iter_t<> into hb_iter_t<> and hb_iter_mixin_t<>
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<>

5 years agoAdjust internal header dependencies
Behdad Esfahbod [Fri, 21 Dec 2018 22:35:58 +0000 (17:35 -0500)]
Adjust internal header dependencies

5 years ago[Makefile.am] Minor
Behdad Esfahbod [Fri, 21 Dec 2018 22:29:11 +0000 (17:29 -0500)]
[Makefile.am] Minor

5 years ago[iter] Include from hb.hh
Behdad Esfahbod [Fri, 21 Dec 2018 22:22:09 +0000 (17:22 -0500)]
[iter] Include from hb.hh

5 years ago[iter] Move hb_fill() and hb_copy() to hb-iter.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

5 years ago[iter] Disallow copy-construction or assignment of hb_iter_t<>
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.

5 years ago[iter] Fix hb_copy() return value
Behdad Esfahbod [Fri, 21 Dec 2018 21:20:30 +0000 (16:20 -0500)]
[iter] Fix hb_copy() return value

5 years ago[iter] Add const_iter_t / const_iter()
Behdad Esfahbod [Fri, 21 Dec 2018 21:19:44 +0000 (16:19 -0500)]
[iter] Add const_iter_t / const_iter()

5 years ago[iter] Make hb_fill() take collection type, not 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.

5 years ago[array] Add more hb_array() / hb_sorted_array() variants
Behdad Esfahbod [Fri, 21 Dec 2018 21:02:16 +0000 (16:02 -0500)]
[array] Add more hb_array() / hb_sorted_array() variants

5 years ago[serialize] Use component_list by reference, as a supplier
Behdad Esfahbod [Fri, 21 Dec 2018 20:56:01 +0000 (15:56 -0500)]
[serialize] Use component_list by reference, as a supplier

5 years ago[iter] Add .random_access()
Behdad Esfahbod [Fri, 21 Dec 2018 20:53:09 +0000 (15:53 -0500)]
[iter] Add .random_access()

5 years ago[iter] Fix __end__()
Behdad Esfahbod [Fri, 21 Dec 2018 20:19:22 +0000 (15:19 -0500)]
[iter] Fix __end__()

5 years ago[array] Remove copy constructor
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

5 years agoFix bot
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]

5 years agoMinor
Behdad Esfahbod [Fri, 21 Dec 2018 20:05:00 +0000 (15:05 -0500)]
Minor

5 years ago[iter] Fix test again
Behdad Esfahbod [Fri, 21 Dec 2018 16:20:27 +0000 (11:20 -0500)]
[iter] Fix test again

5 years agoMinor
Behdad Esfahbod [Fri, 21 Dec 2018 16:15:16 +0000 (11:15 -0500)]
Minor

5 years ago[iter] More prototyping
Behdad Esfahbod [Fri, 21 Dec 2018 08:03:46 +0000 (03:03 -0500)]
[iter] More prototyping

5 years ago[iter] Make hb_fill() and hb_copy() take iterators
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...

5 years ago[iter] Add hb_fill()
Behdad Esfahbod [Fri, 21 Dec 2018 07:47:04 +0000 (02:47 -0500)]
[iter] Add hb_fill()

5 years ago[iter] Start prototyping hb_copy()
Behdad Esfahbod [Fri, 21 Dec 2018 07:12:55 +0000 (02:12 -0500)]
[iter] Start prototyping hb_copy()

5 years ago[iter] Showcase implicit casts
Behdad Esfahbod [Fri, 21 Dec 2018 06:59:37 +0000 (01:59 -0500)]
[iter] Showcase implicit casts

5 years agoRename
Behdad Esfahbod [Fri, 21 Dec 2018 06:57:40 +0000 (01:57 -0500)]
Rename

5 years ago[iter] Rename
Behdad Esfahbod [Fri, 21 Dec 2018 06:57:02 +0000 (01:57 -0500)]
[iter] Rename

5 years ago[iter] First sample use
Behdad Esfahbod [Fri, 21 Dec 2018 06:53:27 +0000 (01:53 -0500)]
[iter] First sample use

5 years ago[iter] Add bidirectionality
Behdad Esfahbod [Fri, 21 Dec 2018 06:17:35 +0000 (01:17 -0500)]
[iter] Add bidirectionality

5 years ago[iter] Sketch new iterator design
Behdad Esfahbod [Fri, 21 Dec 2018 05:54:55 +0000 (00:54 -0500)]
[iter] Sketch new iterator design

5 years ago[iter] Add empty test
Behdad Esfahbod [Fri, 21 Dec 2018 05:23:34 +0000 (00:23 -0500)]
[iter] Add empty test

5 years agoRevert "Remove unused hb-iter.hh"
Behdad Esfahbod [Fri, 21 Dec 2018 05:08:05 +0000 (00:08 -0500)]
Revert "Remove unused hb-iter.hh"

This reverts commit 969ff3c7aadbe721cdd414488eb170433f10d00c.

5 years ago[vector] Add operator bool
Behdad Esfahbod [Fri, 21 Dec 2018 04:15:49 +0000 (23:15 -0500)]
[vector] Add operator bool

5 years agoRename
Behdad Esfahbod [Fri, 21 Dec 2018 04:14:24 +0000 (23:14 -0500)]
Rename

5 years agoRemove unused typedef
Behdad Esfahbod [Fri, 21 Dec 2018 04:13:36 +0000 (23:13 -0500)]
Remove unused typedef

5 years ago2.3.0
Behdad Esfahbod [Fri, 21 Dec 2018 02:48:57 +0000 (21:48 -0500)]
2.3.0

5 years ago[serializer] Add operator <<
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.

5 years agoAdd hb_assign(obj, value)
Behdad Esfahbod [Thu, 20 Dec 2018 20:38:59 +0000 (15:38 -0500)]
Add hb_assign(obj, value)

5 years ago[serialize] Adjust ClassDef
Behdad Esfahbod [Thu, 20 Dec 2018 17:26:30 +0000 (12:26 -0500)]
[serialize] Adjust ClassDef

[skip ci]

5 years agoFix code on big-endian gcc / clang
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

5 years agoMinor [skip ci]
Behdad Esfahbod [Thu, 20 Dec 2018 03:28:16 +0000 (22:28 -0500)]
Minor [skip ci]

5 years ago[saitnize] Minor
Behdad Esfahbod [Thu, 20 Dec 2018 02:07:53 +0000 (21:07 -0500)]
[saitnize] Minor

5 years agoFix build on older Visual Studio versions (#1499)
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.

5 years ago[sanitize] Use hb_static_size instead of ::static_size
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

5 years ago[test] Fix test-name-table.cc leak issue
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

5 years ago[arrays] Add hb_ubytes_t for unsigned char
Behdad Esfahbod [Wed, 19 Dec 2018 03:11:23 +0000 (22:11 -0500)]
[arrays] Add hb_ubytes_t for unsigned char

5 years ago[arrays] Remove hb_supplier_t<>
Behdad Esfahbod [Tue, 18 Dec 2018 21:49:08 +0000 (16:49 -0500)]
[arrays] Remove hb_supplier_t<>

5 years ago[serialize] Propagate error from hb-face
Behdad Esfahbod [Tue, 18 Dec 2018 18:23:32 +0000 (13:23 -0500)]
[serialize] Propagate error from hb-face

5 years ago[serialize] Streamline error propagation
Behdad Esfahbod [Tue, 18 Dec 2018 18:22:17 +0000 (13:22 -0500)]
[serialize] Streamline error propagation

5 years agoRemove unused hb-iter.hh
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.

5 years ago[arrays] Minor tweaks to hb_supplier_t
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.

5 years ago[arrays] Rename Supplier to hb_supplier_t
Behdad Esfahbod [Tue, 18 Dec 2018 03:36:23 +0000 (22:36 -0500)]
[arrays] Rename Supplier to hb_supplier_t

5 years agoHide hb_addressof()
Behdad Esfahbod [Tue, 18 Dec 2018 02:55:33 +0000 (21:55 -0500)]
Hide hb_addressof()

5 years agoEnable __builtin_* on clang
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...

5 years agoAdd hb_addressof() and use it to fix bug after hb_bytes_t merge
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().

5 years agoEnable system extensions in hb.hh
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

5 years agoFix Solaris use after free (#1495)
prrace [Mon, 17 Dec 2018 22:59:37 +0000 (14:59 -0800)]
Fix Solaris use after free (#1495)

5 years agoRemove define GNU_SOURCE
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.

5 years agoFix more warnings
Behdad Esfahbod [Mon, 17 Dec 2018 22:19:42 +0000 (17:19 -0500)]
Fix more warnings

5 years agoFix Solaris Trailing comma in enum warnings (#1490)
prrace [Mon, 17 Dec 2018 22:18:47 +0000 (14:18 -0800)]
Fix Solaris Trailing comma in enum warnings (#1490)

5 years agoLower coretext_aat shaper priority (#1488)
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

5 years agoRemove redundant void from C++ sources (#1486)
Ebrahim Byagowi [Mon, 17 Dec 2018 18:01:01 +0000 (21:31 +0330)]
Remove redundant void from C++ sources (#1486)

5 years agoMinor, fix two more ArrayOf incorrect operator logic
Ebrahim Byagowi [Mon, 17 Dec 2018 16:37:04 +0000 (20:07 +0330)]
Minor, fix two more ArrayOf incorrect operator logic

5 years ago[arrays] Minor fix
Behdad Esfahbod [Mon, 17 Dec 2018 15:44:14 +0000 (10:44 -0500)]
[arrays] Minor fix

5 years ago[array] Add cast operator to add const to Type
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.

5 years ago[array] Remove problematic constructor
Behdad Esfahbod [Mon, 17 Dec 2018 05:38:13 +0000 (00:38 -0500)]
[array] Remove problematic constructor

5 years ago[array] Add arithmetic operators
Behdad Esfahbod [Mon, 17 Dec 2018 05:20:19 +0000 (00:20 -0500)]
[array] Add arithmetic operators

5 years ago[array] Return Crap instead of Null if Type is not const
Behdad Esfahbod [Mon, 17 Dec 2018 05:09:06 +0000 (00:09 -0500)]
[array] Return Crap instead of Null if Type is not const

Ouch!

5 years ago[array] Add operator *
Behdad Esfahbod [Mon, 17 Dec 2018 05:06:40 +0000 (00:06 -0500)]
[array] Add operator *

5 years ago[array] Add constructor from fixed-size array
Behdad Esfahbod [Mon, 17 Dec 2018 05:02:42 +0000 (00:02 -0500)]
[array] Add constructor from fixed-size array

5 years ago[array] Organize
Behdad Esfahbod [Mon, 17 Dec 2018 04:57:27 +0000 (23:57 -0500)]
[array] Organize

5 years ago[arrays] Reduce Supplier<> even further
Behdad Esfahbod [Mon, 17 Dec 2018 04:52:17 +0000 (23:52 -0500)]
[arrays] Reduce Supplier<> even further

5 years agoWhitespace
Behdad Esfahbod [Mon, 17 Dec 2018 04:47:56 +0000 (23:47 -0500)]
Whitespace

5 years ago[array] Add operator +=
Behdad Esfahbod [Mon, 17 Dec 2018 04:45:07 +0000 (23:45 -0500)]
[array] Add operator +=

5 years ago[array] Add constructor from hb_array_t<const Type>
Behdad Esfahbod [Mon, 17 Dec 2018 04:43:17 +0000 (23:43 -0500)]
[array] Add constructor from hb_array_t<const Type>

5 years ago[arrays] Move Supplier<> to hb-array.hh
Behdad Esfahbod [Mon, 17 Dec 2018 04:38:51 +0000 (23:38 -0500)]
[arrays] Move Supplier<> to hb-array.hh

5 years ago[arrays] Remove unnecessary constructor from Supplier<>
Behdad Esfahbod [Mon, 17 Dec 2018 04:33:03 +0000 (23:33 -0500)]
[arrays] Remove unnecessary constructor from Supplier<>

Looks like operator hb_array_t<> from vector works here. :)

5 years ago[arrays] Start moving Supplier<> to hb_array_t<>
Behdad Esfahbod [Mon, 17 Dec 2018 04:31:19 +0000 (23:31 -0500)]
[arrays] Start moving Supplier<> to hb_array_t<>

5 years ago[arrays] Remove unused stride from Supplier
Behdad Esfahbod [Mon, 17 Dec 2018 03:30:44 +0000 (22:30 -0500)]
[arrays] Remove unused stride from Supplier

5 years ago[arrays] Remove need of stride in Supplier<>
Behdad Esfahbod [Mon, 17 Dec 2018 03:29:40 +0000 (22:29 -0500)]
[arrays] Remove need of stride in Supplier<>