Commit Graph

103 Commits

Author SHA1 Message Date
Behdad Esfahbod 82b12bcadd [unicode] Add HB_UNICODE_MAX
New API:
HB_UNICODE_MAX
2018-08-25 22:07:17 -07:00
Behdad Esfahbod 28634db07e [cmap] Fix skipping gid0 in Format4 collect_unicodes() 2018-08-25 21:23:43 -07:00
Behdad Esfahbod ddea4d19cf Add 1-param passthrough constructor to hb_auto_t<>
And use.
2018-08-25 21:08:15 -07:00
Behdad Esfahbod c8cfb702e9 [cmap] Minor 2018-08-25 16:18:00 -07:00
Behdad Esfahbod 1dcf5fb038 [cmap Add hb_subset_collect_variation_unicodes()
To be moved to hb-face.h later.
2018-08-25 16:12:18 -07:00
Behdad Esfahbod 4806b3800d [cmap] Add hb_subset_collect_variation_selectors()
To be moved to hb-face later.
2018-08-25 15:58:40 -07:00
Behdad Esfahbod 3336de2479 [cmap] Remove unused code 2018-08-25 15:41:25 -07:00
Behdad Esfahbod 1becabe06c [cmap] Use bsearch to find subtables 2018-08-25 15:37:56 -07:00
Behdad Esfahbod 02fe03e09a [cmap] Factor out find_best_subtable 2018-08-25 15:33:05 -07:00
Behdad Esfahbod b41c43b4e1 Minor 2018-08-25 15:25:03 -07:00
Behdad Esfahbod 7d382fa276 [cmap] Implement collect_unicodes() for Format0/6/10 2018-08-25 09:42:52 -07:00
Behdad Esfahbod bd0e542525 [cmap] Simplify collect_unicodes()
Don't use accelerator (almost).  Hooks up Format13 as well.
2018-08-25 09:33:30 -07:00
Behdad Esfahbod d60c465627 Rename get_all_codepoints() to collect_unicodes() 2018-08-25 08:48:42 -07:00
Behdad Esfahbod 531051b8b9 [ot-font] Return char-not-found if mapped to gid 0
OpenType cmap table can use gid=0 to mean "not covered" to produce
more optimized cmap subtables.  Return false from get_nominal_glyph()
for those.  hb-ft already does this.
2018-08-25 08:44:18 -07:00
Garret Rieger 2bdd903c69 [subset] limit the max codepoint value to the unicode limit.
When collecting all codepoints in the cmap avoid using large amount of memory for fonts that declare coverage over all 32 bit integers.
2018-07-31 18:40:38 -07:00
Behdad Esfahbod e57a638bde One more 2018-07-23 12:00:02 -07:00
Behdad Esfahbod 36ed163fdd Remove unnecessary OT:: namespace specifiers 2018-07-23 11:57:45 -07:00
Behdad Esfahbod 9583e0077d Port more off of Sanitizer<> 2018-07-22 22:43:25 -07:00
Behdad Esfahbod bddeb2b10c Minor renamings of internal inline functions 2018-07-10 14:13:21 +02:00
Behdad Esfahbod f7515769fd [vector] Use Crap pool in push() as well 2018-06-01 17:48:37 -07:00
Garret Rieger 251cc977e9 [subset] Switch to using hb_map_t inside of hb_subset_plan_t. 2018-05-30 17:23:59 -06:00
Behdad Esfahbod e99d75ea9c Fix warning 2018-05-09 15:31:57 -07:00
Behdad Esfahbod 63f57f4dab Mark more unsized array's as arrayZ 2018-05-08 16:56:11 -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 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
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
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 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
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
Garret Rieger 5dadbb0fa0 [subset] Add implementation of cmap format 12 codepoint listing. (#988) 2018-04-17 15:00:23 +02:00
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 435b1878e7
Rename UINT24 to HBUINT24 for consistency (#983) 2018-04-15 21:18:48 +04:30
Ebrahim Byagowi f24b0b9728 Update the links and revive the dead ones 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
Garret Rieger 0fb8a5ce19 [subset] Fix memory leak in cmap subsetting. 2018-02-23 15:37:43 -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
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