platform/upstream/libHarfBuzzSharp.git
5 years ago[docs] Hook up hb-map
Behdad Esfahbod [Sat, 27 Oct 2018 10:15:34 +0000 (03:15 -0700)]
[docs] Hook up hb-map

5 years ago[name] Make hb_name_id_t be the enum
Behdad Esfahbod [Sat, 27 Oct 2018 09:55:52 +0000 (02:55 -0700)]
[name] Make hb_name_id_t be the enum

This is like hb_script_t.

We had this exposed as unsigned int since 2.0.0 release in two APIs,
as well as hb_ot_layout_get_size_params() from earlier.
But since no one uses those (right?!), let's just fix this now.

5 years ago[name] Move HB_NAME_ID_INVALID into the enum
Behdad Esfahbod [Sat, 27 Oct 2018 09:49:32 +0000 (02:49 -0700)]
[name] Move HB_NAME_ID_INVALID into the enum

Don't know how to document anonymous enum members.

5 years ago[name] Move around
Behdad Esfahbod [Sat, 27 Oct 2018 09:45:57 +0000 (02:45 -0700)]
[name] Move around

5 years ago[name] Rename hb_ot_name_get_names() to hb_ot_name_list_names()
Behdad Esfahbod [Sat, 27 Oct 2018 09:39:20 +0000 (02:39 -0700)]
[name] Rename hb_ot_name_get_names() to hb_ot_name_list_names()

And swap return value positions, so can be annotated for gobject-introspectin.

5 years agoDocument new API
Behdad Esfahbod [Sat, 27 Oct 2018 09:35:06 +0000 (02:35 -0700)]
Document new API

5 years agoFix test-name-table on older bots
Ebrahim Byagowi [Sat, 27 Oct 2018 08:54:53 +0000 (12:24 +0330)]
Fix test-name-table on older bots

5 years ago[sbix] Set num_glyphs on accelerator
Ebrahim Byagowi [Sat, 27 Oct 2018 08:45:25 +0000 (12:15 +0330)]
[sbix] Set num_glyphs on accelerator

dump-emoji was broken without it

5 years agoComment
Behdad Esfahbod [Sat, 27 Oct 2018 07:39:31 +0000 (00:39 -0700)]
Comment

5 years agoRemove stale comment
Behdad Esfahbod [Sat, 27 Oct 2018 07:06:48 +0000 (00:06 -0700)]
Remove stale comment

Ugliness was fixed in 30eab97a0072fbc22d353082249e0e6e546cd86b
But yeah, my smell detector was working.  Ugliness was buggy.

5 years ago[docs] Hook up new symbols
Behdad Esfahbod [Sat, 27 Oct 2018 05:09:17 +0000 (22:09 -0700)]
[docs] Hook up new symbols

5 years ago[morx] Fix merge_cluster to end at last ligature component
Behdad Esfahbod [Sat, 27 Oct 2018 05:02:17 +0000 (22:02 -0700)]
[morx] Fix merge_cluster to end at last ligature component

Don't assume current position was a component in the ligature.

5 years ago[morx] Fix bailing out ligation at end-of-text
Behdad Esfahbod [Sat, 27 Oct 2018 04:59:20 +0000 (21:59 -0700)]
[morx] Fix bailing out ligation at end-of-text

Check was after a move_to, which wouldn't work.

Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=11147

5 years agoFix invalid memory read
Behdad Esfahbod [Sat, 27 Oct 2018 04:54:07 +0000 (21:54 -0700)]
Fix invalid memory read

Buffer might be relocated inside replace_glyphs().

Fixes https://bugs.chromium.org/p/chromium/issues/detail?id=895117

5 years ago[indic] Fix infinite loop
Behdad Esfahbod [Sat, 27 Oct 2018 04:21:18 +0000 (21:21 -0700)]
[indic] Fix infinite loop

Fixes https://bugs.chromium.org/p/chromium/issues/detail?id=863044

5 years agoFix bunch of unused parameter warnings
Behdad Esfahbod [Sat, 27 Oct 2018 04:01:11 +0000 (21:01 -0700)]
Fix bunch of unused parameter warnings

Show up with gcc -O0.

There's a few more but those are functions that need to be filled in.

Maybe this is a lost battle...

5 years ago[subset] Fix warning
Behdad Esfahbod [Sat, 27 Oct 2018 03:45:28 +0000 (20:45 -0700)]
[subset] Fix warning

5 years ago[fuzzing] Remove HB_NDEBUG
Behdad Esfahbod [Sat, 27 Oct 2018 03:31:14 +0000 (20:31 -0700)]
[fuzzing] Remove HB_NDEBUG

Not sure why it ever was added.

5 years ago[fuzzing] Add more test
Behdad Esfahbod [Fri, 26 Oct 2018 23:23:50 +0000 (16:23 -0700)]
[fuzzing] Add more test

5 years ago[name] Default to "en" if language is not specified
Behdad Esfahbod [Thu, 25 Oct 2018 20:43:25 +0000 (13:43 -0700)]
[name] Default to "en" if language is not specified

5 years ago[name] Add pre-defined nameIDs
Behdad Esfahbod [Wed, 24 Oct 2018 20:42:38 +0000 (13:42 -0700)]
[name] Add pre-defined nameIDs

5 years ago[name] Fill out most missing language codes
Behdad Esfahbod [Wed, 24 Oct 2018 20:20:19 +0000 (13:20 -0700)]
[name] Fill out most missing language codes

5 years ago[name] Skip enumerating names with unknown language
Behdad Esfahbod [Wed, 24 Oct 2018 19:40:15 +0000 (12:40 -0700)]
[name] Skip enumerating names with unknown language

5 years ago[utf] Remove unused typedef
Behdad Esfahbod [Wed, 24 Oct 2018 19:34:30 +0000 (12:34 -0700)]
[utf] Remove unused typedef

5 years ago[utf] Fix ASCII
Behdad Esfahbod [Wed, 24 Oct 2018 19:34:03 +0000 (12:34 -0700)]
[utf] Fix ASCII

5 years ago[name] Hook up ltag table
Behdad Esfahbod [Wed, 24 Oct 2018 06:33:44 +0000 (23:33 -0700)]
[name] Hook up ltag table

5 years ago[name] Do record sanitization at run-time
Behdad Esfahbod [Wed, 24 Oct 2018 06:16:06 +0000 (23:16 -0700)]
[name] Do record sanitization at run-time

5 years ago[name] Minor
Behdad Esfahbod [Wed, 24 Oct 2018 06:05:55 +0000 (23:05 -0700)]
[name] Minor

5 years ago[name] Add src/test-name-table tool to show all font names
Behdad Esfahbod [Wed, 24 Oct 2018 05:45:45 +0000 (22:45 -0700)]
[name] Add src/test-name-table tool to show all font names

5 years ago[name] Rebuild language list, include missing entries
Behdad Esfahbod [Wed, 24 Oct 2018 05:44:36 +0000 (22:44 -0700)]
[name] Rebuild language list, include missing entries

5 years ago[name] Fix cmp for invalid language
Behdad Esfahbod [Wed, 24 Oct 2018 05:19:09 +0000 (22:19 -0700)]
[name] Fix cmp for invalid language

5 years ago[name] Fix nul-termination bug
Behdad Esfahbod [Wed, 24 Oct 2018 05:16:32 +0000 (22:16 -0700)]
[name] Fix nul-termination bug

5 years ago[name] Add language mapping
Behdad Esfahbod [Wed, 24 Oct 2018 05:00:19 +0000 (22:00 -0700)]
[name] Add language mapping

5 years ago[name] Start adding language support
Behdad Esfahbod [Wed, 24 Oct 2018 04:19:56 +0000 (21:19 -0700)]
[name] Start adding language support

5 years ago[name] Remove unused cmp function
Behdad Esfahbod [Wed, 24 Oct 2018 04:12:58 +0000 (21:12 -0700)]
[name] Remove unused cmp function

5 years ago[name] Hook things up
Behdad Esfahbod [Wed, 24 Oct 2018 03:51:53 +0000 (20:51 -0700)]
[name] Hook things up

Accept Mac Latin name entries as ASCII as well.

5 years ago[name] More
Behdad Esfahbod [Wed, 24 Oct 2018 03:30:40 +0000 (20:30 -0700)]
[name] More

It assumes all names are encoded in UTF16-BE.  Other than that, and not
listing languages correctly, it's *supposed* to work.

5 years ago[name] Fix check
Behdad Esfahbod [Wed, 24 Oct 2018 03:15:53 +0000 (20:15 -0700)]
[name] Fix check

5 years ago[name] Flesh out UTF-X to UTF-X conversion routines
Behdad Esfahbod [Wed, 24 Oct 2018 03:04:05 +0000 (20:04 -0700)]
[name] Flesh out UTF-X to UTF-X conversion routines

5 years ago[name] Fix for rebase changes to hb_array_t
Behdad Esfahbod [Tue, 23 Oct 2018 10:16:03 +0000 (03:16 -0700)]
[name] Fix for rebase changes to hb_array_t

5 years ago[name] Some more
Behdad Esfahbod [Wed, 17 Oct 2018 12:42:23 +0000 (05:42 -0700)]
[name] Some more

5 years ago[name] Return full string length from API
Behdad Esfahbod [Wed, 17 Oct 2018 02:55:17 +0000 (19:55 -0700)]
[name] Return full string length from API

5 years ago[utf] Add UTF16-BE and UTF32-BE
Behdad Esfahbod [Wed, 17 Oct 2018 02:04:48 +0000 (19:04 -0700)]
[utf] Add UTF16-BE and UTF32-BE

5 years ago[name] Hide internal details from public API
Behdad Esfahbod [Tue, 16 Oct 2018 20:06:56 +0000 (13:06 -0700)]
[name] Hide internal details from public API

5 years ago[name] More
Behdad Esfahbod [Tue, 16 Oct 2018 06:34:54 +0000 (23:34 -0700)]
[name] More

5 years ago[name] Add hb_ot_name_get_utf()
Behdad Esfahbod [Tue, 16 Oct 2018 06:32:08 +0000 (23:32 -0700)]
[name] Add hb_ot_name_get_utf()

5 years ago[name] Pre-allocate array
Behdad Esfahbod [Tue, 16 Oct 2018 06:28:49 +0000 (23:28 -0700)]
[name] Pre-allocate array

5 years ago[name] Start implementing hb_ot_name_get_utf16()
Behdad Esfahbod [Tue, 16 Oct 2018 06:09:28 +0000 (23:09 -0700)]
[name] Start implementing hb_ot_name_get_utf16()

5 years ago[name] Implement hb_bytes_t get_name()
Behdad Esfahbod [Tue, 16 Oct 2018 06:00:27 +0000 (23:00 -0700)]
[name] Implement hb_bytes_t get_name()

5 years ago[name] Add hb-ot-name.cc for realz
Behdad Esfahbod [Tue, 16 Oct 2018 05:53:40 +0000 (22:53 -0700)]
[name] Add hb-ot-name.cc for realz

5 years ago[name] Implement hb_ot_name_get_names()
Behdad Esfahbod [Tue, 16 Oct 2018 05:48:48 +0000 (22:48 -0700)]
[name] Implement hb_ot_name_get_names()

5 years ago[name] Finish accelerator sorting
Behdad Esfahbod [Tue, 16 Oct 2018 05:42:04 +0000 (22:42 -0700)]
[name] Finish accelerator sorting

5 years ago[name] Start implementing public API infrastructure
Behdad Esfahbod [Tue, 16 Oct 2018 05:22:50 +0000 (22:22 -0700)]
[name] Start implementing public API infrastructure

5 years ago[name] Add public API declarations
Behdad Esfahbod [Tue, 16 Oct 2018 04:34:10 +0000 (21:34 -0700)]
[name] Add public API declarations

5 years ago[indic/khmer/myanmar/use] Clarify clear_syllable
Behdad Esfahbod [Fri, 26 Oct 2018 22:40:12 +0000 (15:40 -0700)]
[indic/khmer/myanmar/use] Clarify clear_syllable

No logic change.

5 years ago[fuzz] Add a new testcase
Ebrahim Byagowi [Fri, 26 Oct 2018 08:44:30 +0000 (12:14 +0330)]
[fuzz] Add a new testcase

5 years ago[layout] Try to speed up collect_lookups some more
Behdad Esfahbod [Fri, 26 Oct 2018 05:25:29 +0000 (22:25 -0700)]
[layout] Try to speed up collect_lookups some more

Barely made a dent :(.

5 years ago[layout] Memoize collect_features
Behdad Esfahbod [Fri, 26 Oct 2018 04:42:19 +0000 (21:42 -0700)]
[layout] Memoize collect_features

Fixes https://github.com/harfbuzz/harfbuzz/pull/1317
Fixes https://oss-fuzz.com/v2/testcase-detail/6543700493598720

5 years ago[layout] Remove unintentionally added code
Behdad Esfahbod [Fri, 26 Oct 2018 04:33:12 +0000 (21:33 -0700)]
[layout] Remove unintentionally added code

5 years ago[layout] Add hb_collect_features_context_t
Behdad Esfahbod [Fri, 26 Oct 2018 04:26:08 +0000 (21:26 -0700)]
[layout] Add hb_collect_features_context_t

Towards https://github.com/harfbuzz/harfbuzz/pull/1317

5 years ago[lookup] Fold another function inline
Behdad Esfahbod [Fri, 26 Oct 2018 04:17:30 +0000 (21:17 -0700)]
[lookup] Fold another function inline

5 years ago[layout] More prep work to memoize collect_features() work
Behdad Esfahbod [Fri, 26 Oct 2018 03:58:34 +0000 (20:58 -0700)]
[layout] More prep work to memoize collect_features() work

5 years ago[lookup] More prep work for memoizing collect_features
Behdad Esfahbod [Fri, 26 Oct 2018 03:48:20 +0000 (20:48 -0700)]
[lookup] More prep work for memoizing collect_features

https://github.com/harfbuzz/harfbuzz/pull/1317

5 years ago[layout] Minor
Behdad Esfahbod [Fri, 26 Oct 2018 03:34:29 +0000 (20:34 -0700)]
[layout] Minor

We were returning the accelerator's lookup count.  Returns table's.
They are the same except for OOM cases.  Just shorter code.

5 years ago[layout] Fold one function inline
Behdad Esfahbod [Fri, 26 Oct 2018 03:32:05 +0000 (20:32 -0700)]
[layout] Fold one function inline

Preparation for fixing https://github.com/harfbuzz/harfbuzz/pull/1317

5 years ago[morx] Use deleted-glyph, instead of actual deletion, in Ligation
Behdad Esfahbod [Fri, 26 Oct 2018 00:41:26 +0000 (17:41 -0700)]
[morx] Use deleted-glyph, instead of actual deletion, in Ligation

Closer to what CoreText does.

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

5 years ago[morx] Remove deleted-glyph at the end of processing
Behdad Esfahbod [Fri, 26 Oct 2018 00:36:33 +0000 (17:36 -0700)]
[morx] Remove deleted-glyph at the end of processing

5 years ago[aat] Minor
Behdad Esfahbod [Fri, 26 Oct 2018 00:33:48 +0000 (17:33 -0700)]
[aat] Minor

5 years ago[aat] Start adding support for DELETED-GLYPH
Behdad Esfahbod [Fri, 26 Oct 2018 00:29:32 +0000 (17:29 -0700)]
[aat] Start adding support for DELETED-GLYPH

https://github.com/harfbuzz/harfbuzz/issues/1302

5 years ago[vector] Make it act more like pointer
Behdad Esfahbod [Thu, 25 Oct 2018 23:50:38 +0000 (16:50 -0700)]
[vector] Make it act more like pointer

Add pointer cast operator and plus operator.

5 years ago[set] Minor
Behdad Esfahbod [Thu, 25 Oct 2018 23:37:53 +0000 (16:37 -0700)]
[set] Minor

5 years ago[set] Make array access more explicit
Behdad Esfahbod [Thu, 25 Oct 2018 23:35:36 +0000 (16:35 -0700)]
[set] Make array access more explicit

Follow up on 94e421abbfc7ede9aaf3c8d86bb0ff9992ea3123

5 years agoFix again
Behdad Esfahbod [Thu, 25 Oct 2018 21:30:24 +0000 (14:30 -0700)]
Fix again

5 years ago[docs] Add hb-ot-color section
Ebrahim Byagowi [Thu, 25 Oct 2018 20:53:45 +0000 (00:23 +0330)]
[docs] Add hb-ot-color section

5 years agoFixup
Behdad Esfahbod [Thu, 25 Oct 2018 20:37:08 +0000 (13:37 -0700)]
Fixup

5 years ago[test] Rename some fonts
Behdad Esfahbod [Thu, 25 Oct 2018 20:23:33 +0000 (13:23 -0700)]
[test] Rename some fonts

If we have duplicae font files in different directories, that would
break the oss-fuzz build currently.  So, rename some to avoid
name class with text-rendering-test.  Would be better to find
another solution.

5 years agoFix possible overflow in bsearch impls
Behdad Esfahbod [Thu, 25 Oct 2018 20:19:34 +0000 (13:19 -0700)]
Fix possible overflow in bsearch impls

From bungeman.

Fixes https://github.com/harfbuzz/harfbuzz/pull/1314

5 years agoRemove some use of Crap in hb-set.
Ben Wagner [Thu, 25 Oct 2018 17:44:27 +0000 (13:44 -0400)]
Remove some use of Crap in hb-set.

When hb_set_t::page_for_insert needs to insert at the end of the page_map
it ends up evaluating '&page_map[i + 1]' which has hb_vector return an
lvalue of a Crap so that nothing can be moved to its address. This turns
into issues with ThreadSanitizer on Crap when two threads modify different
hb_set_t instances. This can be avoided by using '&page_map[i] + 1'
instead.

5 years agoSet up CI with Azure Pipelines
azure-pipelines[bot] [Thu, 25 Oct 2018 15:22:54 +0000 (15:22 +0000)]
Set up CI with Azure Pipelines

5 years ago[appveyor] Drop Cygwin builds again
Khaled Hosny [Wed, 24 Oct 2018 23:55:10 +0000 (01:55 +0200)]
[appveyor] Drop Cygwin builds again

They are so slow and we had only a couple of Cygwin build failure
reported in ~5 years.

5 years ago[appveyor] Limit make to three jobs
Khaled Hosny [Wed, 24 Oct 2018 20:58:22 +0000 (22:58 +0200)]
[appveyor] Limit make to three jobs

https://github.com/harfbuzz/harfbuzz/pull/1309#issuecomment-432778270

5 years ago[vowel-constraints] Reset continuation on all dottedcircles
Behdad Esfahbod [Wed, 24 Oct 2018 23:46:07 +0000 (16:46 -0700)]
[vowel-constraints] Reset continuation on all dottedcircles

One of the was missed before.  Not intentional.

5 years ago[appveyor] Build on Cygwin and msys2 in parallel
Khaled Hosny [Wed, 24 Oct 2018 09:37:09 +0000 (11:37 +0200)]
[appveyor] Build on Cygwin and msys2 in parallel

5 years ago[appveyor] Do not update msys2
Khaled Hosny [Wed, 24 Oct 2018 09:23:21 +0000 (11:23 +0200)]
[appveyor] Do not update msys2

Looks like AppVeyor has new enough packages for our needs. Cuts CI build
time by 5 minutes.

5 years ago[appveyor] Organize config file a bit
Khaled Hosny [Wed, 24 Oct 2018 07:49:08 +0000 (09:49 +0200)]
[appveyor] Organize config file a bit

5 years ago[appveyor] Don’t build branches with open PR twice
Khaled Hosny [Wed, 24 Oct 2018 07:43:10 +0000 (09:43 +0200)]
[appveyor] Don’t build branches with open PR twice

5 years ago[ot-font] Fix sign of ascent/descent
Behdad Esfahbod [Wed, 24 Oct 2018 00:00:49 +0000 (17:00 -0700)]
[ot-font] Fix sign of ascent/descent

Some fonts, like msmincho, have positive number as descent
in vhea table.  That's wrong.  Just enforce sign on ascent/descent
when reading both horizontal and vertical metrics.

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

5 years ago[morx] Fix cluster-merging when ligating
Behdad Esfahbod [Tue, 23 Oct 2018 23:46:10 +0000 (16:46 -0700)]
[morx] Fix cluster-merging when ligating

Only merge when actual ligature happened.

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

5 years agoFix size calculation in DEFINE_SIZE_ARRAY_SIZED.
Garret Rieger [Tue, 23 Oct 2018 22:45:35 +0000 (15:45 -0700)]
Fix size calculation in DEFINE_SIZE_ARRAY_SIZED.

5 years ago[aat] Fix up previous commit and add files
Behdad Esfahbod [Tue, 23 Oct 2018 21:31:51 +0000 (14:31 -0700)]
[aat] Fix up previous commit and add files

5 years ago[aat] Allow enabling/disabling features
Behdad Esfahbod [Tue, 23 Oct 2018 21:14:03 +0000 (14:14 -0700)]
[aat] Allow enabling/disabling features

Only works at entire-buffer range, not sub-ranges.

Test with:

$ hb-shape Zapfino.dfont Zapfino
[Z_a_p_f_i_n_o=0+2333]

$ hb-shape Zapfino.dfont Zapfino --features=-dlig
[Z=0+416|a=1@-21,0+264|p_f=2+433|i=4+181|n=5+261|o=6+250]

$ hb-shape Zapfino.dfont Zapfino --features=+dlig
[Z_a_p_f_i_n_o=0+2333]

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

5 years ago[ot-map] Minor
Behdad Esfahbod [Tue, 23 Oct 2018 20:39:50 +0000 (13:39 -0700)]
[ot-map] Minor

5 years agoMinor
Behdad Esfahbod [Tue, 23 Oct 2018 20:25:03 +0000 (13:25 -0700)]
Minor

5 years agoShift code around
Behdad Esfahbod [Tue, 23 Oct 2018 20:09:30 +0000 (13:09 -0700)]
Shift code around

5 years ago[trak] Allow disabling tracking for ranges of text
Behdad Esfahbod [Tue, 23 Oct 2018 10:10:56 +0000 (03:10 -0700)]
[trak] Allow disabling tracking for ranges of text

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

5 years agoWhen parsing feature ranges, accept ';' instead of ':'
Behdad Esfahbod [Tue, 23 Oct 2018 10:07:48 +0000 (03:07 -0700)]
When parsing feature ranges, accept ';' instead of ':'

5 years agoMake tracking optout possible using 'trak' ot feature
Ebrahim Byagowi [Mon, 22 Oct 2018 21:22:05 +0000 (00:52 +0330)]
Make tracking optout possible using 'trak' ot feature

So '--features=-trak' or 'font-feature-settings: 'trak' 0;' can prevent
applying of tracking if used.

5 years agoTouch up on previous commit
Behdad Esfahbod [Tue, 23 Oct 2018 09:51:42 +0000 (02:51 -0700)]
Touch up on previous commit

https://github.com/harfbuzz/harfbuzz/pull/1273

5 years ago[use] Prohibit visually ambiguous vowel sequences
David Corbett [Fri, 12 Oct 2018 20:54:54 +0000 (16:54 -0400)]
[use] Prohibit visually ambiguous vowel sequences

5 years ago[VORG] Hook up to hb-ot-font's v_origin
Behdad Esfahbod [Tue, 23 Oct 2018 09:19:32 +0000 (02:19 -0700)]
[VORG] Hook up to hb-ot-font's v_origin

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

Test added with NotoSansCJK, eg. with U+FF38.