Behdad Esfahbod
7c32e01d04
Minor
2018-01-11 10:47:31 +01:00
Behdad Esfahbod
14b4d84eef
[aat] Fix RearrangementSubtable action
2018-01-11 10:43:30 +01:00
Behdad Esfahbod
800e4ae802
[aat] Mark state-machine-based lookup as completely unsafe-to-break
...
To be improved later.
2018-01-11 10:43:30 +01:00
Behdad Esfahbod
ca42d96129
[aat] Implement RearrangementSubtable
2018-01-11 10:43:30 +01:00
Ebrahim Byagowi
5dbbd0fdb9
Move the #define of _GNU_SOURCE to the top of hb-private.hh ( #697 )
...
This fixes the build on Cygwin.
2018-01-11 12:33:22 +03:30
Behdad Esfahbod
80fd574320
[aat] Add Class subtable thingy
...
From old 'mort' table.
2018-01-10 13:58:41 +01:00
Khaled Hosny
0b22da9541
Improve HB_BUFFER_SERIALIZE_FLAG_NO_ADVANCES docs
...
Add the note about absolute glyph positions from the commit message.
2018-01-10 07:12:07 +02:00
Behdad Esfahbod
188ee6e5ee
Calculate anchor positions in float, then round
...
Hoping to reduce rounding error, to make tests happier...
No luck.
2018-01-10 05:13:47 +01:00
Behdad Esfahbod
7cdd6ab068
Round, instead of floor, when applying variations
...
Hoping this would fix remaining text-rendering-tests failures,
but so far no luck.
2018-01-10 04:44:33 +01:00
Behdad Esfahbod
3b1e97f364
Add HB_BUFFER_FLAG_REMOVE_DEFAULT_IGNORABLES
...
New API:
HB_BUFFER_FLAG_REMOVE_DEFAULT_IGNORABLES
hb-shape / hb-view --remove-default-ignorables
One more text-rendering-tests test passing. Eleven failing.
2018-01-10 03:36:03 +01:00
Behdad Esfahbod
6b19178ee3
Prefix int types with HB
...
Such a headache that Windows defines UINT8, ...; Just prefix it.
2018-01-10 03:07:30 +01:00
Behdad Esfahbod
81e321c802
[aat] Try fixing VC bots
...
c:\projects\harfbuzz\src\hb-aat-layout-common-private.hh(51): error C2872: 'UINT16': ambiguous symbol [C:\projects\harfbuzz\build\harfbuzz.vcxproj]
C:\Program Files (x86)\Windows Kits\10\Include\10.0.14393.0\shared\basetsd.h(80): note: could be 'unsigned short UINT16'
c:\projects\harfbuzz\src\hb-open-type-private.hh(648): note: or 'OT::UINT16'
2018-01-10 02:56:29 +01:00
Behdad Esfahbod
0ed69c9462
Disable processing of morx table in ot shaper
...
So I can merge this to master...
2018-01-10 02:50:49 +01:00
Behdad Esfahbod
5f94b4cc39
[kern] Mark unsafe-to-break
2018-01-10 02:50:49 +01:00
Behdad Esfahbod
71fd6325b6
Add option to buffer serialization to not output glyph advances
...
When advances are not printed, glyph offsets reflect absolute glyph
positions.
New API:
HB_BUFFER_SERIALIZE_FLAG_NO_ADVANCES
hb-shape --no-advances
2018-01-10 02:50:49 +01:00
Behdad Esfahbod
748b989a1f
[aat/morx] Implement NoncontextualSubtables
...
Also makes hb-ot-shape call morx for now instead of GSUB... Just for testing.
2018-01-10 02:50:49 +01:00
Behdad Esfahbod
4cf3ab1d81
Minor
2018-01-10 02:50:49 +01:00
Behdad Esfahbod
470fe5b603
[aat] Implement Lookup table
...
Untested, but compiles.
2018-01-10 02:50:49 +01:00
Behdad Esfahbod
4646a80a87
Minor
2018-01-10 02:50:49 +01:00
Behdad Esfahbod
7c7cb42d81
[aat] Update previous commits for rebase on master
2018-01-10 02:50:49 +01:00
Behdad Esfahbod
a0175e75bc
[aat] Start implementing common table formats
2018-01-10 02:50:49 +01:00
Behdad Esfahbod
c71b55a223
[aat] Start implementing Apple AAT morx table
2018-01-10 02:50:49 +01:00
Behdad Esfahbod
0473d95e27
[ft] Use FT_Done_MM_Var() if available
2018-01-08 10:07:46 +00:00
Behdad Esfahbod
66d7beff96
[khmer] Relax!
...
Apparently we don't use OT_A either.
2018-01-05 18:10:25 +00:00
Behdad Esfahbod
db0207baff
[khmer] Drop another joiner
2018-01-05 18:06:00 +00:00
Behdad Esfahbod
90affe831f
[khmer] Shuffle
2018-01-05 18:04:56 +00:00
Behdad Esfahbod
65795e3ca2
[khmer] Simplify grammar some more
...
Numbers down (from 38):
KHMER: 299090 out of 299124 tests passed. 34 failed (0.0113665%)
2018-01-05 18:03:00 +00:00
Behdad Esfahbod
e13ee93731
[khmer] Clean
2018-01-05 18:01:01 +00:00
Behdad Esfahbod
a71c7eb2ca
[khmer] Limit number of joiners
2018-01-05 17:59:43 +00:00
Behdad Esfahbod
574e42e1cf
[khmer] Relax number of consonants / matras allowed
...
New numbers (down from 39):
KHMER: 299086 out of 299124 tests passed. 38 failed (0.0127038%)
2018-01-05 17:58:02 +00:00
Behdad Esfahbod
80c870bcda
[khmer] Allow Independent Vowels where stacked consonants are allowed
...
New numbers (down from 44):
KHMER: 299085 out of 299124 tests passed. 39 failed (0.0130381%)
2018-01-05 17:54:52 +00:00
Behdad Esfahbod
9bd486c480
[khmer] Drop some more joiners
2018-01-05 17:47:35 +00:00
Behdad Esfahbod
5278265853
[khmer] Drop some more
2018-01-05 17:46:49 +00:00
Behdad Esfahbod
efefd87f33
[khmer] Drop some more grammar
2018-01-05 17:45:48 +00:00
Behdad Esfahbod
82e6bf8e0c
[khmer] Drop some more from grammar
2018-01-05 17:44:18 +00:00
Behdad Esfahbod
957e8ea8a9
[khmer] Drop final_halant_group
2018-01-05 17:43:31 +00:00
Behdad Esfahbod
bbfdbbdc5e
Minor
2018-01-05 17:34:26 +00:00
Behdad Esfahbod
f6df251521
[indic] Remove unused OT_VD category
2018-01-05 17:27:48 +00:00
Behdad Esfahbod
e6618f3bdf
[khmer] Shave off some more from the grammar
2018-01-05 17:27:42 +00:00
Behdad Esfahbod
014494d5c0
[khmer] Remove unused symbol clusters
2018-01-05 17:18:12 +00:00
Behdad Esfahbod
bbac984b93
Minor
2018-01-05 17:15:31 +00:00
Behdad Esfahbod
185b68946a
[khmer] Remove medials from grammar
2018-01-05 17:14:27 +00:00
Behdad Esfahbod
c265dffdf6
[khmer] Better fix for dangling final Coeng
...
This is how 1471cfee3b
should have
been done.
2018-01-05 17:06:29 +00:00
Behdad Esfahbod
e3fdf1fc2f
[khmer] Remove reph/repha support from grammar
2018-01-05 17:05:53 +00:00
Behdad Esfahbod
0d3a274de1
[khmer] Remove forced_rakar from grammar
...
Used by Sinhala only.
2018-01-05 17:01:37 +00:00
Behdad Esfahbod
1471cfee3b
[khmer] Allow a dangling final Coeng after matras
...
Uniscribe seems to allow that. New numbers:
KHMER: 299080 out of 299124 tests passed. 44 failed (0.0147096%)
2018-01-05 16:34:20 +00:00
Behdad Esfahbod
9eaf077ded
[khmer] Remove some more unused code
2018-01-05 16:28:00 +00:00
Behdad Esfahbod
bfad6ab897
[khmer] Remove features not used by Khmer
2018-01-05 16:13:09 +00:00
Behdad Esfahbod
92a99ce084
[khmer] Remove rphf feature
2018-01-05 16:08:44 +00:00
Behdad Esfahbod
238b90e77c
[khmer] Remove non-Khmer matra positioning code
2018-01-05 16:06:53 +00:00
Behdad Esfahbod
f8553c898a
[khmer] Remove indic_config_t
2018-01-05 16:04:02 +00:00
Behdad Esfahbod
a119a8bce5
[khmer] Remove indic_config->reph_mode
2018-01-05 16:02:55 +00:00
Behdad Esfahbod
c135324af1
[khmer] Remove indic_config->reph_pos
2018-01-05 16:02:55 +00:00
Behdad Esfahbod
ffcd6c7efd
[khmer] Remove indic_config->base_pos
2018-01-05 15:50:05 +00:00
Behdad Esfahbod
0c91638d48
[khmer] Remove other scripts
2018-01-05 15:45:30 +00:00
Behdad Esfahbod
4c0199c573
[khmer] Remove indic_config->script
2018-01-05 15:43:48 +00:00
Behdad Esfahbod
9b135d9524
[khmer] Remove indic_config->virama
2018-01-05 15:43:11 +00:00
Behdad Esfahbod
7eb3ac29d3
[khmer] Remove indic_config->has_old_spec
2018-01-05 15:41:31 +00:00
Behdad Esfahbod
961ebf85f1
[khmer] Remove Halant from Khmer shaper
2018-01-05 15:36:53 +00:00
Behdad Esfahbod
9761f9d782
[indic] Remove more Khmer-specific stuff from Indic shaper
...
No numbers changed.
2018-01-05 15:33:11 +00:00
Behdad Esfahbod
0758953644
[indic] Remove main Khmer stuff
2018-01-05 15:08:28 +00:00
Behdad Esfahbod
dcf4d95fea
[khmer] Split off Khmer shaper from Indic
...
Towards fixing https://github.com/harfbuzz/harfbuzz/issues/667
The Khmer spec is different enough from other Indic ones to require
its own grammar.
No change in functionality. Test numbers are:
BENGALI: 353725 out of 354188 tests passed. 463 failed (0.130722%)
DEVANAGARI: 707307 out of 707394 tests passed. 87 failed (0.0122987%)
GUJARATI: 366355 out of 366457 tests passed. 102 failed (0.0278341%)
GURMUKHI: 60729 out of 60747 tests passed. 18 failed (0.0296311%)
KANNADA: 951300 out of 951913 tests passed. 613 failed (0.0643966%)
KHMER: 299071 out of 299124 tests passed. 53 failed (0.0177184%)
MALAYALAM: 1048136 out of 1048334 tests passed. 198 failed (0.0188871%)
ORIYA: 42320 out of 42329 tests passed. 9 failed (0.021262%)
SINHALA: 271662 out of 271847 tests passed. 185 failed (0.068053%)
TAMIL: 1091754 out of 1091754 tests passed. 0 failed (0%)
TELUGU: 970555 out of 970573 tests passed. 18 failed (0.00185457%)
2018-01-05 14:54:31 +00:00
Behdad Esfahbod
1e05ea79d0
[ot] Short-circuit base instance advance variation
2018-01-05 14:01:37 +00:00
Behdad Esfahbod
54b2b93722
[ot] Fix VariationStore evaluation algorithm
...
Ouch! Missing coords should still be evaluated as coord=0, which
most of the time results in a factor of 0. We were skipping these,
which was equivalent to a factor of 1.
Fixes https://github.com/harfbuzz/harfbuzz/issues/652
2018-01-05 13:20:21 +00:00
Behdad Esfahbod
a3afdd1e08
Minor
2018-01-05 13:17:02 +00:00
Behdad Esfahbod
cb43bdbc2f
[ft] If there's no variations set, don't set them on hb-font
2018-01-05 13:06:25 +00:00
Behdad Esfahbod
127bcc6ece
Merge remote-tracking branch 'fdo/master'
2018-01-05 12:50:22 +00:00
Behdad Esfahbod
8c0d1916a4
Improve CGJ skipping logic
...
Previously we made CGJ unskippable. Now, if CGJ did NOT prevent
any reordering, allow skipping over it. To make this work we
had to make changes to the Arabic mark reordering algorithm
implementation to renumber moved MCM marks. See comments.
Fixes https://github.com/harfbuzz/harfbuzz/issues/554
2018-01-05 12:48:19 +00:00
Ebrahim Byagowi
72bec1cd09
Improve tests ( #679 )
2018-01-05 12:42:20 +03:30
Behdad Esfahbod
293e443529
Minor
2018-01-04 16:06:25 +00:00
Bruce Mitchener
8a0952db7e
atomics: Favor compiler primitives over macOS APIs. ( #676 )
...
In macOS 10.12, the `OSMemoryBarrier` and related APIs were deprecated
in favor of using `std::atomic`. On the way to supporting `std::atomic`,
we can favor using the "Intel primitives" which are also available on
macOS.
2018-01-04 15:10:10 +03:30
Ebrahim Byagowi
5ed26fc5bd
[cmake] Run src/ tests ( #675 )
2018-01-04 10:11:34 +03:30
Behdad Esfahbod
f8daeef4c4
[use] Simplify more
2018-01-03 14:27:34 +00:00
Behdad Esfahbod
877d15e73c
[use] Simplify
...
Fixes https://github.com/harfbuzz/harfbuzz/pull/661
2018-01-03 14:24:44 +00:00
Behdad Esfahbod
308f419215
[use] Fix Brahmi Number Joiner 1107F
...
Fixes https://github.com/harfbuzz/harfbuzz/pull/660
2018-01-03 14:22:07 +00:00
Bruce Mitchener
85ec6d3443
Fix typos.
2018-01-02 13:26:44 -05:00
David Corbett
7bfdf1a941
Forbid Batak killers after vowel signs
2017-12-24 14:21:22 -08:00
Behdad Esfahbod
72ecaae0ad
[use] Allow ZWJ before/after Halant
...
https://github.com/harfbuzz/harfbuzz/issues/542#issuecomment-353169729
2017-12-24 16:05:07 -05:00
Behdad Esfahbod
bc92245b68
Minor
2017-12-24 15:54:58 -05:00
Volker H. Simonis
a9432bde7e
HarfBuzz 1.7.1 and later don't compile on AIX with xlC ( #655 )
2017-12-19 20:22:24 -05:00
Behdad Esfahbod
2fe5f885b6
[set] Handle nil set in add_range() / add_sorted_array()
...
Fixes https://github.com/harfbuzz/harfbuzz/issues/657
2017-12-19 14:48:26 -05:00
Behdad Esfahbod
1245395a60
[coretext] In hb_coretext_font_create() set ptem
...
Otherwise setting the CTFont was ineffective as it would have been
recreated anyway unless font size was set to 18 CSS points.
2017-12-17 12:33:08 -05:00
Behdad Esfahbod
493a005d95
[set] In add_sorted_array(), bail if data is not sorted
2017-12-16 11:49:39 -05:00
Behdad Esfahbod
a7bd6d7a4c
[collect_glyphs] Bail if input data looks like garbage
...
Specificaly, when a range or sorted array has unexpected order, we take that as
font data being garbage and bail out. This fixes significant slowdown on a bad
version of Chandas font which has a 600KB GPOS with garbage inside.
Later on, I like to add a maximum-work counter for collect_glyphs to protect
against malicious fonts as well.
Fixes https://bugs.chromium.org/p/chromium/issues/detail?id=794896
2017-12-16 11:39:32 -05:00
Behdad Esfahbod
1ce7d6e215
[set] Optimize add_array() / add_sorted_array()
...
Does page lookup as needed.
2017-12-16 11:39:11 -05:00
Behdad Esfahbod
71e6adf1e2
[collect_glyphs] handle ClassDef better
2017-12-16 11:07:37 -05:00
Behdad Esfahbod
87cc5a65cb
[collect_glyphs] In PairPosFornat2 do not collect classDef1
...
The coverage already covered that.
2017-12-16 06:18:07 -08:00
Behdad Esfahbod
81f27df4d9
More work towards improving collect_glyphs() against bad input
...
The three "XXXXX"'s should be switched to false. Doing that separately for ease
of bisecting...
2017-12-16 06:12:06 -08:00
Behdad Esfahbod
5d02572034
[set] Add add_sorted_array()
...
Not optimized to use sortedness yet. Also start putting in place infra
to faster reject bad data.
A version of Chandas.ttf found on some Chrome bots has 660kb of GPOS,
mostly junk. That is causing 48 million of set->add() calls in
collect_glyphs(), which is insane.
In the upcoming commits, I'll be speeding that up by optimizing
add_sorted_array(), while also reducing work by rejecting out-of-sort
arrays quickly and propagate the rejection.
Part of https://bugs.chromium.org/p/chromium/issues/detail?id=794896
2017-12-14 19:35:47 -08:00
Behdad Esfahbod
9d6511a734
[set] Reduce number of preallocated pages from 8 to 1
...
Now that pagesize is 8192, this feels better.
2017-12-14 19:07:17 -08:00
Behdad Esfahbod
ae2e2b068e
Fix partial tracing debug builds
2017-12-14 19:07:17 -08:00
Behdad Esfahbod
9daa88cd79
Minor
2017-12-14 19:07:17 -08:00
Behdad Esfahbod
f424a34223
[set] Change pagesize from 512 bits to 8192 bits
...
Fixes perf regression on some heavy fonts in Chrome's FT+HB
interaction.
See:
https://bugs.chromium.org/p/chromium/issues/detail?id=782220
More work to be done:
https://bugs.chromium.org/p/chromium/issues/detail?id=794896
2017-12-14 13:30:38 -08:00
Behdad Esfahbod
0fe62c1f33
[set] Add add_array()
...
To be used to optimize adding a whole bunch of (sorted) items at the same time,
as in CoverageFormat1.
2017-12-14 10:39:00 -08:00
Behdad Esfahbod
03b7a221f7
[debug] Use %p to print pointers
...
Fixes https://github.com/harfbuzz/harfbuzz/issues/640
2017-12-05 13:13:58 -08:00
Nathan Willis
0dc03ef757
Indic: always hyphenate pre-base-reordering, for clarity.
2017-12-05 11:29:43 -08:00
Behdad Esfahbod
be59f3cbf4
Silence unused-variables warning on MSVC
...
Fixes https://github.com/harfbuzz/harfbuzz/issues/635
2017-12-05 09:01:28 -08:00
David Corbett
80c1b01f05
Allow digits in language system tags
2017-12-05 08:56:41 -08:00
David Corbett
85bb89a88b
Fix string matching in parse_bool
2017-12-04 13:10:16 -08:00
Olivier Blin
0fd89dc61c
[hb-ft] Fix build when Multiple Master font support is disabled in freetype
...
FT_Set_Var_Blend_Coordinates() is not available when "Multiple Master
font interface" is disabled in freetype's modules.cfg
2017-12-04 10:52:06 -08:00