platform/upstream/libHarfBuzzSharp.git
5 years agoRemoved unused subr subset code
Michiharu Ariza [Mon, 10 Sep 2018 23:27:49 +0000 (16:27 -0700)]
Removed unused subr subset code

5 years agosubset CFF1 String Index
Michiharu Ariza [Mon, 10 Sep 2018 23:00:20 +0000 (16:00 -0700)]
subset CFF1 String Index

Repurposed FDMap as Remap then subclassed for remapping SIDs
misc code cleanup

5 years agoMerge branch 'master' into cff-subset
Michiharu Ariza [Fri, 7 Sep 2018 17:50:55 +0000 (10:50 -0700)]
Merge branch 'master' into cff-subset

5 years agoTry fixing bots
Behdad Esfahbod [Fri, 7 Sep 2018 14:46:13 +0000 (10:46 -0400)]
Try fixing bots

5 years ago[subset] Fix div-by-zero
Behdad Esfahbod [Fri, 7 Sep 2018 14:24:22 +0000 (10:24 -0400)]
[subset] Fix div-by-zero

5 years agoMerge branch 'master' into cff-subset
Michiharu Ariza [Fri, 7 Sep 2018 05:27:44 +0000 (22:27 -0700)]
Merge branch 'master' into cff-subset

5 years agofix build attempt ^2
Michiharu Ariza [Fri, 7 Sep 2018 01:26:13 +0000 (18:26 -0700)]
fix build attempt ^2

Added hb-ot-cff1-table.cc to hb-subset sources
Deleted unused variable (charset)

5 years agofix build attempt
Michiharu Ariza [Fri, 7 Sep 2018 00:56:05 +0000 (17:56 -0700)]
fix build attempt

Added HB_INTERNAL to static funtion declarations

5 years agosubset CFF1 Encoding & Charset
Michiharu Ariza [Fri, 7 Sep 2018 00:28:15 +0000 (17:28 -0700)]
subset CFF1 Encoding & Charset

fixed misc Charset bugs
added source file hb-ot-cff1.table.cc
renamed things for clarity & consistency

5 years ago[subset] Fix hdmx subsetted size calculation.
Garret Rieger [Thu, 6 Sep 2018 01:04:52 +0000 (18:04 -0700)]
[subset] Fix hdmx subsetted size calculation.

5 years agoFix older compilers re '>>' at nested template declarations
Behdad Esfahbod [Thu, 6 Sep 2018 02:29:42 +0000 (19:29 -0700)]
Fix older compilers re '>>' at nested template declarations

5 years ago[subset] Hook up GSUB/GPOS, but still disabled
Behdad Esfahbod [Wed, 5 Sep 2018 23:24:28 +0000 (16:24 -0700)]
[subset] Hook up GSUB/GPOS, but still disabled

They are still in the drop list.

5 years ago[subset] Implement subsetting of SingleSubst
Behdad Esfahbod [Tue, 4 Sep 2018 03:50:11 +0000 (20:50 -0700)]
[subset] Implement subsetting of SingleSubst

5 years agofix build by untemplatizing DictOpSet & DictVal
Michiharu Ariza [Tue, 4 Sep 2018 18:29:15 +0000 (11:29 -0700)]
fix build by untemplatizing DictOpSet & DictVal

as they aren't instantiated with BlendArg (yet)

5 years agoDrop hints from CFF2 charstrings
Michiharu Ariza [Tue, 4 Sep 2018 17:25:21 +0000 (10:25 -0700)]
Drop hints from CFF2 charstrings

Templatized ArgStack so it may store the default value along with blend deltas as BlendArg while parsing blend operator arguments in CFF2 charstring
Added get_region_count() method to VarRegionList & VariationStore

5 years ago[subset] Keep glyph set in plan
Behdad Esfahbod [Tue, 4 Sep 2018 01:54:32 +0000 (18:54 -0700)]
[subset] Keep glyph set in plan

Should remove the vector version at some point...

5 years ago[subset] Towards subsetting SingleSubstFormat1
Behdad Esfahbod [Tue, 4 Sep 2018 01:23:23 +0000 (18:23 -0700)]
[subset] Towards subsetting SingleSubstFormat1

Why does subset plan not have a hb_set_t of glyphs?

5 years ago[subset] Wire up subset() call down to subtables
Behdad Esfahbod [Tue, 4 Sep 2018 00:33:34 +0000 (17:33 -0700)]
[subset] Wire up subset() call down to subtables

5 years agoTemplatize Lookup::sanitize()
Behdad Esfahbod [Tue, 4 Sep 2018 00:16:09 +0000 (17:16 -0700)]
Templatize Lookup::sanitize()

5 years ago[subset] More
Behdad Esfahbod [Mon, 3 Sep 2018 23:53:03 +0000 (16:53 -0700)]
[subset] More

5 years agoTemplatize GSUBGPOS::sanitize()
Behdad Esfahbod [Mon, 3 Sep 2018 23:41:28 +0000 (16:41 -0700)]
Templatize GSUBGPOS::sanitize()

5 years ago[subset] Fix serialize_subset() calls
Behdad Esfahbod [Mon, 3 Sep 2018 23:37:17 +0000 (16:37 -0700)]
[subset] Fix serialize_subset() calls

Ouch.

6 years agoAdd intersects() method to GSUB/GPOS lookups
Behdad Esfahbod [Mon, 3 Sep 2018 02:47:50 +0000 (19:47 -0700)]
Add intersects() method to GSUB/GPOS lookups

6 years ago[subset] Minor
Behdad Esfahbod [Mon, 3 Sep 2018 00:00:27 +0000 (17:00 -0700)]
[subset] Minor

Remove Lookup::subset().

6 years ago[subset] Towards GSUB/GPOS subsetting
Behdad Esfahbod [Sun, 2 Sep 2018 01:34:50 +0000 (18:34 -0700)]
[subset] Towards GSUB/GPOS subsetting

Add subset() call for GSUBGPOS struct and its dependencies.
Not hooked up anywhere.

6 years ago[serialize] Add reset()
Behdad Esfahbod [Sat, 1 Sep 2018 00:11:08 +0000 (17:11 -0700)]
[serialize] Add reset()

6 years ago[subset] De-templatize hb_subset_context_t
Behdad Esfahbod [Fri, 31 Aug 2018 23:46:35 +0000 (16:46 -0700)]
[subset] De-templatize hb_subset_context_t

We're going to (finally) use virtual methods for hb_serialize_context_t
customization, so don't need to carry a Serializer template variable
around...  Simplifies code.

6 years ago[serialize] Add a couple small methods
Behdad Esfahbod [Fri, 31 Aug 2018 23:38:04 +0000 (16:38 -0700)]
[serialize] Add a couple small methods

6 years ago[subset] Add hb_subset_context_t<>
Behdad Esfahbod [Fri, 31 Aug 2018 23:31:00 +0000 (16:31 -0700)]
[subset] Add hb_subset_context_t<>

6 years agotemplatized ArgStack as a prep to store blends
Michiharu Ariza [Fri, 31 Aug 2018 23:28:47 +0000 (16:28 -0700)]
templatized ArgStack as a prep to store blends

6 years agodrop hints from CFF1 charstrings
Michiharu Ariza [Fri, 31 Aug 2018 20:28:16 +0000 (13:28 -0700)]
drop hints from CFF1 charstrings

renamed confusing Stack.size to Stack.count

6 years ago[subset] Add hb-subset-input.hh and make hb-subset.hh toplevel include
Behdad Esfahbod [Fri, 31 Aug 2018 20:25:19 +0000 (13:25 -0700)]
[subset] Add hb-subset-input.hh and make hb-subset.hh toplevel include

6 years agoMinor
Behdad Esfahbod [Fri, 31 Aug 2018 20:00:57 +0000 (13:00 -0700)]
Minor

6 years agoAdded drop_hints to SubrFlattener
Michiharu Ariza [Fri, 31 Aug 2018 00:21:56 +0000 (17:21 -0700)]
Added drop_hints to SubrFlattener

6 years agoShuffle
Behdad Esfahbod [Thu, 30 Aug 2018 01:28:39 +0000 (18:28 -0700)]
Shuffle

6 years ago[subset] Clean up hb_subset_input_t API
Behdad Esfahbod [Thu, 30 Aug 2018 01:24:03 +0000 (18:24 -0700)]
[subset] Clean up hb_subset_input_t API

6 years agoCFF2 subroutine flattner
Michiharu Ariza [Thu, 30 Aug 2018 01:18:18 +0000 (18:18 -0700)]
CFF2 subroutine flattner

Factored out CFF1 & CFF2 common subsetting code in hb-subset-cff-common.hh

6 years ago[subset] Bail if subsetting a table failed
Behdad Esfahbod [Thu, 30 Aug 2018 01:13:07 +0000 (18:13 -0700)]
[subset] Bail if subsetting a table failed

6 years ago[subset] Remove unused hb_subset_profile_t
Behdad Esfahbod [Thu, 30 Aug 2018 01:09:55 +0000 (18:09 -0700)]
[subset] Remove unused hb_subset_profile_t

We might reintroduce it later, but for now remove, as it was unused.
Some things that should have been in this object (drop_hints, etc)
are already in hb_subset_input_t.  So, for now, keep everything there.

6 years ago[ot-font] Clean up cmap with gid=0
Behdad Esfahbod [Wed, 29 Aug 2018 23:38:04 +0000 (16:38 -0700)]
[ot-font] Clean up cmap with gid=0

Fixes https://github.com/harfbuzz/harfbuzz/issues/1145

6 years agoDelete pkg.m4
Ross Burton [Wed, 29 Aug 2018 21:37:39 +0000 (22:37 +0100)]
Delete pkg.m4

pkg.m4 is provided by pkg-config, which is a requirement to build, and this copy is ancient.  Delete it to avoid it being used instead of the host copy.

6 years agofix build attempt ^2
Michiharu Ariza [Wed, 29 Aug 2018 21:41:52 +0000 (14:41 -0700)]
fix build attempt ^2

6 years agocorrected preprocessor guards
Michiharu Ariza [Wed, 29 Aug 2018 20:36:39 +0000 (13:36 -0700)]
corrected preprocessor guards

6 years agoMerge branch 'master' into cff-subset
Michiharu Ariza [Wed, 29 Aug 2018 20:26:17 +0000 (13:26 -0700)]
Merge branch 'master' into cff-subset

Renamed cff "private" source/headers without the suffix

6 years agoattempt to fix build failure
Michiharu Ariza [Wed, 29 Aug 2018 19:56:48 +0000 (12:56 -0700)]
attempt to fix build failure

6 years agoSubroutine flattener for CFF1
Michiharu Ariza [Wed, 29 Aug 2018 19:14:30 +0000 (12:14 -0700)]
Subroutine flattener for CFF1

Subr-flattened charstrings are temporarily re-encoded in ByteStrBuff during "plan" phase, then copied to hb_serialize_context_t during "write" phase

CSOpSet may callback opcode processing "virtual" functions via CRTP

Numer struct may store a value as fixed optionally in addition to int and float

6 years agoDon't declare extern symbols as inline
Behdad Esfahbod [Wed, 29 Aug 2018 01:27:41 +0000 (18:27 -0700)]
Don't declare extern symbols as inline

clang -O3 was completely removing _get_gdef(), causing link
failure when needed from another compilation unit.  Surprisingly,
"extern inline" didn't fix it.

6 years agoAdd explicit to hb_auto_t 1param constructors
Behdad Esfahbod [Wed, 29 Aug 2018 01:18:02 +0000 (18:18 -0700)]
Add explicit to hb_auto_t 1param constructors

6 years agoFix distcheck
Behdad Esfahbod [Wed, 29 Aug 2018 00:22:38 +0000 (17:22 -0700)]
Fix distcheck

6 years agoExplicitly pass reference in hb_auto_t constructor
Behdad Esfahbod [Tue, 28 Aug 2018 18:02:00 +0000 (11:02 -0700)]
Explicitly pass reference in hb_auto_t constructor

Fixes clang bots as well as fuzzer issue.

6 years ago[ot-face] Remove tables_t. The face_data_t is what tables_t was
Behdad Esfahbod [Sun, 26 Aug 2018 22:18:46 +0000 (15:18 -0700)]
[ot-face] Remove tables_t. The face_data_t is what tables_t was

6 years agoFree up hb-ot-face.hh from includes
Behdad Esfahbod [Sun, 26 Aug 2018 22:11:24 +0000 (15:11 -0700)]
Free up hb-ot-face.hh from includes

There might be a better way to do this, but I couldn't find...

6 years ago[face] Use saved cmap in collect_unicodes() APIs
Behdad Esfahbod [Sun, 26 Aug 2018 16:33:01 +0000 (09:33 -0700)]
[face] Use saved cmap in collect_unicodes() APIs

6 years ago[OT] Move code around
Behdad Esfahbod [Sun, 26 Aug 2018 16:19:20 +0000 (09:19 -0700)]
[OT] Move code around

6 years ago[OT] Use relaxed ops for recursing into GSUB/GPOS lookups again
Behdad Esfahbod [Sun, 26 Aug 2018 16:12:25 +0000 (09:12 -0700)]
[OT] Use relaxed ops for recursing into GSUB/GPOS lookups again

6 years ago[GDEF] Move code around
Behdad Esfahbod [Sun, 26 Aug 2018 16:03:31 +0000 (09:03 -0700)]
[GDEF] Move code around

6 years agoAdd template keyword
Behdad Esfahbod [Sun, 26 Aug 2018 08:30:52 +0000 (01:30 -0700)]
Add template keyword

I swear I have no idea why this is needed, but it is...

6 years agoFixup
Behdad Esfahbod [Sun, 26 Aug 2018 08:29:30 +0000 (01:29 -0700)]
Fixup

6 years ago[ot-face] Port GDEF to unified table accelerator model as well
Behdad Esfahbod [Sun, 26 Aug 2018 08:25:54 +0000 (01:25 -0700)]
[ot-face] Port GDEF to unified table accelerator model as well

6 years ago[ot-face] Unify GSUB/GPOS accelerators in the table accelerator framework
Behdad Esfahbod [Sun, 26 Aug 2018 08:15:47 +0000 (01:15 -0700)]
[ot-face] Unify GSUB/GPOS accelerators in the table accelerator framework

6 years agoWIP
Behdad Esfahbod [Sun, 26 Aug 2018 07:47:55 +0000 (00:47 -0700)]
WIP

6 years ago[ot-face] Unify accelerators and tables
Behdad Esfahbod [Sun, 26 Aug 2018 07:21:29 +0000 (00:21 -0700)]
[ot-face] Unify accelerators and tables

6 years agoMinor
Behdad Esfahbod [Sun, 26 Aug 2018 07:07:12 +0000 (00:07 -0700)]
Minor

6 years ago[ot-font] Rename
Behdad Esfahbod [Sun, 26 Aug 2018 07:06:12 +0000 (00:06 -0700)]
[ot-font] Rename

6 years ago[ot-font] Cache tables on face, not font
Behdad Esfahbod [Sun, 26 Aug 2018 06:54:06 +0000 (23:54 -0700)]
[ot-font] Cache tables on face, not font

6 years ago[ot-font] Use init0
Behdad Esfahbod [Sun, 26 Aug 2018 06:27:45 +0000 (23:27 -0700)]
[ot-font] Use init0

6 years ago[ot-font] Make everything (cmap/metrics) lazy
Behdad Esfahbod [Sun, 26 Aug 2018 06:19:34 +0000 (23:19 -0700)]
[ot-font] Make everything (cmap/metrics) lazy

6 years ago[ot-font] Fallback vertical advance to UPEM
Behdad Esfahbod [Sun, 26 Aug 2018 06:15:52 +0000 (23:15 -0700)]
[ot-font] Fallback vertical advance to UPEM

Used to be ascent+descent.  Whatever. This is more convenient for
upcoming changes.

6 years agoAdd hb-ot-face.cc/hh
Behdad Esfahbod [Sun, 26 Aug 2018 06:06:37 +0000 (23:06 -0700)]
Add hb-ot-face.cc/hh

6 years ago[face] Introduce character-map API
Behdad Esfahbod [Sun, 26 Aug 2018 05:44:39 +0000 (22:44 -0700)]
[face] Introduce character-map API

New API:
+hb_face_collect_unicodes
+hb_face_collect_variation_selectors
+hb_face_collect_variation_unicodes

6 years agoMinor
Behdad Esfahbod [Sun, 26 Aug 2018 05:39:17 +0000 (22:39 -0700)]
Minor

6 years agoRename hb-*private.hh to hb-*.hh
Behdad Esfahbod [Sun, 26 Aug 2018 05:36:36 +0000 (22:36 -0700)]
Rename hb-*private.hh to hb-*.hh

Sorry for the noise, downstream custom builders.  Please adjust.

6 years ago[unicode] Add HB_UNICODE_MAX
Behdad Esfahbod [Sun, 26 Aug 2018 05:07:17 +0000 (22:07 -0700)]
[unicode] Add HB_UNICODE_MAX

New API:
HB_UNICODE_MAX

6 years ago[cmap] More hb_auto_t<>(...)
Behdad Esfahbod [Sun, 26 Aug 2018 05:04:39 +0000 (22:04 -0700)]
[cmap] More hb_auto_t<>(...)

6 years ago[cmap] Fix skipping gid0 in Format4 collect_unicodes()
Behdad Esfahbod [Sun, 26 Aug 2018 04:23:43 +0000 (21:23 -0700)]
[cmap] Fix skipping gid0 in Format4 collect_unicodes()

6 years agoUse new hb_auto_t<> constructor with Coverage::Iter
Behdad Esfahbod [Sun, 26 Aug 2018 04:15:39 +0000 (21:15 -0700)]
Use new hb_auto_t<> constructor with Coverage::Iter

6 years agoAdd 1-param passthrough constructor to hb_auto_t<>
Behdad Esfahbod [Sun, 26 Aug 2018 04:08:15 +0000 (21:08 -0700)]
Add 1-param passthrough constructor to hb_auto_t<>

And use.

6 years ago[cmap] Minor
Behdad Esfahbod [Sat, 25 Aug 2018 23:14:32 +0000 (16:14 -0700)]
[cmap] Minor

6 years ago[cmap Add hb_subset_collect_variation_unicodes()
Behdad Esfahbod [Sat, 25 Aug 2018 23:11:26 +0000 (16:11 -0700)]
[cmap Add hb_subset_collect_variation_unicodes()

To be moved to hb-face.h later.

6 years ago[cmap] Add hb_subset_collect_variation_selectors()
Behdad Esfahbod [Sat, 25 Aug 2018 22:56:07 +0000 (15:56 -0700)]
[cmap] Add hb_subset_collect_variation_selectors()

To be moved to hb-face later.

6 years ago[cmap] Remove unused code
Behdad Esfahbod [Sat, 25 Aug 2018 22:41:25 +0000 (15:41 -0700)]
[cmap] Remove unused code

6 years ago[cmap] Use bsearch to find subtables
Behdad Esfahbod [Sat, 25 Aug 2018 22:37:56 +0000 (15:37 -0700)]
[cmap] Use bsearch to find subtables

6 years ago[cmap] Factor out find_best_subtable
Behdad Esfahbod [Sat, 25 Aug 2018 22:33:05 +0000 (15:33 -0700)]
[cmap] Factor out find_best_subtable

6 years agoMinor
Behdad Esfahbod [Sat, 25 Aug 2018 22:25:03 +0000 (15:25 -0700)]
Minor

6 years ago[cmap] Implement collect_unicodes() for Format0/6/10
Behdad Esfahbod [Sat, 25 Aug 2018 16:35:45 +0000 (09:35 -0700)]
[cmap] Implement collect_unicodes() for Format0/6/10

6 years ago[cmap] Simplify collect_unicodes()
Behdad Esfahbod [Sat, 25 Aug 2018 16:33:30 +0000 (09:33 -0700)]
[cmap] Simplify collect_unicodes()

Don't use accelerator (almost).  Hooks up Format13 as well.

6 years agoRename get_all_codepoints() to collect_unicodes()
Behdad Esfahbod [Sat, 25 Aug 2018 15:47:06 +0000 (08:47 -0700)]
Rename get_all_codepoints() to collect_unicodes()

6 years ago[ot-font] Return char-not-found if mapped to gid 0
Behdad Esfahbod [Sat, 25 Aug 2018 15:44:18 +0000 (08:44 -0700)]
[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.

6 years agoAdd face-builder
Behdad Esfahbod [Sat, 25 Aug 2018 15:18:53 +0000 (08:18 -0700)]
Add face-builder

New API:
+hb_face_builder_create
+hb_face_builder_add_table

6 years ago[blob] Add as_bytes()
Behdad Esfahbod [Fri, 24 Aug 2018 17:29:45 +0000 (10:29 -0700)]
[blob] Add as_bytes()

6 years ago[sanitize] Document how sanitize machinery works
Behdad Esfahbod [Fri, 24 Aug 2018 17:24:45 +0000 (10:24 -0700)]
[sanitize] Document how sanitize machinery works

6 years ago[serialize] Add copy_bytes() and copy_blob()
Behdad Esfahbod [Fri, 24 Aug 2018 17:07:49 +0000 (10:07 -0700)]
[serialize] Add copy_bytes() and copy_blob()

6 years ago[ot] Rename hb_ot_layout_t to hb_ot_face_data_t
Behdad Esfahbod [Thu, 16 Aug 2018 03:12:25 +0000 (20:12 -0700)]
[ot] Rename hb_ot_layout_t to hb_ot_face_data_t

6 years agofixed "Fixed" number decoding
Michiharu Ariza [Wed, 22 Aug 2018 18:36:39 +0000 (11:36 -0700)]
fixed "Fixed" number decoding

6 years agofixed bugs with empty CFFIndex, fullset FDMap
Michiharu Ariza [Mon, 20 Aug 2018 21:04:46 +0000 (14:04 -0700)]
fixed bugs with empty CFFIndex, fullset FDMap

6 years agodrop hints from CFF & CFF2 Private
Michiharu Ariza [Fri, 17 Aug 2018 23:50:13 +0000 (16:50 -0700)]
drop hints from CFF & CFF2 Private

6 years agoAdded CFF2 Subr nullifier
Michiharu Ariza [Fri, 17 Aug 2018 20:13:18 +0000 (13:13 -0700)]
Added CFF2 Subr nullifier

along with CFF2 charstring interpreter
factored out common code between CFF1 & CFF2 to CSInterpreter
moved fetch_op from Interpreter to InterpEnv
misc code clean up & bug fixes

6 years agorenamed CFF::Index to CFF::CFFIndex
Michiharu Ariza [Thu, 16 Aug 2018 15:03:46 +0000 (08:03 -0700)]
renamed CFF::Index to CFF::CFFIndex

to avoid confusion with OT::Index

6 years agotreat h/vstem the same as h/vstemhm
Michiharu Ariza [Thu, 16 Aug 2018 07:59:46 +0000 (00:59 -0700)]
treat h/vstem the same as h/vstemhm

6 years agorenamed OT::cff to OT::cff1 for consistency
Michiharu Ariza [Thu, 16 Aug 2018 07:25:57 +0000 (00:25 -0700)]
renamed OT::cff to OT::cff1 for consistency

along with HB_OT_TAG_cff1