Commit Graph

5052 Commits

Author SHA1 Message Date
Behdad Esfahbod a244434622 [map] Fix resize 2018-05-29 18:32:57 -07:00
Behdad Esfahbod efbab6ba3f Disable use of thread_local
Clang build was failing with:

/usr/bin/ld: .libs/libharfbuzz_la-hb-blob.o: relocation R_X86_64_PC32 against undefined hidden symbol `_ZTH12_hb_CrapPool' can not be used when making a shared object

Instead of fighting it, just disable use of it.
2018-05-29 18:21:55 -07:00
Behdad Esfahbod 8c2c5d4508 [map] Not going to implement is_equal which is complicated 2018-05-29 18:15:52 -07:00
Behdad Esfahbod ccd01c6555 [map] Move prime_mod to header to avoid linkage issues in subset.so 2018-05-29 18:13:13 -07:00
Behdad Esfahbod 6baebc5d55 [map] Fix copyright year 2018-05-29 17:58:46 -07:00
Behdad Esfahbod b0158129d2 [map] Minor 2018-05-29 17:52:37 -07:00
Behdad Esfahbod 4099c66f70 [map] Don't return INVALID from get() just because in_error 2018-05-29 17:52:07 -07:00
Behdad Esfahbod 2578390773 [map] Fix bool use in C API 2018-05-29 17:34:35 -07:00
Behdad Esfahbod a9fa39dca5 [map] More minor 2018-05-29 17:31:01 -07:00
Behdad Esfahbod f76c4a7708 [map] Make initial resize actually work 2018-05-29 17:27:25 -07:00
Behdad Esfahbod 661e9ae4a5 [map] Add clear(), is_empty(), and get_population() 2018-05-29 17:09:17 -07:00
Behdad Esfahbod b6959c33e2 [map] Minor 2018-05-29 17:02:22 -07:00
Behdad Esfahbod 686476a8ae [map] Track population and occupancy separately 2018-05-29 17:00:02 -07:00
Behdad Esfahbod 8a978790cb [map] Minor 2018-05-29 16:45:20 -07:00
Behdad Esfahbod 6f12ce47c0 Revert "[map] Return bool from set()"
This reverts commit face7cf55d.
2018-05-29 16:45:06 -07:00
Behdad Esfahbod fc51c45079 Revert "[map] Make hb_map_set() return bool"
This reverts commit 7bf1980146.
2018-05-29 16:44:55 -07:00
Behdad Esfahbod 7bf1980146 [map] Make hb_map_set() return bool 2018-05-29 16:42:55 -07:00
Behdad Esfahbod face7cf55d [map] Return bool from set() 2018-05-29 16:39:03 -07:00
Behdad Esfahbod e94be200bd [map] Implement operator[] for get()ting 2018-05-29 16:37:44 -07:00
Behdad Esfahbod 743fdd9c61 [map] First try at implementing an integer-to-integer hashmap
Fully untested.
2018-05-29 16:29:12 -07:00
Ebrahim Byagowi 65c82179c9
[blob] Use MAP_NORESERVE if available (#1039)
MAP_NORESERVE is not available on macOS for example so set the flag
to zero if not defined on the headers.
2018-05-26 23:50:10 +04:30
Behdad Esfahbod 1ce40d900a [set] Remove stale comment 2018-05-25 16:34:08 -07:00
Behdad Esfahbod 6c2227640b Add HB_DISALLOW_COPY_AND_ASSIGN 2018-05-25 16:21:27 -07:00
Behdad Esfahbod fd3d004231 Move pool definitions to hb-static.cc 2018-05-24 15:58:26 -07:00
Behdad Esfahbod 7f7b1370d3 Fix Uniscribe build
If a pointer type was passed to Null(), reinterpret_cast<> was
complaining about qualifiers being removed. Turns out I need the const on
the other side of "Type" to fix that.  Also remove unused const from
NullPool type.
2018-05-24 14:09:04 -07:00
Behdad Esfahbod 31c4236d96 Underflow protection in hb_vector_t 2018-05-24 13:53:02 -07:00
Behdad Esfahbod f83e992c8b Mark CrapPool thread_local
Not sure if I like to keep it. For now, aim for correctness.
2018-05-24 13:53:02 -07:00
Behdad Esfahbod 5d80129891 Add CrapPool
Common Regoin for Access Protection.  Like the NullPool, but writable.
2018-05-24 13:53:02 -07:00
Behdad Esfahbod 673b764de0 Move code around 2018-05-24 13:53:02 -07:00
Behdad Esfahbod 65aeabd622 Add hb_vector_t::push(const Type &v)
Makes for cleaner code.
2018-05-24 13:53:02 -07:00
Behdad Esfahbod 6c818c5516 Actually enable vectorized operations
Fixup for previous commit. Was accidentally turned off.
2018-05-22 22:00:05 -07:00
Behdad Esfahbod f56a250b04 Another try at smart vectorization
Make clang happy. Also, don't use anonymous union.
2018-05-22 21:36:07 -07:00
Behdad Esfahbod b995b501ef Try enabling vectorization smartly
We'll see if this sticks to the bots.
2018-05-22 21:06:22 -07:00
Behdad Esfahbod dd22c29f95 [set] Always check population before checking for equality 2018-05-22 20:57:19 -07:00
Ebrahim Byagowi 8eb53b853d
Minor, make CreateFile compatible with the disabled writable flag
"writable" is not in use and probably we can go in the reverse direction
and remove the flags that are useful for enabled writable, this is just
for the sake of completeness however.
2018-05-11 22:44:44 +04:30
Ebrahim Byagowi 33eb1bd23b
Remove unnecessary headers and definitions of hb-blob (#1028)
It removes io.h and other polyfills which we no longer need as 7e76d74
2018-05-11 14:36:41 +04:30
Ebrahim Byagowi 7e76d746e2
Make hb_blob_create_from_file more portable (#1027)
This makes it compatible with ARMCC which I had access in
a collaboration with @imgtec, thanks!

Basically hb_blob_create_from_file features three code paths,
mmap, Win32 and fallback.

We had fallback implementation even before this but it was relied
to "open" which is not available on some environments. This change
improved the situtation by using only fopen and friends for
fallback path.

Interestingly we could use "open" on Windows but in fact it was
emulated by MSVCRT so I've completely split that from Unix path
now that we have a distinct path for fallback path also.
2018-05-11 13:40:33 +04:30
Behdad Esfahbod e99d75ea9c Fix warning 2018-05-09 15:31:57 -07:00
Behdad Esfahbod 191c4edc54 Reinstante DEFINE_NULL_DATA
Seems like I messed up; buffer overrun got reported.
2018-05-09 15:31:57 -07:00
Ebrahim Byagowi 93bdf9b2df
Use arrayZ on hb-coretext and hb-uniscribe and fix macOS/Win bots (#1024)
Following to 63f57f4
2018-05-09 23:24:17 +04:30
Behdad Esfahbod 63f57f4dab Mark more unsized array's as arrayZ 2018-05-08 16:56:11 -07:00
Behdad Esfahbod 091c17df5a Use UnsizedArrayOf<> in one place where [VAR] was used
Trying to see how many can converted meaningfully.
2018-05-08 16:42:45 -07:00
Behdad Esfahbod 0644d92ef3
Merge pull request #1018 from googlefonts/cmap4
[subset] Add cmap format 4 subsetting.
2018-05-08 15:21:09 -07:00
Behdad Esfahbod 2a2e28e701 Don't keep instance in hb_table_lazy_loader_t 2018-05-08 03:00:21 -07:00
Behdad Esfahbod 57bac8f699 Rename 2018-05-08 02:55:20 -07:00
Behdad Esfahbod 2a46a020fd Minor 2018-05-08 02:53:03 -07:00
Behdad Esfahbod eba1c16a60 Always lock blob in sanitize. Remove blob->lock_as() in favor of blob->lock() 2018-05-08 02:47:42 -07:00
Behdad Esfahbod b4fa505014 Move Sanitizer::lock_instance<>() to blob->lock_as<>(). 2018-05-08 02:45:08 -07:00
Behdad Esfahbod abc12f7b81 Move null pool to hb-private 2018-05-08 02:23:36 -07:00
Behdad Esfahbod 08e280fd84 Rename hb_string_t to hb_bytes_t 2018-05-08 01:57:27 -07:00
Behdad Esfahbod bd021a6720 Minor 2018-05-08 01:50:30 -07:00
Behdad Esfahbod 16e4ccf7b4 Allocate user-data-array on the heap
This saves each object allocation 72 bytes.  Now object overhead is just
16 bytes (on x86) instead of 88 bytes. Neat.
2018-05-08 01:47:05 -07:00
Behdad Esfahbod 61920b21ca Oops
Fixes https://github.com/harfbuzz/harfbuzz/issues/1023
2018-05-08 01:28:49 -07:00
Behdad Esfahbod f673cfbd64 Support scripts that are written both LTR and RTL
Right now only Old Italic is marked as such.

Fixes https://github.com/harfbuzz/harfbuzz/issues/1000
2018-05-07 14:12:17 -07:00
Behdad Esfahbod 90869e6962 [ot] Apply langsys's required feature even if no other feature exists 2018-05-07 14:12:17 -07:00
Behdad Esfahbod 90baf72197 Move some blob functions to methods 2018-05-07 13:38:19 -07:00
Behdad Esfahbod 5c64d61475 Add hb-blob-private.hh
Towards making blob more memory-allocation-friendly
2018-05-07 13:38:19 -07:00
Behdad Esfahbod 203dc44ebc [ot-layout] Remove unused members
We should hang those off somewhere else. For now, the unused ones can go.
2018-05-07 13:38:19 -07:00
Garret Rieger 3be050f075 [subset] entrySelectorZ -> entrySelector. 2018-05-04 11:23:32 -07:00
Garret Rieger 7c22f98da7 [subset] add missing template parameter. 2018-05-04 11:20:03 -07:00
Garret Rieger 95eb0f3baf [subset] Switch to a non-log using implementation of caculating searchRangeZ, entrySelectorZ, and rangeShiftZ in cmap4. 2018-05-04 11:20:03 -07:00
Garret Rieger c817992f49 [subset] Write out a format 4, plat 0 encoding record to match fontTools. 2018-05-04 11:20:03 -07:00
Garret Rieger 9ef55a4c13 [subset] A few bug fixes for cmap format 4 subsetting. 2018-05-04 11:20:03 -07:00
Garret Rieger 81ea75f5c8 [subset] Complete implementation of cmap4 subsetting. 2018-05-04 11:20:03 -07:00
Garret Rieger 4195a52b04 [subset] WIP implementation of serialize for cmap format 4. 2018-05-04 11:20:03 -07:00
Garret Rieger cfa592d31c [subset] Add an implement for cmap format 4 create_sub_table_plan. 2018-05-04 11:20:03 -07:00
Garret Rieger 295d67ea7d [subset] WIP cmap format 4 subsetting. 2018-05-04 11:20:03 -07:00
Garret Rieger 0053d13283 [subset] Refactor cmap subsetting to make it possible to add support for more sub tables. 2018-05-04 11:20:03 -07:00
Garret Rieger 03b2754812 [subset] Add const to the hb_subset_plan_t input to a couple functions in hb-subset-plan. 2018-05-04 11:18:25 -07:00
Behdad Esfahbod 5b93f69169 Rename some X-terminated members to Z-terminated
X-terminated means don't access this, it's not located correctly.
Z-terminated means this is a C array with no bound checking.
2018-05-02 14:59:14 -04:00
Behdad Esfahbod f1f6bc0a6f [set] Fix init/fini of set on the stack to call object init/fini
Part of https://github.com/harfbuzz/harfbuzz/issues/1017
2018-05-02 12:56:45 -04:00
Behdad Esfahbod 37b95612d4 Remove hb_auto_array_t
Part of https://github.com/harfbuzz/harfbuzz/issues/1017
2018-05-01 19:09:00 -04:00
Behdad Esfahbod 5c3112aec8 s/hb_prealloced_array_t/hb_vector_t/g
Part of https://github.com/harfbuzz/harfbuzz/issues/1017
2018-05-01 19:07:04 -04:00
Behdad Esfahbod 4a01eb1234 Add hb_auto_t
Part of https://github.com/harfbuzz/harfbuzz/issues/1017
2018-05-01 19:05:58 -04:00
Behdad Esfahbod a60ba7964e s/finish/fini
For consistency.
2018-05-01 19:01:25 -04:00
Behdad Esfahbod 17618ee2ec Add hb_object_fini() 2018-05-01 18:39:25 -04:00
Behdad Esfahbod bd5f918e2f [set] Cache population
Part of https://github.com/harfbuzz/harfbuzz/issues/1017
2018-05-01 18:27:41 -04:00
Ebrahim Byagowi a57f5a1a18
[dwrite] Minor, enable the original code assertions 2018-04-28 13:58:55 +04:30
Ebrahim Byagowi 9925030f19 Don't decompose Bengali Rra and Rha
Fixes #779 and follow up to b01d9b3d90
2018-04-26 13:54:09 -07:00
Ebrahim Byagowi 5ad87a93fe
Minor, improve file reading failing condition comment
https://bugzilla.gnome.org/show_bug.cgi?id=659212 for more context
2018-04-25 16:44:04 +04:30
Ebrahim Byagowi 2eaba80cbd
Minor, re-add unused mark to some of ragel defined state machines (#1005) 2018-04-24 09:04:15 +04:30
Ebrahim Byagowi 48f0204cfe
Minor, re-add unused mark for two TRACE_ macros
To revive Travis CI bot
2018-04-24 08:11:13 +04:30
Ebrahim Byagowi 816b8169a9 Resolve some of clang's double-promotion warnings 2018-04-23 11:38:45 -07:00
Ebrahim Byagowi 24b8b9b227 Resolve clang's used-but-marked-unused warnings 2018-04-23 11:38:45 -07:00
Ebrahim Byagowi eaf649450a Resolve clang's conditional-uninitialize warnings 2018-04-23 11:38:45 -07:00
Ebrahim Byagowi 8b0d642e66 Resolve some of clang's zero-as-null-pointer-constant warnings 2018-04-23 11:38:45 -07:00
Ebrahim Byagowi 8100380d9e
Minor, fix calloc call order 2018-04-22 10:58:37 +04:30
Ebrahim Byagowi 2a4cdfad20
[aat/kerx] Minor (#1003) 2018-04-20 21:12:58 +04:30
Ebrahim Byagowi ce17340b23 Add hb_blob_create_from_file, a new API (#926) 2018-04-20 07:59:06 +02:00
Garret Rieger 4fa1c6705a [subset] Check instruction offsets in glyph to ensure they are in bounds. 2018-04-19 17:19:38 -06:00
Garret Rieger 5e318e09ba [subset] Fix broken cmap creation.
It was ignoring the restriction that gids must be consecutive to be placed into a single group.
2018-04-19 12:51:51 -06:00
Ebrahim Byagowi a47070cd40
Minor, annotate the added tables with likely/unlikely (#997) 2018-04-18 12:09:37 +04:30
Ebrahim Byagowi c55aa147c3
Do sanitization before the use on 'main' mini-program (#994) 2018-04-18 00:01:20 +04:30
Behdad Esfahbod 924803166e [colr] Check layer record access 2018-04-17 15:32:02 +02:00
Garret Rieger 5dadbb0fa0 [subset] Add implementation of cmap format 12 codepoint listing. (#988) 2018-04-17 15:00:23 +02:00
Ebrahim Byagowi 6771e79bcc
Add pre-opentype font pages detection code (#986)
As Khaled's finding on #981 this is the way Uniscribe detects those fonts. This is its detection part.
2018-04-17 09:36:52 +04:30
Ebrahim Byagowi 277e328986
Make some of implicit header uses explicit (#989)
Splitted from #950 and #986 IIRC Chromium had a policy about this encouraging it,
not sure about automated way to detect and add them but for now lets have the needed
ones of them.
2018-04-17 09:13:35 +04:30
Ebrahim Byagowi f5811bad04
Add round to F2DOT14 inner store setter (#990)
It uses floor implicitly without it but explicit use of round will be more correct.
2018-04-17 09:13:03 +04:30
Garret Rieger 39754fb659 [subset] Don't assume the last segment in cmap 4 can be skipped, actually check it. 2018-04-16 16:29:26 -06:00
Garret Rieger 21a181af2b [subset] sketch out support for a call that lists all codepoints present in a font. Implement support for it in format 4 cmap sub table. 2018-04-16 16:29:26 -06:00
Ebrahim Byagowi aef96e246c
Further improvements on dump-fon (#985) 2018-04-16 18:30:25 +04:30
Ebrahim Byagowi 67dfb1937b Add dump-fon, a prototype on how to work with .fon/.fnt files (#981) 2018-04-16 11:55:45 +02:00
Ebrahim Byagowi ce99dd04de
Implement to_float and set_float of F2DOT14 (#984) 2018-04-15 22:08:50 +04:30
Ebrahim Byagowi 435b1878e7
Rename UINT24 to HBUINT24 for consistency (#983) 2018-04-15 21:18:48 +04:30
Tor Andersson 8f4c12308a Reinstate support for Visual Studio 2005 2018-04-13 23:01:54 +04:30
Ebrahim Byagowi 632713babb
Always enable atexit on Android (#971)
Obviously one can use a newer NDK for building an updated HarfBuzz
instead that now pretty old version however I am concerned if that
version checking is working with clang that is used with the newer
NDK versions.
2018-04-12 14:17:03 +04:30
Ebrahim Byagowi f24b0b9728 Update the links and revive the dead ones 2018-04-12 13:44:32 +04:30
Ebrahim Byagowi a02c3ee70f Add or update tables specifications links 2018-04-12 13:44:32 +04:30
Ebrahim Byagowi b799fc8077
minor, use LOffsetTo and LArrayOf whenever possible (#966) 2018-04-11 18:36:09 +04:30
Ebrahim Byagowi cb3fa70cd4
[dwrite] Cosmetic change (#963) 2018-04-11 18:00:13 +04:30
Ebrahim Byagowi 09d5e54688
[graphite] Use tabs instead 8 spaces (#965) 2018-04-11 17:41:48 +04:30
Ebrahim Byagowi 211da5efdc
[aat] Cosmetic changes (#964) 2018-04-11 17:41:24 +04:30
Ebrahim Byagowi f8bb582bcc
[ot-color] Cosmetic changes (#962) 2018-04-11 17:13:20 +04:30
Ebrahim Byagowi 1e1e9086c0
minor 2018-04-10 03:26:01 +04:30
Ebrahim Byagowi a62554af89
[colr/cpal] Improvements and add a sample renderer (#927) 2018-04-10 00:53:50 +04:30
Ryan Schmidt 58e569e5f7 Fix build with CoreText on OS X 10.7 and earlier (#952) 2018-04-06 02:33:36 +04:30
Ebrahim Byagowi d3984b45b5
[aat] Further improvements on feat (#948) 2018-04-01 12:16:42 +04:30
Behdad Esfahbod 93dad9ade7 [hangul] Fix comment 2018-03-31 17:06:17 +02:00
Ebrahim Byagowi 44bf432092
[aat] Implement feat table parsing (#947) 2018-03-31 16:51:36 +04:30
Behdad Esfahbod 08b8eb678a Another try at fixing linker issue
Fixes https://github.com/harfbuzz/harfbuzz/issues/880
2018-03-31 12:16:57 +02:00
Ebrahim Byagowi 9d68f73d5c
[aat] Implement gcid table parsing (#944) 2018-03-30 21:57:10 +04:30
Ebrahim Byagowi 0e230a83ae
[aat] Implement bsln table parsing (#943) 2018-03-30 19:36:00 +04:30
Ebrahim Byagowi 70d36543aa Make atexit callbacks threadsafe (#930) 2018-03-29 17:30:28 -07:00
Ebrahim Byagowi d3a432a7b2 [graphite] Make get_table threadsafe (#931) 2018-03-29 17:28:47 -07:00
Ebrahim Byagowi 80395f14e8
Make gen-* scripts LC_ALL=C compatible (#942) 2018-03-29 22:00:41 +04:30
Ebrahim Byagowi 26e0cbd834
Actual py3 compatibility making on gen-* scripts (#941) 2018-03-29 21:22:47 +04:30
Ebrahim Byagowi cab2c2c08c
Make more gen-* scripts py3 compatible (#940) 2018-03-29 12:48:47 +04:30
Behdad Esfahbod 5aa2c6e194 [atexit] Make hb_languate_item_t *langs freeing threadsafe
Part of https://github.com/harfbuzz/harfbuzz/issues/923
2018-03-28 15:33:51 -07:00
Behdad Esfahbod 8c9451107d Fix one UBSan warning
Fixes https://github.com/harfbuzz/harfbuzz/issues/935
2018-03-28 14:06:58 -07:00
Behdad Esfahbod 48baf7e389 [uniscribe] Fixup for previous commit
Fixes https://github.com/harfbuzz/harfbuzz/issues/934
2018-03-28 13:38:51 -07:00
Behdad Esfahbod b17e1a4088 [uniscribe] Fix assertion fail in checksum calc
Program: Z:\Users\ebrahim\Desktop\harfbuzz\winbuild\util\.libs\hb-shape.exe
File: ../../src/hb-open-type-private.hh, Line 769

Expression: 0 == (Length & 3)

abnormal program termination
2018-03-28 10:45:26 -07:00
Ebrahim Byagowi a48dd6ef23
Make gen-use-table.py py3 compatible (#932) 2018-03-28 19:08:19 +04:30
Garret Rieger 1c3372786c [subset] fix infinite loop bug in looping through tables for subsetting. 2018-03-27 13:47:42 -06:00
Ebrahim Byagowi 8fd55422c3
Implement an internal emojis dumper tool (#909)
Later to be expanded to a more general tool but for now it only supports CBDT, SVG and CBDT.
2018-03-27 16:57:09 +04:30
Ebrahim Byagowi 430f82817d
[ci] Fix coverage build fail (#925) 2018-03-27 13:59:56 +04:30
Garret Rieger 07851aae9d [subset] Couple of fixes for fuzzer discovered issues. (#924)
* [subset] sanitize individual DeviceRecord's as part of hdmx sanitization.

* [subset] Fix out of bounds read with non-two byte align glyphs.

* [subset] Just use size_device_record >= DeviceRecord::min_size.

* [subset] Add TODO.

* [subset] Re-order checks in hdmx sanitize.
2018-03-26 19:56:56 -07:00
Behdad Esfahbod 6f46883f5b [hdmx] Minor 2018-03-26 19:55:22 -07:00
Behdad Esfahbod c589681926 Minor 2018-03-26 19:55:16 -07:00
Behdad Esfahbod 19ec366fb1 Fix previous commit
Automake has this stupid behavior where if your Makefile.am has
syntactic error, it can get to a state that make succeeds but just
ignores broken Makefile.am.  Ouch.
2018-03-26 15:09:54 -07:00
Behdad Esfahbod 44b6c77c64 Try fixing linking again
Before 1.7.5, we were setting -fno-exceptions etc on CXXFLAGS. In 1.7.6
we set it as CPPFLAGS. Try fixing. Also, I'm fairly sure it's safe to
set these unconditionally.

Fixes https://github.com/harfbuzz/harfbuzz/issues/880 (or so I hope)
2018-03-26 14:26:45 -07:00
Behdad Esfahbod e4d1cbfb4f Add HB_SUBSET_BUILTIN
Fixes https://github.com/harfbuzz/harfbuzz/issues/865
2018-03-26 14:09:29 -07:00
Behdad Esfahbod c14b24fcd0 Add HB_NO_ATEXIT 2018-03-26 10:44:54 -07:00
Ebrahim Byagowi aa53cb50ba
[aat] Unprefix not essentially layout tables (#921) 2018-03-26 13:28:26 +04:30
Behdad Esfahbod a289aaff47 [aat/ltag] Whitespace 2018-03-26 01:14:07 -07:00
Ebrahim Byagowi 158f2810b2
[aat/ltag] Implement the table parsing (#911) 2018-03-26 12:04:30 +04:30
Ebrahim Byagowi 9eee38a55c
[aat/fmtx] Implement the table parsing (#910) 2018-03-25 23:56:02 +04:30
Ebrahim Byagowi fe18c471a4 [dwrite] minor 2018-03-25 18:41:26 +04:30
Behdad Esfahbod ebccd01974 More ULL fixes
Fixes https://github.com/harfbuzz/harfbuzz/issues/901
2018-03-24 17:51:55 -07:00
Behdad Esfahbod 7ec3ba21f0 Define uint64_t constants with ULL suffix
Fixes https://github.com/harfbuzz/harfbuzz/issues/901
2018-03-24 14:12:12 -07:00
Chun-wei Fan 19256bef9d hb-private.hh: Add fallback implementation for round()
For pre-C99 compilers that do not support round(), we need to have a
simplistic implementation for it, when it is not detected during build
configuration, either via CMake or autotools, by using floor() and
ceil(), which are provided in the pre-C99 compilers.

Please see discussion at commit 86a0ac2 for more details for re-adding
this patch.
2018-03-23 15:52:33 -07:00
Ebrahim Byagowi 2a23606339
Fix llvm-gcc-4.2 compile issue and add a macOS bot to test it (#899) 2018-03-23 18:37:01 +04:30
Ebrahim Byagowi 7919033ce8
[dwrite] Replace rest of 'malloc/free's with 'new/delete' (#897) 2018-03-22 16:04:38 +04:30
Garret Rieger 3f55e0e746 [subset] Check for the Null table and not nullptr to detect failure to find a table in glyf accelerator. 2018-03-20 19:47:36 -06:00
Garret Rieger 45def99eae [subset] Fix to debug message. 2018-03-20 19:47:36 -06:00
Garret Rieger 1396614040 [subset] don't use pointers returned from push after array has resized in hb-subset-glyf.cc 2018-03-20 19:47:36 -06:00
Garret Rieger 3531efdb4c [subset] Fixed out of bounds read when subsetting hdmx. 2018-03-20 19:47:36 -06:00
Garret Rieger e597436b99 [subset] Disable glyf accelerator_t methods if it didn't successfully init. 2018-03-20 19:47:36 -06:00
Garret Rieger 7251181b56 [subset] Fix infinite loop in there are more then 32 tables. 2018-03-20 19:47:36 -06:00
Garret Rieger 1a94804d35 [subset] Add a fix for segfault in hmtx/vmtx subsetting code. 2018-03-20 19:47:36 -06:00
Ebrahim Byagowi 957e775663
[dwrite] Use new again and enable the build on msys2 bots (#890) 2018-03-19 12:19:42 +03:30
Ebrahim Byagowi 8d1b4082ae
Appropriate fix for msys2 bot fail on gen-def.py (#894) 2018-03-17 01:05:03 +03:30
Garret Rieger aa9612d35f [subset] Fix fuzzing build for hb-subset-fuzzer. 2018-03-16 09:04:01 -07:00
Garret Rieger 1beb08862e [subset] First pass at setting up a fuzzing program for hb-subset. 2018-03-16 09:04:01 -07:00
Behdad Esfahbod a0dccb6188 Add NameID 2018-03-15 07:47:02 -07:00
Behdad Esfahbod 56946d21c0 [color/COLR] Simplify 2018-03-15 07:47:02 -07:00
Behdad Esfahbod 6418ae4e8a [color/COLR] Clean up 2018-03-15 07:47:02 -07:00
Behdad Esfahbod 150c53ee96 [color/COLR] Fix bad sanitize
Bad bad bad bad code. Don't do that. If compiler's not happy, understand why.
2018-03-15 07:47:02 -07:00
Behdad Esfahbod 399c800b93 [color/COLR] Clean up 2018-03-15 07:47:02 -07:00
Behdad Esfahbod 9e337341d5 [color/cbdt] Clean up 2018-03-15 07:47:02 -07:00
Behdad Esfahbod 86a0ac284f Revert "hb-private.hh: Add fallback implementation for round()"
This reverts commit b9dcbb1f83.

This is gross. Should be only done if a specific macro is defined. Not the other way
around. This fails my build as autotools companions where not added anyway.
2018-03-15 07:47:02 -07:00
Ebrahim Byagowi d4907e83ef
[dwrite] GCC/mingw/msys2 compatibility (#884) 2018-03-14 11:04:28 +03:30
Ebrahim Byagowi 93f8f89ded
[ci] Trying to fix gen-def issue on appveyor (#885) 2018-03-14 09:56:31 +03:30
Chun-wei Fan b9dcbb1f83 hb-private.hh: Add fallback implementation for round()
Add a simplistic round() implementation for our purposes, used when the
compiler does not support round() directly.
2018-03-13 20:17:52 +08:00
Ebrahim Byagowi 28f25f32fc
[ot-color/SVG] Minor (#878) 2018-03-12 14:00:11 +03:30
Behdad Esfahbod fb0f3e3767 [sbix] Clean up 2018-03-11 20:38:40 +01:00
Ebrahim Byagowi 218fa7166e
[ot-color] SVG table implementation (#874) 2018-03-10 11:13:52 +03:30
Ebrahim Byagowi 4c63c82383
[ot-color] sbix table implementation (#870) 2018-03-10 11:07:56 +03:30
Ebrahim Byagowi 62b3d8fb70
[dev-run] minor 2018-03-10 00:44:36 +03:30
Garret Rieger 39b2f69fab [subset] Drop the same tables by default as fontTools does. 2018-03-08 16:30:36 -08:00
Garret Rieger 869ccac5ab [subset] use create_sub_blob instead of manually copying the post table. 2018-03-08 11:06:49 -08:00
Garret Rieger dd10769993 [subset] drop all glyph names from the post table. 2018-03-07 11:36:54 -08:00
Garret Rieger 91867cda6a [subset] cleanup. 2018-03-07 10:17:06 -08:00
Garret Rieger 0e8f9430c8 [subset] Skip subsetting vhea. 2018-03-07 10:03:52 -08:00
Garret Rieger 64cf53d619 [subset] Subset vmtx if present. 2018-03-07 10:03:52 -08:00
Behdad Esfahbod ff2f81432b 1.7.6 2018-03-07 16:05:14 +01:00
Behdad Esfahbod ac2ece3e15 [ot] Comment out AAT include 2018-03-07 15:52:42 +01:00
Behdad Esfahbod 23a9ac9938 Remove hb-ot-color.h
So I can make a release.
2018-03-07 15:51:42 +01:00
Behdad Esfahbod 790a117007 [ot] Remove hb-ot-base.h
BASE table API will go into hb-ot-layout.h.
2018-03-07 15:31:15 +01:00
Behdad Esfahbod f014a124f5 [set] Fix algebra
Was totally b0rked. Ouch!

Fixes https://github.com/harfbuzz/harfbuzz/issues/863
2018-03-07 10:49:26 +01:00
Behdad Esfahbod 7587683cdc [set] Minor
In preparation to fix https://github.com/harfbuzz/harfbuzz/issues/863

Binary operations are sets are completely broken. Ouch.
2018-03-07 09:57:11 +01:00
Behdad Esfahbod e4cbb87bd3 Minor 2018-03-07 09:37:22 +01:00
Behdad Esfahbod c6150333c2 Sign 2018-03-07 09:27:16 +01:00
Ebrahim Byagowi 9b4a5d7ef1
[ci] Enable -Werror=unused (#862) 2018-03-07 00:23:40 +03:30
Ebrahim Byagowi 54cbe6702c
[ot-color] Further improvements on COLR/CPAL implementation (#859)
* Implemented a bsearch on get_base_glyph_record
* Made get_color_record_argb actually work
2018-03-06 16:41:08 +03:30
Ebrahim Byagowi 18d14b8e0d
[dev-run] an option to open using a GUI app 2018-03-05 14:25:11 +03:30
Ebrahim Byagowi a3e29fd38f
[aat/kerx] Add a TODO 2018-03-04 02:56:27 +03:30
Ebrahim Byagowi 0ef6ab25ab
[ot-color] Move cbdt to the namespace (#860) 2018-03-04 02:47:26 +03:30
Ebrahim Byagowi f7399796a1
Enable coverage test on autotools (#857) 2018-03-03 22:55:09 +03:30
Ebrahim Byagowi c446c23f0f
[ot-color] Move the related tables to hb-ot-color-* (#858) 2018-03-03 22:43:23 +03:30
Ebrahim Byagowi 48ed15a2bc
[COLR/CPAL] Provide enough helper for rasterization (#855) 2018-03-03 22:00:29 +03:30
Ebrahim Byagowi 432758a7ac
[COLR] Revert previous sanitization on the table
That sanitization wasn't right, firstLayerIndex is an index from beginning of the Layer Records
not the table itself.
2018-03-03 01:05:59 +03:30
Ebrahim Byagowi 71b4598ea3
[aat/kerx] Improve format 6 subtable 2018-03-02 11:04:09 +03:30
Ebrahim Byagowi b73a5a1c24
[aat/kerx] Make parsing of the table actually work (#850) 2018-03-02 00:07:26 +03:30
Ebrahim Byagowi a570edcde2
[COLR] Sanitize BaseGlyphRecord (#854) 2018-03-02 00:06:03 +03:30
Ebrahim Byagowi 7e958646a4
[CPAL] Fix version checking logic on sanitizer (#851) 2018-03-01 10:27:18 +03:30
rsheeter 588a4e0f9b
Merge pull request #845 from googlefonts/drophints
[subset] drop hints from composites
2018-02-28 13:52:29 -08:00
Rod Sheeter b3f1a045a8 [subset] kick the build 2018-02-28 11:41:24 -08:00
Rod Sheeter 20d5739923 [subset] extract a method to flip off composite instruction flag 2018-02-28 11:15:08 -08:00
Ebrahim Byagowi f671f7f0a8 [colr] Implement 2018-02-28 13:19:40 +03:30
Ebrahim Byagowi 772274625e
Merge pull request #841 from ebraminio/color
Support CPAL table
2018-02-28 12:05:49 +03:30
Ebrahim Byagowi 5b9c234043 [CPAL] Refactor and address the reviews 2018-02-28 11:25:29 +03:30
Rod Sheeter 6836a82142 [subset] remove WE_HAVE_INSTRUCTIONS from composites when dropping hints 2018-02-27 20:51:12 -08:00
Rod Sheeter ffcb5cbf71 [subset] update the test file for composite, fix an offset calculation 2018-02-27 20:17:04 -08:00
Rod Sheeter c8b230e437 Merge branch 'expand-tests' of github.com:googlefonts/harfbuzz into drophints 2018-02-27 17:25:32 -08:00
Rod Sheeter b3790a65a1 [subset] add a (failing for now) test for composite glyf hint dropping 2018-02-27 17:23:30 -08:00
Garret Rieger 921b65cbc2 [subset] minor fixes in hb-ot-maxp-table.hh 2018-02-27 14:37:18 -08:00
Garret Rieger b26db48bff [subset] whitespace for hb-ot-maxp-table.hh 2018-02-27 14:14:05 -08:00
Garret Rieger a76344da79 [subset] Add maxpV1Tail instead of defining a struct inside maxp for v1 data. 2018-02-27 14:11:36 -08:00
Garret Rieger f14d1b64c2 [subset] when dropping hints, clear hint related fields in maxp. 2018-02-27 13:49:43 -08:00
Behdad Esfahbod d7633d0a40 [BASE] More 2018-02-27 12:50:57 -08:00
Behdad Esfahbod 7a70c20fec [BASE] Clean up first 29% 2018-02-27 12:46:16 -08:00
Ebrahim Byagowi 101850f9e6 Merge with master 2018-02-27 20:17:25 +03:30
Ebrahim Byagowi f110c0c886
Merge pull request #838 from harfbuzz/BASE
BASE table
2018-02-27 11:41:12 +03:30
Ebrahim Byagowi 0ad8c663e0 Remove public API of the branch 2018-02-27 11:02:33 +03:30
rsheeter 4a1d51ef15
Merge pull request #818 from googlefonts/drophints
[subset] Drop hints
2018-02-26 20:23:41 -08:00
Rod Sheeter 903771b6c7 [subset] clearer name for trim() and better comment about composite handling, per review feedback 2018-02-26 19:50:06 -08:00
Garret Rieger 44dc36dd82 [subset] update to comment in hb-ot-os2-unicode-ranges.hh 2018-02-26 17:56:23 -08:00
Garret Rieger ad3f2f77da [subset] small cleanups in hb-ot-os2-table. 2018-02-26 17:51:27 -08:00
Garret Rieger f1c8fc3487 [subset] small updates to gen-unicode-ranges.py 2018-02-26 17:48:51 -08:00
Garret Rieger 0c0fe2ff82 [subset] Move util/generated-unicode-ranges.py to src/gen-unicode-ranges.py 2018-02-26 17:47:10 -08:00
Garret Rieger f630ae5161 [subset] unsigned int -> hb_codepoint_t. 2018-02-26 17:46:17 -08:00
Garret Rieger 6368ce4c92 [subset] const in _compare_range. 2018-02-26 17:44:39 -08:00
Garret Rieger 0be9fea0a9 [subset] Add comment to os2UnicodeRangesSorted. 2018-02-26 16:15:09 -08:00
Garret Rieger e20ab71d12 [subset] Fix incorrect index. 2018-02-26 16:13:10 -08:00
Garret Rieger 074b5a29a1 [subset] Add special case handling of bit 57 in os2 ulUnicodeRange. 2018-02-26 16:11:24 -08:00
Garret Rieger f757757eda [subset] Add cmake build def for test-unicode-ranges. 2018-02-26 16:00:33 -08:00
Garret Rieger f82f2a3e50 [subset] Rename hb-os2-unicode-ranges.cc to test-unicode-ranges.cc. 2018-02-26 16:00:33 -08:00
Garret Rieger 4014555ca0 [subset] set ulUnicodeRange[] in os2. 2018-02-26 16:00:33 -08:00
Garret Rieger a570142d0c [subset] Move hb-ot-os2-unicode-ranges into a cc file with a helper methods and tests. 2018-02-26 16:00:33 -08:00
Garret Rieger 8e81799b32 [subset] Add hb-ot-os2-unicode-ranges.hh, a map of os2 unicode ranges. 2018-02-26 16:00:33 -08:00
Ebrahim Byagowi 6c844ae8e8
[dev-run] show images using iTerm2 images feature 2018-02-26 23:04:27 +03:30
Behdad Esfahbod 28c4245e9f [aat/ankr] Define Anchor struct 2018-02-26 01:10:42 -08:00
Behdad Esfahbod e347fb908b Minor 2018-02-26 01:08:50 -08:00
Behdad Esfahbod 05fbd14e71 [aat/ankr] Minor
DEFINE_SIZE_MIN is to be used only in rare cases. For fixed-size structs
we want DEFINE_SIZE_STATIC.
2018-02-26 01:04:16 -08:00
Behdad Esfahbod f90cd9b1f5 [aat/ankr] Hook up Lookup table 2018-02-26 01:03:23 -08:00
Behdad Esfahbod c36598450e [aat/ankr] Simplify 2018-02-26 00:57:07 -08:00
Behdad Esfahbod fa3a69e233 [aat/trak] Simplify sanitize() 2018-02-26 00:32:11 -08:00
Behdad Esfahbod f0bc6c0992 [aat/trak] Clean up
We always just used "unsigned int" for counter values. There's
no use for uint16_t outside of a struct.

Also, no need for explict casting where implicit does.
2018-02-26 00:18:17 -08:00
Ebrahim Byagowi bb82f01383 [aat] trak sanitization 2018-02-26 00:15:26 -08:00
Ebrahim Byagowi becb1d9eea
[aat] minor
Ops, this was done for testing
2018-02-26 11:29:48 +03:30
Behdad Esfahbod df1c7d5b60 Minor 2018-02-25 19:06:25 -08:00
Behdad Esfahbod 6dd46fa598 [aat/trak] Minor
Maybe we should make DEFINE_* make structs uncopyable.
2018-02-25 18:54:52 -08:00
Ebrahim Byagowi ae14dd0fb0 [aat] Implement ankr 2018-02-25 17:01:39 -08:00
Behdad Esfahbod 551fa2d200 [BASE] Minor 2018-02-25 16:32:17 -08:00
Behdad Esfahbod 05699fd996 Merge remote-tracking branch 'eroux/add-base' 2018-02-24 12:03:26 -08:00
Ebrahim Byagowi cd28eb9f5d
Add -Werror=unused-function check to Travis (#832) 2018-02-24 14:17:54 +03:30
Ebrahim Byagowi 1ab16f4556
[aat] Implement trak logic (#816) 2018-02-24 12:49:42 +03:30
Behdad Esfahbod b91e8da36e Include hb-version.h in git (#825) 2018-02-24 10:21:17 +03:30
Rod Sheeter 2e3ee489f8 [subset] format tweak, doc string 2018-02-23 18:18:54 -08:00
Rod Sheeter d78393b554 Merge branch 'master' of https://github.com/harfbuzz/harfbuzz into drophints 2018-02-23 17:53:26 -08:00
Rod Sheeter 1454d82a9d [subset] keep glyph trim separate of more general get_offset 2018-02-23 17:49:23 -08:00
Rod Sheeter 0ac8c0c1e6 [subset] zero glyf and loca memory before writing so pads are clean. Test just the part of maxp we care about 2018-02-23 17:43:00 -08:00
Behdad Esfahbod dc5c7927e7 [subset] Caclculate head table checksum adjustment
Test still fails, because we do not serialize tables in the same
order that fonttools subsetter does.
2018-02-23 16:59:53 -08:00
Garret Rieger 7e5e1feb66
Merge pull request #828 from googlefonts/mem-fixes
[subset] Fix several memory leaks in subsetting.
2018-02-23 17:59:08 -07:00
Behdad Esfahbod ec2538c880 [subset] Fix checksum calc out-of-bounds access 2018-02-23 15:51:26 -08:00
Garret Rieger 99967e21c6 [subset] Fix memory leak in hb-subset-glyf. 2018-02-23 15:45:45 -08:00
Garret Rieger e61f360dc8 [subset] Fix memory leak in hb-subset-plan. 2018-02-23 15:44:21 -08:00
Garret Rieger 66b0a39079 [subset] Fix memory leak in hb-subset. 2018-02-23 15:41:52 -08:00
Garret Rieger 0fb8a5ce19 [subset] Fix memory leak in cmap subsetting. 2018-02-23 15:37:43 -08:00
Garret Rieger 4665aaa193 [subset] Fix memory leak in hmtx subsetting. 2018-02-23 15:36:14 -08:00
Garret Rieger 5a36b55fba [subset] Fix memory leak in subset face destroy. 2018-02-23 15:30:14 -08:00
Ben Boeckel d38f37b2e3 autoconf: provide a harfbuzz-config for use from CMake (#822) 2018-02-24 01:25:53 +03:30
Behdad Esfahbod e0939d811f Clean up check-defs and check-symbols (#821)
Also, call c++filt on their results.

Also build and fix and check harfbuzz-gobject.def

Also changes harfbuzz-gobject to distribute generated enum sources.
2018-02-24 00:49:34 +03:30
Rod Sheeter 9bd6d25254 [subset] clone trim logic from fonttools glyf handling 2018-02-23 13:05:58 -08:00
Behdad Esfahbod c2e4713b5b [hdmx] Fix sanitize() 2018-02-23 10:45:03 -08:00
Behdad Esfahbod 84d4bb91ce [hdmx] Minor 2018-02-23 10:38:35 -08:00
Behdad Esfahbod cf7a6e520e [hdmx] Move DeviceRecord to toplevel again
More readable.
2018-02-23 10:34:26 -08:00
Garret Rieger 96d7805a92 [subset] More complete sanitization implementation for hdmx. 2018-02-22 16:48:28 -08:00
Garret Rieger c02532a3d2 [subset] Formatting and comments in hdmx. 2018-02-22 16:40:50 -08:00
Garret Rieger 6b372f439b [subset] In hb-ot-hdmx-table, s/glyf/hdmx. 2018-02-22 15:42:39 -08:00
Garret Rieger ec302ad5bd [subset] Fail subset if a table fails to sanitize. 2018-02-22 15:42:39 -08:00
Garret Rieger aa4aa2353c [subset] Enable hdmx subsetting. 2018-02-22 15:42:39 -08:00
Garret Rieger bd18b6adf8 [subset] Move DeviceRecord inside of hdmx. 2018-02-22 15:42:39 -08:00
Garret Rieger 6704cded65 [subset] Add hdmx subsetting implementation. 2018-02-22 15:42:39 -08:00
Garret Rieger 84b68e5886 [subset] In hdmx serialize set the correct value of sizeDeviceRecord. 2018-02-22 15:42:39 -08:00
Garret Rieger dddf44279f [subset] When serializing a DeviceRecord in hdmx pad to make 32 bit aligned. 2018-02-22 15:42:39 -08:00
Garret Rieger ab7a8f3b74 [subset] Begin implementing serialize for hdmx. 2018-02-22 15:42:39 -08:00
Garret Rieger fe42862ab3 [subset] Sketch out a basic hb-ot-hdmx.hh. 2018-02-22 15:42:39 -08:00
Ebrahim Byagowi a6bd6bcee0
[dev-run] minor 2018-02-22 16:52:56 +03:30
Ebrahim Byagowi fa13a04cf3
[dev-run] Add gdb/lldb shortcuts 2018-02-22 16:48:03 +03:30
Rod Sheeter 4f07437dfe [subset] sketch out dropping in-glyf instructions. Sometimes yields differnet size glyphs than fonttools, possibly due to padding not being corrected 2018-02-21 22:23:05 -08:00
Rod Sheeter 2d0265242b [subset] keep the result of _subset 2018-02-21 17:04:24 -08:00
Behdad Esfahbod 4fb97be78d Add two more ragel-generated headers
Fixes https://github.com/harfbuzz/harfbuzz/issues/817
2018-02-21 14:38:16 -08:00
Rod Sheeter 74e0c13a4a [subset] drop hint tables if so flagged. Still need to dump glyf instructions. 2018-02-21 11:19:18 -08:00
Rod Sheeter 0bd100e144 [subset] add --hinting flag 2018-02-21 10:34:00 -08:00
Rod Sheeter 7ecca8c0a8 [subset] keep the result of _subset 2018-02-21 09:42:46 -08:00
Behdad Esfahbod eada749e46 Use HB_SET_VALUE_INVALID consistently 2018-02-21 00:35:47 -08:00
Garret Rieger 2cc845f311 [subset] fix calculation of range shiftz. Should be 16 * len - searchRange not 16 * (len - searchRange). 2018-02-20 18:36:11 -08:00
Garret Rieger 8e614ade5a [subset] Reverse table order for font serialization to match what OTS expects. 2018-02-20 18:36:11 -08:00
Garret Rieger a998eeee4a [subset] sanity check glyph data writes during glyph subsetting to ensure they are inbounds. 2018-02-20 18:01:16 -08:00
Garret Rieger 0ab73e5942 [subset] Sanity check that loca writes are inbounds. 2018-02-20 18:01:16 -08:00
Garret Rieger 73e20ec6e9
Merge pull request #812 from googlefonts/cleanup
Clean up of glyf subsetting.
2018-02-20 17:34:59 -07:00
Behdad Esfahbod 6ae4013f2e [aat] Cosmetic touch-ups to trak table 2018-02-20 15:02:25 -08:00
Behdad Esfahbod abc82b493e Add Ragel-generated files to git
I know it's bad form; I know I've said no to this multiple times...
But this is part of an experiment to see if we can make rolling HarfBuzz
into Chrome much faster. That will give us a lot more testing exposure
that currently Chrome does.

Doing this while those files are still considered ignored by our
gitignore rules; will see how that flies.
2018-02-20 14:36:14 -08:00
Garret Rieger 69e443b254 [subset] Switch to hb_blob_copy_writable_or_fail in glyf subsetting. 2018-02-20 14:29:21 -08:00
Garret Rieger e3e0ac9823 [subset] Move glyf subsetting code into hb-ot-glyf-table.hh 2018-02-20 14:07:40 -08:00
Behdad Esfahbod d1f16fce96 Don't use %zu
Some of our bots / compilers don't like it. Wasn't caught by bots because this
is only in debug code.

825ad378e0
2018-02-20 10:32:09 -08:00
Ebrahim Byagowi c7e834a2fc
[dev-run] minor 2018-02-20 17:59:04 +03:30
Ebrahim Byagowi 975c35214f
[dev-run] Support autotools builds 2018-02-20 17:49:29 +03:30
Dominik Röttsches 25136d9b72 Use %zu format specifier for size_t to fix cross platform build
Fixes Chromium Android builds, compare
https://ci.chromium.org/buildbot/tryserver.chromium.android/linux_android_rel_ng/491787
2018-02-20 14:01:15 +02:00
Ebrahim Byagowi a64eacd8a6 [aat] First dig on 'trak' 2018-02-19 13:05:03 -08:00
Behdad Esfahbod 0bff6991de Ugh. Really fix build. 2018-02-19 11:51:25 -08:00
Behdad Esfahbod 4fcbd22b18 Fix build after previous commit 2018-02-19 11:49:25 -08:00
Behdad Esfahbod 0bbf90ded0 [subset] Don't include hb-subset.h from hb.h 2018-02-19 11:39:07 -08:00
Ebrahim Byagowi fde04777d1
Check availability of entr instead now that this works with it 2018-02-19 20:00:07 +03:30
Behdad Esfahbod e2d2d81984 Limit how much work sanitize() can do
Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=6022
2018-02-18 17:28:53 -08:00
Behdad Esfahbod 7033fe5877 [aat] Minor 2018-02-18 17:12:04 -08:00
Behdad Esfahbod 6fa690c75a Fix debug build
Context needs to be called 'c'. The TRACE_* rely on that.
2018-02-18 16:27:59 -08:00
Behdad Esfahbod 05d1e77db8 [aat] Silence warning 2018-02-18 16:26:04 -08:00
Behdad Esfahbod 1c50a88623 Readjust mark attachment heuristic a bit more
Previously adjusted logic could fail if nothing around was ligated,
and something moved.  This should take care of that.

CC https://github.com/harfbuzz/harfbuzz/issues/740
2018-02-18 15:58:09 -08:00
Ebrahim Byagowi 79756c9039
[aat] First dig on 'kerx' (#704) 2018-02-19 03:17:44 +03:30
Behdad Esfahbod 279c70a5b3
Merge pull request #796 from ebraminio/dev-run
Add a continuous builder using fswatch
2018-02-18 14:04:33 -08:00
Ebrahim Byagowi 89b82814b6 Add a continuous builder using fswatch 2018-02-18 23:56:00 +03:30
Behdad Esfahbod 97a7110215 Fix BitScanForward() usage
Should fix Win64 bot.
2018-02-18 10:50:24 -08:00
Behdad Esfahbod fe8f40a418
Merge branch 'master' into bitops 2018-02-18 10:45:33 -08:00
David Corbett 21646cc4a6 Do not mark the first glyph as unsafe to break
Fixes #791.
2018-02-17 13:35:34 -08:00
Behdad Esfahbod e5ab34fd3a Misc fixes
Should bring bag djgpp bot.
2018-02-16 18:29:29 -08:00
Garret Rieger 2130392dcc [subset] Add support for updating reference gids in components to their new values. 2018-02-16 18:29:29 -08:00
Garret Rieger 49544eb860 [subset] Refactor composite glyf iteration code into an Iterator outside of the accelerator. 2018-02-16 18:29:29 -08:00
Garret Rieger dc6d67df13 [subset] Use gids_to_retain_sorted to produce old gid -> new gid mapping since it now has the more complete set. 2018-02-16 18:29:29 -08:00
Garret Rieger dcac9fe964 [subset] Use complex glyph closure to populate gids_to_retain_sorted. 2018-02-16 18:29:29 -08:00
Garret Rieger 58a54c9d4f [subset] add constant to get_composite and in_table methods in hb-ot-glyf-table 2018-02-16 18:29:29 -08:00
Garret Rieger 73e1434814 [subset] Add a DFS search to produce a closure of composite glyphs. 2018-02-16 18:29:29 -08:00
Garret Rieger d368414143 [subset] add helper methods to glyf accelerator for reading composite glyph information. 2018-02-16 18:29:29 -08:00
Behdad Esfahbod cd11107bb4 Another bitops fallback fix
I'm confident that all bugs are hashed out now.
2018-02-16 18:28:58 -08:00
Behdad Esfahbod 4e517ecb6b Another bitops fallback impl fix 2018-02-16 18:20:12 -08:00
Behdad Esfahbod f18b9fbf65 [set] Implement iteration using bitop intrinsics 2018-02-16 18:14:41 -08:00
Behdad Esfahbod 6a91a2eb04 Fix wide bitops implemenetation 2018-02-16 17:49:41 -08:00
Behdad Esfahbod d25c3e69e9 [set] Readjust parameters 2018-02-16 17:45:09 -08:00
Behdad Esfahbod 6d5c0bf8b1 Fix bitops fallback impl 2018-02-16 17:33:26 -08:00
Behdad Esfahbod 82eb1dac16 Flesh out other bit ops some more for 128bit as well 2018-02-16 16:52:09 -08:00
Behdad Esfahbod 864a2dddae Clean up bit functions
Compile all code-paths possible, to better catch errors.
Also enable MSVC ones on mingw which seems to support them.
2018-02-16 16:09:38 -08:00
Behdad Esfahbod 978ace6fbb Improve _hb_popcount()
Support 128bit type.
2018-02-16 16:08:45 -08:00
Behdad Esfahbod 7b5ce74047 Fix warnings 2018-02-16 15:38:02 -08:00
rsheeter 926db87455
Merge pull request #792 from googlefonts/master
Support more tables in subsetter
2018-02-16 15:27:29 -08:00
Arkady Shapkin d37310ac5d Remove checking macros __OPTIMIZE__ for MSVC
Visual C++ compiler doesn't define macros __OPTIMIZE__  when optimizations enabled
2018-02-16 12:40:11 -08:00
Rod Sheeter be0a01a676 Merge branch 'master' of https://github.com/harfbuzz/harfbuzz 2018-02-16 06:01:41 -08:00
Ebrahim Byagowi 139c9928f6
Fix hb-private.hh compile issue 2018-02-16 13:27:26 +03:30
Arkady Shapkin 6c10328eb8 Use _BitScanForward and _BitScanReverse on MSVC 2018-02-15 14:31:25 -08:00
Rod Sheeter 7acaa3b781 [subset] apparently C99 is too much to ask in 2018 2018-02-15 14:28:29 -08:00
Rod Sheeter b1740106a9 [subset] fix format specifier for size_t 2018-02-15 13:55:21 -08:00
Rod Sheeter e00c37aaae [subset] fix no matching function MIN in djgpp 2018-02-15 12:53:52 -08:00
Rod Sheeter 0758cbc4c2 [subset] correct bug introduced to get_advance 2018-02-15 11:29:01 -08:00
Rod Sheeter 3fd11f4397 [subset] remove unused decl 2018-02-15 11:15:12 -08:00
Rod Sheeter 0e088a63d1 [subset] hmtx space bracket. authors++ 2018-02-14 21:11:45 -08:00
Rod Sheeter 1725c35da0 [subset] cmap space bracket 2018-02-14 19:36:33 -08:00
Rod Sheeter e158739bfb [subset] space bracket 2018-02-14 19:22:37 -08:00
Rod Sheeter 2d6b1e2af7 [subset] maxp copy writeable fn 2018-02-14 19:14:01 -08:00
Rod Sheeter 1efecd965f [subset] hmtx use copy writeable fn instead of direct memory 2018-02-14 19:05:41 -08:00
Behdad Esfahbod b1bd0b5f50 [subset] Minor 2018-02-14 18:50:19 -08:00
Behdad Esfahbod 5ae6526ef4 [subset] Merge remote-tracking branch 'googlefonts/master' 2018-02-14 18:42:32 -08:00
Garret Rieger 0775bc0f7a [subset] Fix hhea subsetting and clean up some memory leaks. 2018-02-14 16:37:35 -08:00
Garret Rieger b56c9384bc [subset] Add missing face reference in hb-subset-plan plus ensure all struct members are cleaned up on destroy. 2018-02-14 16:05:39 -08:00
Garret Rieger e330ef3711 [subset] Restore hb_face_data_destroy to be internal. 2018-02-14 15:57:18 -08:00
Garret Rieger 3ab7d2649b [subset] Fix memory leak in hb-ot-{maxp,os2}. Plus some formatting. 2018-02-14 15:48:57 -08:00
Behdad Esfahbod 2903b2f357 Another linker tweaking
Trying to fix this warning:
cc1: warning: command line option ‘-fno-threadsafe-statics’ is valid for C++/ObjC++ but not for C

Let's see what the clang bots think of it.
2018-02-14 15:46:27 -08:00
Behdad Esfahbod e1f1f96577 [set] Tune size again
Switch from a 128+64 hierarchy, to 32+32. New page size is 1024.
This should make set iteration faster, without affecting other op
performances much.
2018-02-14 15:44:48 -08:00
Rod Sheeter 66e282df32 [subset] remove TODO that was already done 2018-02-14 15:31:13 -08:00
Rod Sheeter 4696624ad9 [subset] maxp wrong int type, note to use copy_writable_or_fail 2018-02-14 15:30:49 -08:00
Rod Sheeter 3ed70e5e64 [subset] return bool not hb_bool_t from table::subset 2018-02-14 15:24:49 -08:00
Rod Sheeter 88d56e241b [subset] Use a supplier instead of memcpy and fix a few unnecessary {}s for cmap 2018-02-14 15:20:43 -08:00
Rod Sheeter 42a80f00d5 [subset] add free 2018-02-14 15:04:35 -08:00
Rod Sheeter d463e9f6b5 [subset] Give Behdad credit again 2018-02-14 15:04:15 -08:00
Rod Sheeter fa87770372 [subset] First pass at hmtx 2018-02-14 14:53:10 -08:00
Behdad Esfahbod ccae99fdad Another try 2018-02-14 11:12:09 -08:00
Behdad Esfahbod 8c3612af65 Tweak Makefile some more 2018-02-14 10:57:34 -08:00
Behdad Esfahbod d594f947b6 [subset] Allow linking to libstdc++
We want to use it.
2018-02-14 10:55:25 -08:00
Rod Sheeter a0fe3011ba copy all cmap groups at once 2018-02-14 10:52:41 -08:00
Garret Rieger d008b62887 Merge remote-tracking branch 'upstream/master' into fixed 2018-02-14 10:38:52 -08:00
Garret Rieger 89f17e3965 [subset] capitalize dsig. 2018-02-14 10:19:50 -08:00
Garret Rieger df6d780355 [subset] Extract maxp subsetting into hb-ot-maxp-table. 2018-02-14 10:19:50 -08:00
Garret Rieger 343dfe8965 [subset] white and add inline in hb-ot-cmap-table. 2018-02-14 10:19:50 -08:00
Garret Rieger 24904383df [subset] Correct usFirstCharIndex and usLastCharIndex in OS2 table when subsetting. 2018-02-14 10:19:50 -08:00
Ebrahim Byagowi 109314cb55
Another attempt on fixing the tests on Travis (#788) 2018-02-14 21:05:11 +03:30
Behdad Esfahbod 694eaf6367 [set] Add backwards iterator
New API:
- hb_set_previous()
- hb_set_previous_range()
2018-02-14 01:00:10 -08:00
Behdad Esfahbod fe3bc524bd [set] Allow starting iteration from a non-member of the set 2018-02-13 23:51:45 -08:00
Behdad Esfahbod a989f3edec Add hb_blob_copy_writable_or_fail()
New API:
- hb_blob_copy_writable_or_fail()
2018-02-13 22:12:36 -08:00
Behdad Esfahbod 9046e92442 [subset] Rename constructor to hb_subset_input_create_or_fail()
To signify that unlike rest of library, returns nullptr on failure.
2018-02-13 22:07:12 -08:00
Behdad Esfahbod 507804479a [use] Add dump-use-data 2018-02-13 21:46:28 -08:00
Behdad Esfahbod 15ba4fbe01 [khmer] Add dump-khmer-data 2018-02-13 21:41:51 -08:00
Behdad Esfahbod effddd03bd [myanmar] Add dump-myanmar-data 2018-02-13 21:38:15 -08:00
Behdad Esfahbod c0e45b60a0 [indic] Rename print-indic-table to dump-indic-data
Makes more sense given what this prints, err, dumps.
2018-02-13 21:25:16 -08:00
Behdad Esfahbod 9b878bd216 [indic] Explicitly number indic_position_t
So it's easier to cross-reference from output of print-indic-table.
2018-02-13 21:22:47 -08:00
Behdad Esfahbod 8634846a0a More tweaking linker and linker flags 2018-02-13 21:18:00 -08:00
Behdad Esfahbod d830d3d244 [indic] Share some copy/pasta code 2018-02-13 19:01:03 -08:00
Behdad Esfahbod 397ed53e55 [indic] Add print-indic-table 2018-02-13 18:54:26 -08:00
Behdad Esfahbod fd0bde6325 [subset] Fix loca offsets
Was writing source font's offsets. Ouch.
2018-02-13 16:35:30 -08:00
Behdad Esfahbod aeed082e28 Another tweak at libstdc++ things
To fix this warning:

cc1: warning: command line option ‘-fno-threadsafe-statics’ is valid for C++/ObjC++ but not for C
2018-02-13 14:02:59 -08:00
Behdad Esfahbod c7d7c9898e [aat] Minor 2018-02-13 14:00:14 -08:00
Behdad Esfahbod 2dbfeecf96 Minor 2018-02-13 13:59:39 -08:00