Commit Graph

7271 Commits

Author SHA1 Message Date
Behdad Esfahbod 42f4bd6b80 Minor warning fix again 2019-04-18 19:06:07 -04:00
Michiharu Ariza 267fb9c716 add spaces 2019-04-18 18:18:05 -04:00
Michiharu Ariza ba0386060d fix oss-fuzz issue 14345 2019-04-18 18:18:05 -04:00
Michiharu Ariza 63a2108480 silence MVC warnings 3rd attempt 2019-04-18 13:54:58 -07:00
Michiharu Ariza 705dde57fe silence MVC warnings 2nd attempt 2019-04-18 11:32:10 -07:00
Michiharu Ariza dd4c37529b silence MVC warnings 2019-04-18 10:38:57 -07:00
Behdad Esfahbod 518e6e07f2 Minor 2019-04-18 12:21:25 -04:00
Behdad Esfahbod 91d958acc0 [array] Simplify copy assignment/constructor
To fix bogus MSVC warnings:

  c:\projects\harfbuzz\src\hb-array.hh(189): warning C4521: 'hb_array_t<Type>': multiple copy constructors specified [C:\projects\harfbuzz\build\harfbuzz.vcxproj]
  c:\projects\harfbuzz\src\hb-array.hh(189): warning C4522: 'hb_array_t<Type>': multiple assignment operators specified [C:\projects\harfbuzz\build\harfbuzz.vcxproj]
2019-04-18 10:04:10 -04:00
Behdad Esfahbod 693d91cd49 [serialize] Fix offset calculation 2019-04-17 17:59:39 -04:00
Behdad Esfahbod db0c9a1485 [subset] Assert offsets are zero during relocation
If they're not, it's a bug in our subsetting logic somewhere.  So check.
2019-04-17 17:58:13 -04:00
Michiharu Ariza aa3ac59245 fix build 2019-04-17 12:43:53 -07:00
Michiharu Ariza c87488b46d Merge branch 'master' into var-subset 2019-04-17 12:07:15 -07:00
Behdad Esfahbod efbba7ad26 [serializer] Add copy()
Calls obj.copy() or obj.operator=() in that order.
2019-04-17 11:00:08 -04:00
Behdad Esfahbod c67a0d581f Add HB_RETURN 2019-04-17 10:29:10 -04:00
David Corbett 6745a600bf Comment out ot_languages where fallback suffices 2019-04-17 10:28:59 -04:00
David Corbett 5daeff3e68 Fix "hb_script_" doc typo 2019-04-17 10:06:13 -04:00
Behdad Esfahbod 6916b77863 One more auto return type 2019-04-16 18:33:51 -04:00
Behdad Esfahbod 5b33427f2c Rename HB_AUTO_RETURN_EXPR to HB_AUTO_RETURN 2019-04-16 18:28:17 -04:00
Behdad Esfahbod da293b0e59 Use HB_AUTO_RETURN_EXPR in hb_min/max 2019-04-16 18:27:25 -04:00
Behdad Esfahbod 0241a40f2a Use auto return type for hb_first/hb_second 2019-04-16 18:26:30 -04:00
Behdad Esfahbod fe30fcd228 Use hb_deref_pointer() to reduce number of overloads 2019-04-16 17:34:06 -04:00
Behdad Esfahbod c918a6706f Properly prioritize hb_hash() 2019-04-16 17:28:18 -04:00
Behdad Esfahbod 75fd845a4a Move around 2019-04-16 17:22:29 -04:00
Behdad Esfahbod 973717175d Fix priorities 2019-04-16 16:50:07 -04:00
Behdad Esfahbod 54ece299bc Use type aliasing for meta-functions, ie. those returning a type 2019-04-16 16:45:53 -04:00
Michiharu Ariza 6cde814a36 Merge branch 'master' into var-subset 2019-04-16 11:35:07 -07:00
Michiharu Ariza 007bb3e0d1 retain-gids in HVAR/VVAR (unused deltas retained) 2019-04-16 10:33:51 -07:00
David Corbett 1ce11b4437 Reduce LangTag from 3 language system tags to 1 2019-04-16 11:41:01 -04:00
Behdad Esfahbod 155e92f259 Reduce NullPool size 2019-04-16 11:35:09 -04:00
Behdad Esfahbod 4fc2d2d724 [meta] Flesh out hb_invoke() 2019-04-16 11:24:42 -04:00
Behdad Esfahbod e03d9395aa Comment 2019-04-16 11:20:16 -04:00
Behdad Esfahbod b8e763fd71 [meta] Add hb_invoke() 2019-04-16 10:54:24 -04:00
Behdad Esfahbod a3fcb9a370 [meta] Add HB_AUTO_RETURN_EXPR, HB_VOID_RETURN_EXPR, hb_priority, hb_has(), hb_get()
The first three based on range-v3.
2019-04-16 10:45:57 -04:00
Behdad Esfahbod ff68be31bf Add hb_void_tt<> ala std::void_t 2019-04-16 09:59:51 -04:00
Michiharu Ariza eb348fc5c0 optimize out regions & region index lists & short count 2019-04-15 16:24:22 -07:00
Behdad Esfahbod 89fea21697 Fix copyright 2019-04-15 17:36:09 -04:00
Behdad Esfahbod 07776b6096 More tweaks to previous commit
Delete assignment operator of OffsetTo<> instead of Offset<>.

In simple ArrayOf<>::sanitize() assert that Type has assignment operator.
Ideally we should SFINAE this and fallback to calling Type::sanitize()
if assignment operator is not available.  But we don't have a case of
that in the codebase.
2019-04-15 16:43:34 -04:00
Behdad Esfahbod 699de689e9 Delete default assignment operator Offset<> 2019-04-15 16:00:20 -04:00
Behdad Esfahbod 02d864aa26 Add HB_FUNCOBJ()
Fixes https://github.com/harfbuzz/harfbuzz/issues/1651
2019-04-15 15:39:30 -04:00
Behdad Esfahbod 38b1d0b9b2 Move static const to post-struct for a function object
Just sending this to bots to see if all happy, then turn it into macro and
apply everywhere.

Part of https://github.com/harfbuzz/harfbuzz/issues/1651
2019-04-15 12:45:21 -04:00
Behdad Esfahbod 19e800c9d8 Ugh. Another try, to unbreak gcc this time!
Jenga.
2019-04-15 12:07:00 -04:00
Behdad Esfahbod 3a88f55c15 Move location of HB_UNUSED to make MSVC happy 2019-04-15 11:59:57 -04:00
Behdad Esfahbod 1ae265888e Fix gcc warning 2019-04-15 11:31:40 -04:00
Behdad Esfahbod 47e538a35f Add HB_NO_SUBSET_LAYOUT
Part of https://github.com/harfbuzz/harfbuzz/issues/1652
2019-04-12 22:54:15 -04:00
Behdad Esfahbod a98e4068e7 Revert "Hide symbols in hb-iter"
This reverts commit 98f14c4cdb.

Same as previous commit.
2019-04-12 22:42:44 -04:00
Behdad Esfahbod dab92bdd46 Revert "Hide more symbols"
This reverts commit 2e86d50915.

I think the setup that caused me to do this is faulty and not hiding inlines.
2019-04-12 22:39:38 -04:00
Behdad Esfahbod 98f14c4cdb Hide symbols in hb-iter
Painful.  All template methods need to be explicitly hidden :(.

Maybe we should switch to -fvisibility=hidden pragma.

A LOT more to go.
2019-04-12 18:12:06 -04:00
Behdad Esfahbod 2e86d50915 Hide more symbols
Exposed by:

$ make -j5 CPPFLAGS="-O0" CXXFLAGS=-flto=thin LDFLAGS=-lc++ && ./check-symbols.sh
2019-04-12 18:07:42 -04:00
Behdad Esfahbod caa20e4ef9 Hide a few more symbols
Exposed by:

$ make CPPFLAGS=-O0
2019-04-12 18:00:58 -04:00
Behdad Esfahbod 95df00aec1 Hide a few static methods
Looks like static methods that do not get inlined end up exported.
We have a lot more.  Need to protect all at some point.  Wish there
was an easier way, like the visibility flag we pass that automatically
hides all inline methods.

Was exposed by check-symbols.sh when compiling on OS X 10.14 with:

$ make CPPFLAGS=-Oz CXXFLAGS=-flto=thin LDFLAGS=-lc++
2019-04-12 17:51:14 -04:00
Behdad Esfahbod 2f4be4ba54 Add HB_NO_OPTIONS
Part of https://github.com/harfbuzz/harfbuzz/issues/1652
2019-04-12 16:21:58 -04:00
Michiharu Ariza 3e524bf772 fix VarData serialize to remove unused data sets
add api test case for that
2019-04-12 12:48:48 -07:00
Behdad Esfahbod 079d2dcbb2 Add HB_NO_NAME_TABLE_AAT
Part of https://github.com/harfbuzz/harfbuzz/issues/1652
2019-04-12 15:00:37 -04:00
Behdad Esfahbod 60a58aa61c Add HB_NO_OT_FONT_BITMAP
Part of https://github.com/harfbuzz/harfbuzz/issues/1652
2019-04-12 14:58:53 -04:00
Behdad Esfahbod 160c4d8b2d Add HB_NO_OT_FONT_CFF
Part of https://github.com/harfbuzz/harfbuzz/issues/1652
2019-04-12 14:57:49 -04:00
Behdad Esfahbod 35f3b97fac Add HB_NO_OT_SHAPE_COMPLEX_HEBREW_FALLBACK
Part of https://github.com/harfbuzz/harfbuzz/issues/1652
2019-04-12 10:16:12 -04:00
Behdad Esfahbod 414c5de26b Add HB_NO_OT_SHAPE_FALLBACK
Part of https://github.com/harfbuzz/harfbuzz/issues/1652
2019-04-12 10:12:11 -04:00
Behdad Esfahbod fe0018f7ef Add HB_NO_OT_SHAPE_COMPLEX_THAI_FALLBACK
Part of https://github.com/harfbuzz/harfbuzz/issues/1652
2019-04-12 09:35:29 -04:00
Behdad Esfahbod 9ddbfa006d Add HB_NO_OT_LAYOUT_BLACKLIST
Part of https://github.com/harfbuzz/harfbuzz/issues/1652
2019-04-12 09:33:25 -04:00
Behdad Esfahbod 571fad4cf1 Add HB_NO_OT_SHAPE_COMPLEX_VOWEL_CONSTRAINTS
Part of https://github.com/harfbuzz/harfbuzz/issues/1652
2019-04-11 19:42:05 -04:00
Michiharu Ariza a90e4916df Merge branch 'master' into var-subset 2019-04-11 15:57:32 -07:00
Nathan Willis 3db227265b Update gtk-doc annotations for inout counts on various getter functions. 2019-04-12 00:00:47 +02:00
Nathan Willis c08ddbd91b [Docs] Minor edits to gtk-doc inline comment review. 2019-04-12 00:00:47 +02:00
Nathan Willis af5230bce3 [Docs] Minor; fix formatting for gtk-doc multiple-annotations. 2019-04-12 00:00:47 +02:00
Nathan Willis 6c0a1e8cd6 [Docs] Annotate gtk-doc formatting with some un-annotated (out)s. 2019-04-12 00:00:47 +02:00
Nathan Willis 5122805c74 [Docs] Fix gtk-doc formatting for (out) and (inout). 2019-04-12 00:00:47 +02:00
Nathan Willis d3178aa52a [Docs] Fix gtk-doc references to 'kern' table functions, clarifying that GPOS is not examined. 2019-04-12 00:00:47 +02:00
Nathan Willis 3449031fad [Docs] Add inline gtk-doc documentation of GDEF glyph classes. 2019-04-12 00:00:47 +02:00
Nathan Willis 930f6fc3da [Docs] Add inlind gtk-doc comments for hb-ot-layout functions. 2019-04-12 00:00:47 +02:00
Michiharu Ariza 945737026d tweak: moved xshift code out of get_points_var 2019-04-11 10:52:11 -07:00
Michiharu Ariza e814083202 undo hb_ot_ge_glyph_v_origin to fix test failures 2019-04-11 09:59:13 -07:00
Behdad Esfahbod b52c0e54b9 Use injected class name to simplify macros 2019-04-11 11:20:10 -04:00
Behdad Esfahbod baf1e79075 [C++11] Use deleted methods 2019-04-11 11:18:04 -04:00
Behdad Esfahbod 824fd342d5 Rename a few macros 2019-04-11 11:16:01 -04:00
Michiharu Ariza 9e79285ef3 Merge branch 'master' into var-subset 2019-04-10 17:24:29 -07:00
Michiharu Ariza 6d79a25bed Merge branch 'var-subset' of https://github.com/harfbuzz/harfbuzz into var-subset 2019-04-10 17:23:00 -07:00
Michiharu Ariza ab9d30965d Add tt var metrics test cases & bug fixes 2019-04-10 17:21:37 -07:00
Behdad Esfahbod edfc6be4a0 [arabic] Disable fallback shaping if HB_NO_OT_SHAPE_COMPLEX_ARABIC_FALLBACK defined
Part of https://github.com/harfbuzz/harfbuzz/issues/1652
2019-04-10 16:10:54 -04:00
Behdad Esfahbod 4d31662b5d Don't install ot-font funcs on new fonts if HB_NO_OT_FONT defined
Currently linker cannot GC hb-ot-font completely because we install
it on fonts by default.  Don't do that if HB_NO_OT_FONT defined.

Part of https://github.com/harfbuzz/harfbuzz/issues/1652
2019-04-10 15:40:55 -04:00
Behdad Esfahbod b111b3de02 Don't use any default unicode funcs if HB_NO_UNICODE_FUNCS is defined
Part of https://github.com/harfbuzz/harfbuzz/issues/1652
2019-04-10 15:39:48 -04:00
Behdad Esfahbod c5509be93a [coretext] Fix unused-variable error
Fixes https://github.com/harfbuzz/harfbuzz/issues/1659
2019-04-08 14:50:58 -04:00
Michiharu Ariza 196481ccb9 shift glyph horizontally at top level, not components 2019-04-05 16:37:12 -07:00
Michiharu Ariza 8a92ffd9bb fix failure to check glyf recursion 2019-04-05 15:04:23 -07:00
Maks Naumov 4c19aa2620 Fix MSVC C4068 warning (#1656) 2019-04-05 11:46:27 -07:00
Maks Naumov a96d003d6e Fix MSVC C4138 warning (#1657) 2019-04-05 02:29:56 -07:00
Behdad Esfahbod c68eb7002f Minor 2019-04-03 16:24:12 -07:00
Behdad Esfahbod 85adf4ad5c [GDEF] Don't assume glyphlist is sorted
As was hit by the fuzzer.

Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=14032
2019-04-03 16:07:36 -07:00
Behdad Esfahbod ecabdffc61 [algs] Add hb_min() and hb_max() 2019-04-03 16:06:34 -07:00
Behdad Esfahbod 7b863142ce [serialize] Make putting breakpoint on out-of-memory easier 2019-04-03 15:48:27 -07:00
Behdad Esfahbod 2bd2750234 [iter] Tweak SFINAE again
Don't think we need hb_is_same().
2019-04-03 15:31:53 -07:00
Behdad Esfahbod f02ebc89ec [array] Add compy assignment operator since copy constructor is explicit 2019-04-03 15:23:06 -07:00
Behdad Esfahbod 20a73da2c9 [array] Add default copy constructor
MSVC seems to need it.
2019-04-03 14:32:15 -07:00
Behdad Esfahbod d419a9a437 [iter] Use different SFINAE scheme to make MSVC happy
From Orvid King: TLDR; MSVC has some issues using sizeof(declval<T>()) for
SFINAE of templated types, so I just used SFINAE in a different context where
MSVC doesn't have the issue.
2019-04-03 14:18:19 -07:00
Behdad Esfahbod 2778df7972 [meta] Add hb_is_same() 2019-04-03 14:15:01 -07:00
Michiharu Ariza b999ce9bf0 Merge branch 'master' into var-subset 2019-04-03 10:34:09 -07:00
Michiharu Ariza c2d727a479 fix xshift by (lsb - xMin) 2019-04-03 10:33:55 -07:00
Behdad Esfahbod 6215fb8e68 [serialize] Actually reclaim storage from duplicate objects 2019-04-02 23:10:03 -07:00
Behdad Esfahbod 3305a2cad2 [serialize] Port to use object pool
Tested, but feels fragile :(.
2019-04-02 22:58:49 -07:00
Behdad Esfahbod 5efbc01174 [pool] Uses memset() instead of assigning Null()
Assignment is invalid on invalid object.
2019-04-02 22:41:06 -07:00
Behdad Esfahbod 434d78bf91 Add hb_pool_t<> for pooled memory allocation 2019-04-02 21:46:40 -07:00