Behdad Esfahbod
3f3585ca14
Fix coretext build (hopefully)
2018-08-09 00:58:17 -07:00
Behdad Esfahbod
aa3b6017ed
Revert "[iter] Make operator bool explicit"
...
This reverts commit 66920a6bac
.
Some of our bots (Oracle Studio and Apple gcc 4.2) do not allow
explicit except for constructors.
https://github.com/harfbuzz/harfbuzz/issues/1127
2018-08-09 00:56:28 -07:00
Behdad Esfahbod
e1a2354220
[atomic] More
2018-08-09 00:53:25 -07:00
Behdad Esfahbod
f1f4b45ac3
Fix lazy_loader fini()
...
Was creating object even if wasn't there.
2018-08-09 00:28:40 -07:00
Behdad Esfahbod
1f7380944d
[atomic] Add hb_atomic_ptr_t<> and port all uses
...
Found and fixed a couple bugs.
Found a couple multithreading issues. Marked them with "XXX-MT-bug".
2018-08-09 00:27:01 -07:00
Behdad Esfahbod
6e42f4c53f
[atomic] Remove hb_atomic_int_impl_t now that it's always int
2018-08-08 22:51:35 -07:00
Behdad Esfahbod
1227a9e5a5
[atomic] Unify typedef
...
Removes volatile from fallback implementation. That was handwavy
anyway.
2018-08-08 22:45:49 -07:00
Behdad Esfahbod
5cd1888c9d
[atomic] Change Mac atomic int type to int
...
If ever int is not 32bit, we'll fix this...
2018-08-08 22:43:53 -07:00
Behdad Esfahbod
e1de86eac1
[atomic] Change Windows atomic int type to int
2018-08-08 22:42:33 -07:00
Behdad Esfahbod
aee2d10b2b
[atomic] Change Solaris atomic int to signed
2018-08-08 22:40:10 -07:00
Behdad Esfahbod
b6fdcf4f8b
1.8.7
2018-08-08 22:01:38 -07:00
Behdad Esfahbod
51ffc3e65a
Fix previous commit to use atomic operations
2018-08-08 22:01:38 -07:00
Behdad Esfahbod
883957688c
Fix assertion failure
...
https://bugzilla.mozilla.org/show_bug.cgi?id=1476334
2018-08-08 21:42:18 -07:00
Behdad Esfahbod
e49a38b20e
1.8.6
2018-08-07 09:55:42 -07:00
Behdad Esfahbod
b0ff79acd8
Add +hb_font_get_glyph_advances_for_direction
...
New API:
+hb_font_get_glyph_advances_for_direction
2018-08-07 09:52:06 -07:00
Behdad Esfahbod
28e2f467e1
Actually add hb_font_get_glyph_[hv]_advances
...
New API:
+hb_font_get_glyph_h_advances
+hb_font_get_glyph_v_advances
2018-08-07 09:47:00 -07:00
Behdad Esfahbod
996775191a
Minor
2018-08-07 09:44:36 -07:00
Behdad Esfahbod
3d7c555a19
Remove get_advances_nil and alias it to get_advances_default
2018-08-07 09:37:52 -07:00
Behdad Esfahbod
66920a6bac
[iter] Make operator bool explicit
...
We would need to write:
for (Iter<T> it (...); bool (t); t++)
instead of:
for (Iter<T> it (...); t; t++)
But I think it's an improvement in code readability in the long term.
Fixes https://github.com/harfbuzz/harfbuzz/issues/1127
2018-08-06 15:32:13 -07:00
Michiharu Ariza
161ece4c30
Merge branch 'master' into cff-subset
2018-08-06 11:23:50 -07:00
Michiharu Ariza
9fae33b9f3
Silence Codacy
2018-08-06 10:44:12 -07:00
Michiharu Ariza
5561b81849
subset FDSelect and FDArray
...
Added a set of sources hb-subset-cff-common-private.cc & .hh for FDSelect subseting code.
Added FDSelect format 4 (CFF2 only) support. Shared its implementation with format 3 as a template.
2018-08-06 10:04:53 -07:00
Behdad Esfahbod
79e21984b1
Add batch advance width callback function
...
New API:
+hb_font_funcs_set_glyph_h_advances_func
+hb_font_funcs_set_glyph_v_advances_func
+hb_font_get_glyph_h_advances
+hb_font_get_glyph_h_advances_func_t
+hb_font_get_glyph_v_advances
+hb_font_get_glyph_v_advances_func_t
2018-08-06 09:45:17 -07:00
Koji Ishii
9533364cc3
batchwidth
2018-08-06 09:44:46 -07:00
Behdad Esfahbod
b912fbea17
Remove most uses of direct comparison to Null objects
2018-08-06 06:38:59 -07:00
Behdad Esfahbod
3506672ce9
Port _nil objects to Null() machinery
...
Finally, unified!
2018-08-06 06:17:48 -07:00
Behdad Esfahbod
1abd427acf
[BASE] Rename horzi/vert to h/v
2018-08-06 05:53:35 -07:00
Behdad Esfahbod
da48aca1be
[BASE] Misc fixes
...
The code was badly broken. In better shape now, but still, needs
a full review before ever working.
2018-08-06 05:52:12 -07:00
Behdad Esfahbod
f9cfa5cb0e
Change null-pool specialization to min_size again
2018-08-06 05:29:15 -07:00
Behdad Esfahbod
25147ff808
Move Null system to hb-null.hh
2018-08-06 05:01:52 -07:00
Behdad Esfahbod
f800368df3
Remove unused macros
2018-08-06 04:58:34 -07:00
Behdad Esfahbod
19e0091299
Minor
2018-08-06 04:54:31 -07:00
Behdad Esfahbod
37be774af9
Minor
2018-08-06 04:52:12 -07:00
Behdad Esfahbod
e1acff806b
Move hb_vector_t to hb-vector-private.hh
2018-08-06 04:42:46 -07:00
Behdad Esfahbod
be336dadc0
Move some more code around
2018-08-06 04:32:51 -07:00
Behdad Esfahbod
92806ee055
Move null data definitions to hb-static.cc
...
Also remove " " null data for Tag. Just use zeroes.
2018-08-05 21:41:52 -07:00
Behdad Esfahbod
1b4d5a2402
Minor
2018-08-03 19:55:09 -07:00
Behdad Esfahbod
7df7963b46
Make lazy loader deal with OOM
2018-08-03 19:54:33 -07:00
Behdad Esfahbod
30ff8ac865
Rename
2018-08-03 17:33:13 -07:00
Behdad Esfahbod
85ba4a190f
[ot] Comment
2018-08-03 17:06:42 -07:00
Behdad Esfahbod
07afc1a213
[ot] Add misc tables to tables_t
...
Most unused.
2018-08-03 17:03:32 -07:00
Behdad Esfahbod
74b4df2cde
[ot] Move GDEF into tables_t
2018-08-03 16:58:05 -07:00
Behdad Esfahbod
0271c7ab3b
[ot] Move GSUB/GPOS into tables_t
2018-08-03 16:45:57 -07:00
Behdad Esfahbod
f73d2775cf
[ot] More shuffling
...
Misc. table loading now properly automated.
2018-08-03 16:34:25 -07:00
Behdad Esfahbod
52fbd23d86
[ot] Minor
2018-08-03 16:22:16 -07:00
Michiharu Ariza
cc3f4e00aa
silence gcc
2018-08-03 15:00:37 -07:00
Michiharu Ariza
00970dd242
Removed parsed hint fields from CFF2PrivateDictValues
...
Instead moved & stored uniformly in values vector (renamed from opstrs)
This should be fine as we aren't likely going to use them as hints after all
Templatized DictValues whether to parse them out
For subsetter, they aren't parsed
2018-08-03 14:35:09 -07:00
Behdad Esfahbod
6a0a298aab
[ot] Move code around
2018-08-02 23:13:19 -07:00
Behdad Esfahbod
5e718a751e
[ot] Use switch for checking for blacklisted GDEF tables
...
Faster / more compact code.
2018-08-02 23:04:42 -07:00
Behdad Esfahbod
b5cdf5280d
[ot] In GDEF blacklisting logic, remove the glyph index check for Times
...
Just blacklist based on table sizes like we do for other fonts.
2018-08-02 22:56:42 -07:00
Behdad Esfahbod
c988b11999
Move code around
2018-08-02 22:55:52 -07:00
Michiharu Ariza
76f7397c10
templatized CFF2 accelerator for lean Private dict interpretting for subset
...
also fixed local subrs serialization
2018-08-02 16:28:10 -07:00
Michiharu Ariza
43040564e6
removed TRACE_SERIALIZE from non-member function _write_cff2
2018-08-02 12:23:10 -07:00
Michiharu Ariza
e2fd49e477
Merge branch 'master' into cff-subset
2018-08-02 11:39:22 -07:00
Michiharu Ariza
693ae80474
more silencing fixes
2018-08-02 11:22:42 -07:00
Michiharu Ariza
f6da449831
silence archlinux
2018-08-02 10:52:08 -07:00
Michiharu Ariza
58279c3db4
silence Codacy
2018-08-02 10:18:01 -07:00
Behdad Esfahbod
574b37e933
Minor
2018-08-02 02:22:38 -07:00
Behdad Esfahbod
d4d1bf8177
Fix for recent rename
2018-08-02 02:04:02 -07:00
Behdad Esfahbod
91126aa11a
[uniscribe] Update for recent changes
2018-08-02 02:03:13 -07:00
Behdad Esfahbod
66952ec47b
Remove unused table reference
2018-08-02 01:45:12 -07:00
Behdad Esfahbod
443de26fa5
Minor
2018-08-02 01:43:02 -07:00
Behdad Esfahbod
ee35af738b
Make lazy-loader safe for nil objectification
2018-08-02 01:37:57 -07:00
Behdad Esfahbod
6404c49d07
Minor
2018-08-02 01:36:08 -07:00
Behdad Esfahbod
ff7826e90b
Reduce storage by sharing face amongst lazy_loaders
2018-08-02 01:29:05 -07:00
Behdad Esfahbod
bdd3c11a19
Internal templatization of lazy-loaders
2018-08-02 01:09:14 -07:00
Behdad Esfahbod
ed7b2e58fc
Remove OT namespace from hb-machinery-private.hh
2018-08-02 00:08:08 -07:00
Behdad Esfahbod
cb1491f92e
Minor
2018-08-01 22:50:45 -07:00
Behdad Esfahbod
16ccfafbbd
[face] Sprinkle const in the API
2018-08-01 22:50:06 -07:00
Behdad Esfahbod
3d22aefede
Rename
2018-08-01 18:03:32 -07:00
Behdad Esfahbod
1a624c6e06
Add comment re (our only) race condition
2018-08-01 17:53:30 -07:00
Michiharu Ariza
19ce0b24c0
removed unused field OpStr::update
2018-08-01 17:34:59 -07:00
Michiharu Ariza
3bda54c43b
fixed Index::serialize
...
The bug was causing CharString of the last glyph corrupt
2018-08-01 16:32:27 -07:00
Michiharu Ariza
16f4dc9b73
fixed CFF2VariationStore::serialize
...
also get_size
2018-08-01 16:06:52 -07:00
Behdad Esfahbod
44d1fb37ef
1.8.5
2018-08-01 14:51:51 -07:00
Behdad Esfahbod
13f4c137c6
[atomic] Fix Solaris ones to add proper barriers
2018-08-01 14:15:00 -07:00
Behdad Esfahbod
19dfaa3515
[atomic] Remove volatile from IBM impl signature
2018-08-01 14:15:00 -07:00
Behdad Esfahbod
2093a3e0cb
[atomic] Oops
2018-08-01 14:15:00 -07:00
Behdad Esfahbod
19b98348ff
[atomic] Use read-barrier for get()
2018-08-01 14:15:00 -07:00
Behdad Esfahbod
006d4f031a
[atomic] Some more minor tweaks
2018-08-01 14:15:00 -07:00
Michiharu Ariza
b2ff582c8c
Implemented hb_subset_cff2
...
Added serialize functions to CFF2 structs
Fixed issues & bugs & code cleanup
Now subsetting CFF2 table outputs something
2018-08-01 11:30:38 -07:00
Ebrahim Byagowi
1a7fed6318
Revert "Add a new API, hb_ot_layout_get_feature_name_ids ( #976 )" ( #1121 )
...
This reverts commit 0c1b287b72
.
2018-08-01 12:15:44 +04:30
Behdad Esfahbod
dfc86e4b35
[atomic] Fix cast to fallback ptr_get()
2018-08-01 00:22:18 -07:00
Behdad Esfahbod
7a4d576e81
[gobject] Fix copy/paste error
2018-08-01 00:19:25 -07:00
Behdad Esfahbod
ad27562742
[atomic] On IBM, use light-weight sync for everything
...
lwsync() is a full read/write-barrier. That's all we need, never
need sync(). I'm not sure why an isync() was used in fetch_and_add,
but since that's a read-modify-write, I just changed it to have
lwsync() on both sides.
2018-07-31 23:01:05 -07:00
Behdad Esfahbod
fd638d215f
[atomic] Add XXX items around Solaris ops
...
Since add_int and cas are both read-modify-write, I wonder if we
also need a barrier after them.
2018-07-31 23:00:15 -07:00
Behdad Esfahbod
896ff15ae6
[atomic] Fix get() impl
...
Originally, glib's atomic_get was implemented as "memory_barrier; load".
I copied this into cairo, fontconfig, and harfbuzz. However, that's
wrong. Correct way is "load; memory_barrier". The details are long
and hard to fully grasp. Best to read:
https://www.kernel.org/doc/Documentation/memory-barriers.txt
Also see my report against GNOME:
https://gitlab.gnome.org/GNOME/glib/issues/1449
Note that this is irrelevant if C++11-like atomic ops are available.
2018-07-31 22:51:38 -07:00
Behdad Esfahbod
d7a15799d4
[gobject] Hook up hb_map_t
2018-07-31 22:28:28 -07:00
Behdad Esfahbod
63c74e8d1d
[atomic] Fix fallback impl
2018-07-31 22:21:21 -07:00
Behdad Esfahbod
4bc16aca47
[atomic] Add get_relaxed / set_relaxed
...
To help TSan and be more "correct".
2018-07-31 21:29:18 -07:00
Behdad Esfahbod
3dd1b88765
[atomic] Use CONSUME, not ACQUIRE, memory-order for get()
...
Although, all implementations just elevate that to ACQUIRE.
But requirement for us is just CONSUME.
2018-07-31 20:28:36 -07:00
Behdad Esfahbod
06b91d935d
Revert "[atomic] Make pointer get op relaxed instead of acquire"
...
This reverts commit b1e5650c67
.
After lots of head-scratching and finally finding the only truly
readable source to be the good old:
https://www.kernel.org/doc/Documentation/memory-barriers.txt
I've convinced myself that we need consume memory-ordering on get().
The location of memory-barrier in a load should be after, not before
the load. That needs fixing. I'll do that separately.
2018-07-31 20:28:36 -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
Garret Rieger
89733755a4
[subset] use add_array to populate feature_indexes.
...
This is much faster then calling a bunch of individual add()'s.
2018-07-31 18:26:09 -07:00
Garret Rieger
7d92bef9c5
[subset] collect features first, then use those to collect lookups.
2018-07-31 18:26:09 -07:00
Behdad Esfahbod
af876cce30
[indic] Flip default logic for double-halants in old-school
...
Oriya went down from 9 to 2.
BENGALI: 353725 out of 354188 tests passed. 463 failed (0.130722%)
DEVANAGARI: 707311 out of 707394 tests passed. 83 failed (0.0117332%)
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%)
MALAYALAM: 1048136 out of 1048334 tests passed. 198 failed (0.0188871%)
MYANMAR: 1115830 out of 1123883 tests passed. 8053 failed (0.716534%)
ORIYA: 42327 out of 42329 tests passed. 2 failed (0.00472489%)
SINHALA: 271596 out of 271847 tests passed. 251 failed (0.0923313%)
TAMIL: 1091754 out of 1091754 tests passed. 0 failed (0%)
TELUGU: 970555 out of 970573 tests passed. 18 failed (0.00185457%)
2018-07-31 15:29:48 -07:00
Behdad Esfahbod
92ba9905ca
[indic] Allow double-halant in old-spec Devanagari
...
Fixes https://github.com/harfbuzz/harfbuzz/issues/1071
2018-07-31 15:19:32 -07:00
Behdad Esfahbod
5772edc0ea
[khmer] Typo
2018-07-31 14:10:31 -07:00
Behdad Esfahbod
6ddd669e20
[khmer] Clear syllables before presentation features
...
Probably not what Uniscribe does, but good idea?
2018-07-31 13:40:22 -07:00
Behdad Esfahbod
8eef1964a7
[khmer] Revert previous change, and remove pauses
...
This makes test suite happy again (at 44) while fixing the sequences
we were fixing, which were the following with KhmerUI.ttf:
U+1789,U+17BC
U+1789,U+17D2,U+1789
U+1789,U+17D2,U+1789,U+17BC
Fixes rest of https://github.com/harfbuzz/harfbuzz/issues/974
2018-07-31 13:40:17 -07:00
Behdad Esfahbod
7c658ea2f2
[khmer] Apply ccmp after basic features
...
Part of https://github.com/harfbuzz/harfbuzz/issues/974
2018-07-31 12:49:02 -07:00
Behdad Esfahbod
1a96cc825d
[khmer] Rewrite most of shaper to better follow spec
...
Khmer spec has only one reordering phase, and only simple prebase
matra and Coeng-Ro reordering. Implement that. Specifically,
this was done to address recognizing different orders of the matra
and Coeng-Ro sequence. That said, some combinations are now
reordered differently from Uniscribe. Not clear if that's intended
or a bug in Uniscribe. The following two sequences render the same
in Uniscribe whereas we reorder them differently:
U+17A0,U+17D2,U+179A,U+17C2
U+17A0,U+17C2,U+17D2,U+179A
For that reason, our test suite numbers regressed slightly. Used
to be at 34 for fails, now at:
KHMER: 299080 out of 299124 tests passed. 44 failed (0.0147096%)
But generally a good change, and removed lots of code.
Fixes https://github.com/harfbuzz/harfbuzz/issues/1026
2018-07-31 11:45:32 -07:00
Behdad Esfahbod
f5152cea42
[shaper] Move code around
2018-07-31 01:27:04 -07:00
Behdad Esfahbod
36d0fbbc52
[shaper] Remove a macro
2018-07-31 01:15:04 -07:00
Behdad Esfahbod
b1e5650c67
[atomic] Make pointer get op relaxed instead of acquire
...
We only use it before cmpexch, so relaxed is fine and faster for
common case.
2018-07-31 01:02:31 -07:00
Behdad Esfahbod
66ccd8ac40
[serialize] Increase stage count from 8 to 32
...
Indic shaper uses many stages. Now we are provably not limiting
functionality whereas the previous limit of 8 was assuming real-world
practices.
2018-07-30 17:03:06 -07:00
Behdad Esfahbod
ee8cf91965
[serialize] Remove unused truncate() method
2018-07-30 16:59:41 -07:00
Michiharu Ariza
8782f80cce
fixed FDSelect0::sanitize
2018-07-30 15:27:20 -07:00
Michiharu Ariza
9c4cadaef0
Added sanitize functions & calls
...
Added sanitize functions to FDSelect
Added satnitize calls for FDSelect, VariationStore, FDArray, TopDict
2018-07-30 14:28:40 -07:00
Michiharu Ariza
161b642ec5
Merge branch 'master' into cff-subset
2018-07-30 12:22:09 -07:00
Garret Rieger
5edf454aa6
[subset] During lookup collection remember the features we've already processed.
2018-07-27 17:29:00 -07:00
Behdad Esfahbod
42c183f803
Minor
2018-07-27 14:55:29 -07:00
Behdad Esfahbod
ecab6604e5
[serialize] Allocate for markFilteringSet
2018-07-27 14:54:15 -07:00
Behdad Esfahbod
7f08818c44
Minor
2018-07-27 14:54:15 -07:00
prrace
2e25d8f491
Fix unlikely leaks
2018-07-27 14:54:08 -07:00
Behdad Esfahbod
3c2842cbcf
Add hb-iter-private.hh
...
Unused so far.
2018-07-25 17:07:17 -07:00
Behdad Esfahbod
92b1e025c6
Move some code from hb-open-type-private.hh to hb-machinery-private.hh
2018-07-25 16:58:47 -07:00
Behdad Esfahbod
6b11fea997
[closure] Allocate out set on the stack
2018-07-25 16:01:37 -07:00
Behdad Esfahbod
74467b7901
Fix compile
2018-07-25 14:30:07 -07:00
Behdad Esfahbod
bf90f35302
[coretext] Add note
2018-07-25 13:57:24 -07:00
Garret Rieger
fb58cb4b5c
[subset] Only used reachable lookups for gsub closure.
2018-07-25 13:56:58 -07:00
Behdad Esfahbod
c38bd4025f
[closure] Separate in and out glyphs
...
Fixes https://github.com/harfbuzz/harfbuzz/issues/1107
2018-07-24 13:47:32 -07:00
Garret Rieger
85646fdadb
[subset] Limit the iterations of the closure algorithm.
...
Prevents O(n^2) run times.
2018-07-23 16:01:57 -07:00
Behdad Esfahbod
94759d4cf8
Fix visibility on mingw32
...
Should fix bots again.
2018-07-23 15:08:32 -07:00
Behdad Esfahbod
61eddbd8ef
Fix infinite loop in loading num_glyphs within sanitizer
2018-07-23 14:44:10 -07:00
Behdad Esfahbod
e22a48ac95
One more visibility trick
...
Should fix Windows build again.
2018-07-23 13:24:26 -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
c6bc7c3831
Set num glyphs on sanitizer reference_table()
...
Move out-of-class definitions of two methods to hb-static so they
are accessible in libharfbuzz-subset.
2018-07-23 11:46:46 -07:00
Behdad Esfahbod
9401829d4e
Remove Sanitizer<>
2018-07-22 22:50:58 -07:00
Behdad Esfahbod
8e3e41272b
Port rest of code away from Sanitizer<>
2018-07-22 22:49:26 -07:00
Behdad Esfahbod
d6a8f64045
Port dump-emoji away from Sanitizer<>
2018-07-22 22:47:19 -07:00
Behdad Esfahbod
14f78d2b3b
.
2018-07-22 22:45:26 -07:00
Behdad Esfahbod
4547051f48
Minor
2018-07-22 22:44:22 -07:00
Behdad Esfahbod
740ae27d5c
Port sbix off of Sanitizer<>
2018-07-22 22:43:25 -07:00
Behdad Esfahbod
9583e0077d
Port more off of Sanitizer<>
2018-07-22 22:43:25 -07:00
Behdad Esfahbod
e7737b41d7
Add sanitizer reference_table, also fix clang build
...
Clang is being really peculiar. Fix with:
- inline hb_blob_t *sanitize (hb_blob_t *blob) { return c->sanitize<Type> (blob); }
+ inline hb_blob_t *sanitize (hb_blob_t *blob) { return c[0].template/*clang idiosyncrasy*/sanitize_blob<Type> (blob); }
2018-07-22 22:24:31 -07:00
David Corbett
62fa7cd1cc
Order Chakma split vowels in accordance with NFC
...
Fixes #1105 .
2018-07-22 19:47:21 -07:00
Ebrahim Byagowi
0c1b287b72
Add a new API, hb_ot_layout_get_feature_name_ids ( #976 )
...
This new API returns cvXX and ssXX related NameId, things like
featUiLabelNameId, featUiTooltipTextNameId, sampleTextNameId, ... of cvXX
and UINameId of ssXX, in a unified way.
However HarfBuzz currently doesn't expose an API for retrieving the actual
information associated with NameId from the `name` table and that should be
done separately.
2018-07-21 21:14:48 +04:30
Michiharu Ariza
3a61c3e935
first push of CFF/CFF2 work
...
Index, Dict structs
hooked up to hb-subset (takes CFF2, outputs empty CFF2)
2018-07-18 14:17:52 -07:00
Ebrahim Byagowi
93b65d9fe3
Remove dump-fon ( #1100 )
...
It had interesting stuffs like EXE parsing and
big-endian parsers but added in an attempt to find
a solution for #681 which later found not related.
2018-07-17 23:29:16 +04:30
Ebrahim Byagowi
d5cd47a69c
Remove AAT's gcid/fmtx ( #1099 )
...
We are not going to use them, at least in the foreseeable future
2018-07-17 22:32:37 +04:30
Behdad Esfahbod
1e9e344b2b
Fix hb_face_count() sanitize referencing
2018-07-17 19:17:59 +02:00
Behdad Esfahbod
a8cc0b5907
Remove TODO that is not gonna be done
...
Previously the idea was to cache sanitize results externally (think,
in Fontconfig) and avoid resanitizing every time. That's, not a good
idea.
2018-07-17 19:09:03 +02:00
Behdad Esfahbod
be70738400
Move sanitizer code around a bit
2018-07-17 18:51:59 +02:00
Behdad Esfahbod
db5d430eff
[aat] Update for blob changes
...
Also, uncomment code again, just "if (0)" it out, so it doesn't get stale again.
2018-07-17 18:14:45 +02:00
Behdad Esfahbod
68310a65cb
1.8.4
2018-07-17 13:20:40 +02:00
Behdad Esfahbod
04b7b81bcb
Reland "Implement C++11-style GCC builtin atomic ops"
...
Fixed the crasher in it.
2018-07-17 11:02:38 +02:00
Behdad Esfahbod
019d18e9ae
Minor
2018-07-17 11:00:24 +02:00
Behdad Esfahbod
3edef5a19b
Revert "Implement C++11-style GCC builtin atomic ops"
...
This reverts commit 21fa170f0b
.
Is crashing. Oops.
2018-07-17 10:50:01 +02:00
Behdad Esfahbod
21fa170f0b
Implement C++11-style GCC builtin atomic ops
...
Hopefully fixes bots.
2018-07-16 17:58:02 +02:00
Behdad Esfahbod
804b59cf49
Relax C++11 atomic ops memory order to acquire-release
2018-07-16 15:45:22 +02:00
Behdad Esfahbod
bda242409f
Implement C++11 <atomic> operations
...
Fixes https://github.com/harfbuzz/harfbuzz/issues/345
2018-07-16 15:45:22 +02:00
Behdad Esfahbod
2aae617a84
Move _hb_alignof later again
...
It uses constexpr...
2018-07-11 17:27:23 +02:00
Behdad Esfahbod
f3a74c16ec
Make hb_vector_t 8 bytes smaller
2018-07-11 17:23:53 +02:00
Behdad Esfahbod
44999f8b75
Align NullPool and CrapPool to HB_VECTOR_SIZE
2018-07-11 17:21:32 +02:00
Behdad Esfahbod
20a318d06a
Fix return type of alignof() fallback
2018-07-11 17:00:13 +02:00
Behdad Esfahbod
2b76767bf5
1.8.3
2018-07-11 15:27:13 +02:00
Behdad Esfahbod
718dfd4189
Fix shift
2018-07-10 16:34:31 +02:00
Behdad Esfahbod
25aa411ac5
Put back include dependencies
2018-07-10 16:05:03 +02:00
Behdad Esfahbod
491d93bf74
Move more stuff from hb-private.hh to hb-dsalgs.hh
2018-07-10 16:03:31 +02:00
Behdad Esfahbod
f477765661
Move more stuff to hb-dsalgs.hh
2018-07-10 15:49:05 +02:00
Behdad Esfahbod
be7f664f72
Move hb_bytes_t to hb-dsalgs.hh
2018-07-10 15:23:08 +02:00
Behdad Esfahbod
7a00f7eb2e
Remove hb_auto_array_t
2018-07-10 14:42:10 +02:00
Behdad Esfahbod
be458eb059
Include more basic internal headers from hb-private.hh
2018-07-10 14:41:04 +02:00
Behdad Esfahbod
bddeb2b10c
Minor renamings of internal inline functions
2018-07-10 14:13:21 +02:00
Behdad Esfahbod
d652ef299d
Move hb_vector_t and hb_lockable_set_t to hb-dsalgs.hh
2018-07-10 14:05:00 +02:00
Behdad Esfahbod
9e53b08329
Move hb_stable_sort to hb-dsalgs.hh
...
Also, include hb-dsalgs.hh from end of hb-pricate.hh
2018-07-10 14:03:58 +02:00
Behdad Esfahbod
39f11d8e72
Minor
2018-07-10 14:01:39 +02:00
Behdad Esfahbod
763f878cc0
Fix syntax
...
Oops.
2018-07-10 13:47:41 +02:00
Behdad Esfahbod
83ea277178
Add posix_memalign() fallback
2018-07-10 13:17:27 +02:00
Behdad Esfahbod
292c100d61
Always compile (but not use) alignof() and round() fallback codes
...
Catches compile-errors in them better.
2018-07-10 13:16:52 +02:00
Behdad Esfahbod
27c5317d91
Fix alignof impl
2018-07-10 13:03:42 +02:00
Behdad Esfahbod
bca83618cd
Add fallback implementation for constexpr and alignof
2018-07-10 12:59:13 +02:00
Behdad Esfahbod
7cb47d0f3f
Minor
2018-07-10 12:59:13 +02:00
Cosimo Lupo
ccdd156554
src/Makefile.am: pass headers to gen-def.py as arguments, not env vars
2018-07-09 18:26:44 +01:00
Cosimo Lupo
e3a931ef0b
gen-def.py: pass headers as arguments so that msys2 can convert posix paths
...
When one is not using the msys2 python, the header files that are passed in as environment
variable cannot be found.
https://ci.appveyor.com/project/fonttools/ttfautohint-py/build/1.0.65/job/rkremny4jjid9nl2#L803
This is because msys2 shell and make use POSIX paths (e.g. /c/Users/clupo/...)
whereas non-msys2 python.exe uses native Windows paths (e.g. C:\Users\clupo\...).
Msys2 will automatically convert command line arguments (but not environment variables) from
POSIX to Windows paths when calling a native win32 executable, so we pass the header paths
as arguments instead of environment variables.
This way the gen-def.py script can support both mingw python running in an MSYS2 shell, and
native win32 python.
2018-07-09 18:11:33 +01:00
David Corbett
46d8f0d552
Do not enforce a native direction of LTR for Runic
...
Fixes #481
2018-07-08 17:18:25 +04:30
David Corbett
936dadc661
Regenerate the USE table for Grantha and Bhaiksuki ( #1090 )
...
Completes #1037 and fixes #1035 .
2018-07-07 19:38:17 +04:30
Behdad Esfahbod
1ebaa090d8
Disable vectorization
...
Disable vectorization for now. To correctly use them, we should
use posix_memalign() to allocate them. Otherwise, can cause
misaligned access.
https://bugs.chromium.org/p/chromium/issues/detail?id=860184
2018-07-05 14:04:13 +04:30
Behdad Esfahbod
18a06f8a66
Fix warning
...
../../src/hb-ot-layout-gsubgpos-private.hh:391:18: warning: missed loop optimization, the loop counter may overflow [-Wunsafe-loop-optimizations]
2018-07-05 14:03:48 +04:30
Behdad Esfahbod
058708a665
Allow disabling vector_size use
2018-07-05 13:16:00 +04:30
Ebrahim Byagowi
d8a7dedc83
Use CreateFileW explicitly and pass wchar_t to it ( #1087 )
2018-07-04 15:33:39 +04:30
Behdad Esfahbod
9940504e93
[indic] Adjust left-matra repositioning and Halant,ZWJ sequence
...
From the new code (first paragraph is from the OT Devanagari spec.):
/* o Reorder matras:
*
* If a pre-base matra character had been reordered before applying basic
* features, the glyph can be moved closer to the main consonant based on
* whether half-forms had been formed. Actual position for the matra is
* defined as “after last standalone halant glyph, after initial matra
* position and before the main consonant”. If ZWJ or ZWNJ follow this
* halant, position is moved after it.
*
* IMPLEMENTATION NOTES:
*
* It looks like the last sentence is wrong. Testing, with Windows 7 Uniscribe
* and Devanagari shows that the behavior is best described as:
*
* "If ZWJ follows this halant, matra is NOT repositioned after this halant.
* If ZWNJ follows this halant, position is moved after it."
*
* Test case, with Adobe Devanagari or Nirmala UI:
*
* U+091F,U+094D,U+200C,U+092F,U+093F
* (Matra moves to the middle, after ZWNJ.)
*
* U+091F,U+094D,U+200D,U+092F,U+093F
* (Matra does NOT move, stays to the left.)
Fixes https://github.com/harfbuzz/harfbuzz/issues/1070
Test case added with Adobe Devanagari.
2018-07-03 14:34:38 +04:30
Behdad Esfahbod
2cb075fe26
Fix unused function '_hb_mapped_file_destroy' if no mmap
2018-07-03 13:04:05 +04:30
Behdad Esfahbod
343e8c694b
1.8.2
2018-07-03 12:43:59 +04:30
Behdad Esfahbod
29e7879bcf
Disable .dfont code for now
...
The get_table imple was wrong, as table offsets in a dfont are
relative to the resource. We were treating them as relative to
the big blob itself. To be fixed.
Part of https://github.com/harfbuzz/harfbuzz/pull/1085
2018-07-03 12:38:21 +04:30
Ebrahim Byagowi
32348a43c1
Fix trak table apply logic
...
In collaboration with Behdad
2018-07-01 15:32:43 +04:30
Ebrahim Byagowi
225b92b7d4
Support dfont font files ( #949 )
2018-07-01 14:32:00 +04:30
Ebrahim Byagowi
5d8cafcf6a
Improve nommap naming and use C style comments on create_from_file ( #1084 )
2018-07-01 01:54:14 +04:30
Behdad Esfahbod
d3c0980ac2
Adjust MarkBasePos heuristic in presence of MultipleSubst
...
From the issue:
"In this font, the virama,ya first forms a ligature, then decomposes back to
virama,ya. This causes those two to be marked parts of a MultipleSubst
sequence. When attaching the matra, we look for the first of the MultipleSubst
sequence because that's where we attach to (because of eg #740 ). In this case,
the first glyph in the MultipleSubst sequence is a mark, so we skip it and
attach to the base char before it."
Font in question is Nirmala UI from Windows 10. Test sequence:
U+0926,U+094D,U+092F,U+0941
Fixes https://github.com/harfbuzz/harfbuzz/issues/1020
2018-06-30 15:59:25 +04:30
Behdad Esfahbod
8b9cbe3b24
[indic] Tweak for old-spec Bengali and halant-ya-halant
...
Fixes https://github.com/harfbuzz/harfbuzz/issues/1073
2018-06-30 12:28:39 +04:30
punchcutter
9541c9dae1
Rebase and update USE overrides for Bhaiksuki Gap Fillers and Grantha Anusvara
2018-06-30 10:02:34 +04:30
Behdad Esfahbod
7b8dfac560
[khmer] Fix infinite-loop in cluster merging
...
Indic shaper already had this check. We removed it when forking
Khmer shaper by mistake.
Fixes https://bugzilla.mozilla.org/show_bug.cgi?id=1464623
2018-06-30 09:16:54 +04:30
Ebrahim Byagowi
25970a93aa
armcc compatibility, don't use EINTR if doesn't exist
...
Fixes #1081
2018-06-28 14:32:36 +04:30
Ebrahim Byagowi
8a51f91b70
Minor on hb_blob_create_from_file, reuse ferror result
...
Oops
2018-06-28 13:22:21 +04:30
Ebrahim Byagowi
7b4099f35f
Minor, rename blob to data on blob_from_file
2018-06-27 16:54:44 +04:30
Ebrahim Byagowi
fa090ed4d4
Minor touches on hb_blob_create_from_file ( #1079 )
...
* Handle EINTR on fallback reader
* Increase fallback reader limitation size limitation to 2 << 28
* Ensure _O_BINARY does exist if MMAP is used on Windows
(maybe superfluous but makes me more confident)
2018-06-27 14:13:26 +04:30
Behdad Esfahbod
01dff1ea1a
Make round() fallback portable to systems that do have round()
...
Makes compiling without HAVE_ROUND on systems that do have it work.
2018-06-26 18:00:58 -04:00
Ebrahim Byagowi
7db2e9ea38
Minor on hb_blob_create_from_file
...
Add one more "unlikely" annotation and use explicit nullptr check for more consistency.
2018-06-26 10:46:10 +04:30
Ebrahim Byagowi
35ce8f31d3
Unify our pipe reader with the fallback reader ( #1068 )
...
And assign one bot to use the path always using NOMMAPFILEREADER token.
It's limited to 200mb so no more fun with using /dev/zero on hb-view!
2018-06-25 22:23:43 +04:30
Behdad Esfahbod
b2a1879187
In Coverage iterator, bail out if table smells
...
In particular, if CoverageFormat2 has unsorted ranges, bail out.
Otherwise, 64k ranges of each 64k glyphs can DoS closure() method.
We can do the same for CoverageFormat1, but that one does not expose
the quadratic behavior, so, fine.
2018-06-23 10:32:28 -04:00
Ebrahim Byagowi
941f2b8548
Support pipe and friends on hb_blob_create_from_file ( #1061 )
...
With this hb-view/hb-shape support pipes and possibly socket and named pipe
also, anything fails just on mmap.
We can later do the same for Windows also.
This however reveals two issues, the fact most of our bots don't have HAVE_MMAP and using
this instead the other fread/fopen reader can make failure on CI. I should look at them separately
this change however is very low risk I believe.
2018-06-18 20:35:40 +04:30
Behdad Esfahbod
3654d9be6b
1.8.1
2018-06-12 19:38:04 -04:00
Behdad Esfahbod
f6893ef82c
Move hb-version.h generation to Makefile
...
Fixes https://github.com/harfbuzz/harfbuzz/issues/864
Unfortunately 1.7.7 and 1.8.0 went out with the wrong hb-version.h contents.
2018-06-12 19:26:15 -04:00
Behdad Esfahbod
cc0b04f48f
[subset] Remove HB_SUBSET_BUILTIN
...
Just include hb-static.cc in libharfbuzz-subset.so source list as
well. Those building it built-in will include hb-static.cc once
already. No need for any gymnastics.
2018-06-12 18:24:54 -04:00
Behdad Esfahbod
ba0ea56efa
[substitute-closure] Rename function for clarity
2018-06-12 01:17:00 -04:00
Behdad Esfahbod
7b5ce41638
Whitespace
2018-06-12 01:17:00 -04:00
Behdad Esfahbod
c4d0d11c55
[vector] Always 0-fill new items
2018-06-12 01:17:00 -04:00
Behdad Esfahbod
a7e1b4a3b2
Fix compiler warning re reordering of initializations
2018-06-12 01:17:00 -04:00
Behdad Esfahbod
f56cd9df10
Style
2018-06-12 01:17:00 -04:00
Jonathan Kew
82484b05ca
[hb-set] Don't shrink vectors until after processing their contents.
...
Fixes #1054 .
2018-06-12 01:16:42 -04:00
Behdad Esfahbod
b8e406f0c7
More fixes for SunStudio 12.6 build
...
Followup to https://github.com/harfbuzz/harfbuzz/pull/1053
2018-06-10 17:22:38 -04:00
prrace
498e4373dc
Fix SunStudio 12.6 build ( #1053 )
2018-06-10 03:34:28 +04:30
Garret Rieger
46f7e7760f
[subset] Use REPLACEME instead of version.
2018-06-08 12:09:34 -06:00
Garret Rieger
feb23892a3
[subset] Use gsub closure if ot layout is not being dropped.
2018-06-08 12:09:34 -06:00
Garret Rieger
a5673da9be
[subset] Add drop_ot_layout setting to subset input.
2018-06-08 12:09:34 -06:00
Garret Rieger
57badadb76
[subset] add a new closure call to hb-ot-layout that can compute the closure over multiple lookups.
2018-06-06 17:50:12 -06:00
Behdad Esfahbod
11f1f4131b
[set] Add is_subset
...
New API:
+hb_set_is_subset()
2018-06-06 16:47:13 -07:00
Garret Rieger
45186b9b8c
[subset] Add memoization of GSUB lookup closures.
2018-06-06 16:53:50 -06:00
Behdad Esfahbod
78d92e0f27
Minorish
2018-06-06 15:24:43 -07:00
Behdad Esfahbod
676b19f0d1
Compiler gymnastics
...
Part of https://github.com/harfbuzz/harfbuzz/issues/630
2018-06-06 15:23:35 -07:00
Behdad Esfahbod
0a5952e8dd
Move prime_for back into map
...
This was causing problem on systems without visibility when map was used
from both libharfbuzz and libharfbuzz-subset. Sigh.
https://ci.appveyor.com/project/harfbuzz/harfbuzz/build/1.0.1669/job/dey47nmff0770vp3
2018-06-06 14:56:21 -07:00
David Corbett
a2a1484ef9
Convert Consonant_Initial_Postfixed to CONS_FINAL
...
Consonant_Initial_Postfixed was split off of Consonant_Succeeding_Repha,
so it should correspond to the same USE class, CONS_FINAL.
2018-06-06 11:06:16 -07:00
Behdad Esfahbod
9d3cd13c30
[ucdn] Update to Unicode 11
...
https://github.com/grigorig/ucdn/issues/19
2018-06-05 17:59:41 -07:00
Behdad Esfahbod
060e6b4a13
Update to Unicode 11.0.0
...
UCDN is not updated yet.
2018-06-05 17:31:46 -07:00
Behdad Esfahbod
105a3b5e2d
Minor
2018-06-05 15:31:04 -07:00
Behdad Esfahbod
df01f3e560
1.7.7
2018-06-05 15:18:16 -07:00
Behdad Esfahbod
ba3b6d6c65
[khmer] Fix Coeng vs Halant confusion
...
Test suite results are unchanged (34).
2018-06-05 12:06:50 -07:00
Ebrahim Byagowi
8220ef8a54
Fix hb_face_count build issue
...
I should've rebased #1002 before the merge, my bad
2018-06-05 22:50:53 +04:30
Ebrahim Byagowi
32da0c6bc4
Add hb_face_count, a new API ( #1002 )
...
Simply, it returns the number of faces on a font blob.
To be used on hb-sanitizer tool but other clients also
can benefit from it.
2018-06-05 18:56:26 +04:30
Behdad Esfahbod
4a115fe7fe
[sinhala] Move reph to after post-consonants
...
Apparently this changed between Win 7 and Win 10.
Fixes https://github.com/harfbuzz/harfbuzz/issues/967
To be continued in https://github.com/harfbuzz/harfbuzz/issues/1044
2018-06-04 15:40:43 -07:00
Behdad Esfahbod
58400a2ad8
Remove DISALLOW_* from vector, set, and map
...
Some of the build bots, still fail on this. I suppose mine pass because
I enable C++11...
Anyway, remove these again.
2018-06-02 20:30:09 -07:00
Behdad Esfahbod
f9abbf83b6
Fix fallout from 975bdd5ef5
...
Ouch!
2018-06-02 15:46:08 -07:00
Behdad Esfahbod
f7515769fd
[vector] Use Crap pool in push() as well
2018-06-01 17:48:37 -07:00
Behdad Esfahbod
975bdd5ef5
[vector] Keep success status
2018-06-01 17:37:13 -07:00
Behdad Esfahbod
1ab3c3ed1b
[vector] Whitespace
2018-06-01 17:34:24 -07:00
Behdad Esfahbod
fb07d1a3ce
Another attempt at making every compiler happy...
...
Sigh.
2018-06-01 17:32:07 -07:00
Behdad Esfahbod
4f76f956bb
[map] Move prime_for to hb-static
2018-06-01 17:28:47 -07:00
Behdad Esfahbod
33d6f46bbb
[set] Shrink page-map size again
2018-06-01 17:25:35 -07:00
Behdad Esfahbod
4ca211bce1
Fix hb_vector_size_t
2018-06-01 17:19:05 -07:00
Behdad Esfahbod
a7dd90f519
Revert "Remove HB_DISALLOW_COPY_AND_ASSIGN"
...
This reverts commit ff92de766b
.
Revert that and remove ASSERT_POD. Let's see which bots are
unhappy with this configuration...
2018-06-01 16:10:45 -07:00
Behdad Esfahbod
7b50bf52f2
Use NullPool for _hb_set_nil and _hb_map_nil
2018-05-31 20:20:17 -07:00
Behdad Esfahbod
f040ca40ab
[set] Minor
2018-05-31 20:15:21 -07:00
Behdad Esfahbod
7185b273b3
Rename in_error to !successful
...
Towards possibly using Null pool for some nil objects.
2018-05-31 20:03:34 -07:00
Behdad Esfahbod
353f4d2efc
Fix a whitespace inconsistency
...
Null() and Crap() are only places that there's no space before '('...
2018-05-31 19:52:16 -07:00
Behdad Esfahbod
e36cd1dfd3
Remove trivial HB_ATOMIC_INT_INIT()
2018-05-31 19:31:39 -07:00
Behdad Esfahbod
550a70f801
Use 0 as inert object reference value instead of -1
...
Towards using Null object for nil objects.
2018-05-31 19:28:04 -07:00
Behdad Esfahbod
dcd1b07eea
Add const OffsetTo<> dereference
...
Unused, but now that we have CrapPool, implement it.
2018-05-31 17:58:40 -07:00
Ebrahim Byagowi
2baa357ac7
Fix symbol export issue of prime_mod on Alpine bot
...
Apparently our gcc-6.4.0 on Alpine Linux distribution doesn't like defining static const
inside a method, lets put that on outside the classes.
2018-05-31 12:27:31 +04:30
Behdad Esfahbod
54800f8322
[map] Mark prime_for HB_INTERNAL
...
Trying to see if it fixes gcc-4.2 bots.
2018-05-30 16:26:50 -07:00
Behdad Esfahbod
d600e844aa
Add CrapOrNull
2018-05-30 16:25:57 -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
b3d45de6cf
[map] Fix size calculation
...
Don't know why I thought I should subtract one there...
2018-05-30 14:02:49 -07:00
Behdad Esfahbod
ff92de766b
Remove HB_DISALLOW_COPY_AND_ASSIGN
...
llvm-gcc-4.2 bot had this problem:
hb-private.hh:812: error: initializer specified for non-virtual method 'void hb_vector_t<Type, StaticSize>::operator=(const hb_vector_t<Type, StaticSize>&) [with Type = hb_user_data_array_t::hb_user_data_item_t, unsigned int StaticSize = 1u]'
Removing the delete didn't work with a constructor. So, remove constructor.
Just disallow assignment. Still better than nothing.
2018-05-29 18:48:45 -07:00
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
Behdad Esfahbod
d5b33f2fe1
[subset] hb_subset_input_t changes
2018-02-13 13:55:10 -08:00
Behdad Esfahbod
28e63a1287
Disable threadsafe static's for all libraries
...
Even in libharfbuzz-subset, we still will handle our own threadsafety
for statics.
2018-02-13 13:50:21 -08:00
Behdad Esfahbod
b969a82e30
Pass no-libstdc++ flags only to libraries suppressing it
2018-02-12 20:51:26 -08:00
Behdad Esfahbod
97a2f03200
[subset] Allocate bulk memory with malloc(), not calloc()
...
We use calloc() to allocate simple structs and set them to zero.
For bulk memory, use malloc() that doesn't zero.
2018-02-12 18:51:10 -08:00
Behdad Esfahbod
96f1f52ea3
Use hb_face_get_upem() instead of face->get_upem()
...
Such that hmtx accelerator can be used from libharfbuzz-subset.
2018-02-12 18:49:38 -08:00
Behdad Esfahbod
3d66f441cc
[subset] Remove unreachable code
...
sanitizer.sanitize never return nullptr.
2018-02-12 18:43:42 -08:00
Behdad Esfahbod
42040a273f
Allow libharfbuzz-subset to link to libstdc++
...
We want to use it instead of reinventing hashmap...
Also, don't change linker for ICU since libicu also uses libstdc++.
2018-02-12 18:41:36 -08:00
Ebrahim Byagowi
4af3c5e258
Move linker specifying to a better place
2018-02-12 18:39:42 -08:00
Rod Sheeter
d1a4d5616f
output format 12 as enc 10 to match how Roboto did it
2018-02-12 16:25:32 -08:00
Rod Sheeter
afb1da3a18
auto-completed the wrong gids_to_retain
2018-02-12 14:37:47 -08:00
Rod Sheeter
1330edc4fe
Use functions to get new gids. Avoid 0; fonttools drops it from cmap.
2018-02-12 14:29:23 -08:00
Garret Rieger
e8318188c0
[subset] Fix loca generation, was previously writing the original glyph starting offset.
2018-02-12 11:38:28 -08:00
Khaled Hosny
0b94d590d9
Rename --with-stdcpp → --with-libstdc++
...
Also improve wording a bit and fix make check in --with-libstdc++=yes.
2018-02-12 12:37:41 -07:00
Rod Sheeter
a5713bc2cb
we love all our groups
2018-02-12 11:30:57 -08:00
Rod Sheeter
692f86e569
drop GDEF, GPOS, GSUB, and dsig
2018-02-12 11:30:57 -08:00
Garret Rieger
83e1ef9215
[subset] Set the new number of glyphs in maxp.
2018-02-12 11:22:50 -08:00
Garret Rieger
427f9e4b90
Don't force loca version to long.
2018-02-12 11:18:28 -08:00
Garret Rieger
5df080bf15
Destroy the subset plan at the end of subsetting.
2018-02-12 10:15:59 -08:00
Rod Sheeter
0301e5be28
Build a working cmap format 12
2018-02-12 10:12:11 -08:00
Rod Sheeter
ebd31d376d
subset for real
2018-02-12 10:10:08 -08:00
Rod Sheeter
62c7d677e8
C-style comments
2018-02-12 10:09:35 -08:00
Ebrahim Byagowi
91f0d51f05
Fix symbol exporting issue on msys2 and ✅ bringing all the bots ( #781 )
2018-02-12 17:20:12 +03:30
Ebrahim Byagowi
133e17fe23
Minor
2018-02-12 15:24:22 +03:30
Ebrahim Byagowi
16f5b53eec
Minor, don't skip the whole test when one .def file not found
2018-02-12 15:18:13 +03:30
Ebrahim Byagowi
a9b650d384
Apply check-defs.sh to -icu and -subset, toward mingw fix ( #780 )
2018-02-12 15:10:13 +03:30
Ebrahim Byagowi
2efc896550
Add --with-stdcpp for ossfuzzer and mupdf use ( #770 )
2018-02-12 12:00:07 +03:30
Behdad Esfahbod
7747bdb11b
Remove linker selection from hb-ucdn
...
Since this is a convenience library, it's not actually linked. Or so I think.
Hoping this might fix this Appveyor failure:
https://ci.appveyor.com/project/harfbuzz/harfbuzz/build/job/9884jyb5vryja9pw
Making all in hb-ucdn
make[4]: Entering directory '/c/projects/harfbuzz/src/hb-ucdn'
CC libhb_ucdn_la-ucdn.lo
GEN libhb-ucdn.la
/bin/sh: libhb_ucdn_la-ucdn.lo: command not found
make[4]: *** [Makefile:404: libhb-ucdn.la] Error 127
make[4]: Leaving directory '/c/projects/harfbuzz/src/hb-ucdn'
make[3]: *** [Makefile:2548: all-recursive] Error 1
make[3]: Leaving directory '/c/projects/harfbuzz/src'
make[2]: *** [Makefile:1382: all] Error 2
make[2]: Leaving directory '/c/projects/harfbuzz/src'
make[1]: *** [Makefile:486: all-recursive] Error 1
make[1]: Leaving directory '/c/projects/harfbuzz'
make: *** [Makefile:418: all] Error 2
2018-02-11 19:12:52 -08:00
Behdad Esfahbod
90d1c740c3
Add MSVC to no-visibility list
2018-02-11 19:08:59 -08:00
Behdad Esfahbod
0db6c6f214
Add Sun compiler to no-visibility as well
...
Fixes https://github.com/harfbuzz/harfbuzz/pull/776
2018-02-11 18:29:01 -08:00
Behdad Esfahbod
dde6448379
Another try at fixing multiple-defintion of NullPool
...
This one might do it...
2018-02-11 18:24:22 -08:00
Behdad Esfahbod
41906cd5ef
[subset] Another fixup
...
I broke this in c31fcf4c58
2018-02-11 19:46:06 -06:00
Behdad Esfahbod
cd32177a32
Try at fixing multiple-definition of NullPool
...
If we don't have visibility, make NullPool static.
2018-02-11 19:36:00 -06:00
Behdad Esfahbod
3d421ce307
[subset] Use auto_array_t where it does make sense
...
Better fix for https://github.com/harfbuzz/harfbuzz/pull/775
2018-02-11 19:01:44 -06:00
Behdad Esfahbod
9aa2eb61e6
Minor
2018-02-11 19:00:49 -06:00
Ebrahim Byagowi
c8d4c2e32f
Initialize bad_indices on hb-subset ( #775 )
2018-02-11 13:15:44 +03:30
Ebrahim Byagowi
5845e5ca3b
fix gobject compile issue ( #773 )
2018-02-11 12:03:33 +03:30
Behdad Esfahbod
9b5af3ec7f
[gpos] Adjust mark attachment heuristic
...
Hopefully it...
fixes https://github.com/harfbuzz/harfbuzz/issues/740
2018-02-10 21:50:44 -06:00
Behdad Esfahbod
7039803b51
Fix djgpp bot
2018-02-10 15:47:50 -06:00
Behdad Esfahbod
cdab20df1e
Minor
2018-02-10 15:45:17 -06:00
Ebrahim Byagowi
203b647530
Favor use of static instead HB_INTERNAL
2018-02-10 15:44:09 -06:00
Behdad Esfahbod
43314ff4c0
More fixes
...
test-subset-glyf still failing. No idea why :(
2018-02-10 15:40:03 -06:00
Behdad Esfahbod
a981d798ea
Fix more build issues
...
Hopefully most bots come back with this...
2018-02-10 15:19:27 -06:00
Ebrahim Byagowi
6c4ca6135a
Hide more symbols of hb-subset ( #771 )
2018-02-11 00:42:06 +03:30
Behdad Esfahbod
c31fcf4c58
[subset] Replace auto_array with prealloced_array
...
auto_array has constructor/destructor. Cannot be used in POD object, as the clang
bots all noticed...
2018-02-10 14:20:10 -06:00
Behdad Esfahbod
931d67900e
Fix some other bots
2018-02-10 14:11:16 -06:00
Behdad Esfahbod
bfa871634c
Minor
2018-02-10 14:06:53 -06:00
Ebrahim Byagowi
844f48ea9a
Fix symbol exporting and libstdc++ linkage of hb-subset ( #769 )
2018-02-10 23:13:12 +03:30
Behdad Esfahbod
91519c6a5b
[aat] Add buffer messages
2018-02-10 13:35:17 -06:00
Behdad Esfahbod
af274507c4
Minor
2018-02-10 13:25:49 -06:00
Behdad Esfahbod
570d523761
[subset] Merge remote-tracking branch 'googlefonts/master'
2018-02-10 13:24:22 -06:00
Behdad Esfahbod
71130a20fa
Replace Supplier.advance with Supplier::operator+=
2018-02-10 13:15:57 -06:00
Ebrahim Byagowi
ad575a5f47
Fix cast warnings on clang ( #768 )
2018-02-10 19:50:11 +03:30
Garret Rieger
d18decd201
In glyf subsetting add suport for writing out a short loca table when possible.
2018-02-09 18:41:21 -08:00
Rod Sheeter
9275bd03ea
First pass at building a cmap
2018-02-09 17:40:52 -08:00
Garret Rieger
d2170d1478
Check for failures from add table.
2018-02-09 17:27:23 -08:00
Rod Sheeter
4816064c0e
add missing return
2018-02-09 17:14:37 -08:00
Garret Rieger
0089443756
Keep a second set of glyph ids in subset plan which is sorted by glyph id and always has gid 0
2018-02-09 16:22:09 -08:00
Garret Rieger
3bc81558d8
Formatting for hb-subset-plan.
2018-02-09 16:06:33 -08:00
Behdad Esfahbod
8cef3a6199
Try fixing build with Sun Studio
...
Trying to fix:
https://circleci.com/gh/harfbuzz/harfbuzz/6635
Also part of:
https://github.com/harfbuzz/harfbuzz/issues/630
2018-02-09 16:04:23 -06:00
Garret Rieger
86aa4b3ba7
Return empty face on hb_subset failure instead of null. Plus some minor cleanups for _add_head_and_set_loca_version
2018-02-09 13:54:43 -08:00
Behdad Esfahbod
d45f240e4e
Typo
2018-02-09 15:51:45 -06:00
Behdad Esfahbod
3b7aa651b4
[docs] Improve UNSAFE_TO_BREAK docs
2018-02-09 15:43:20 -06:00
bungeman
671f0a7733
Documentation for HB_GLYPH_FLAG_UNSAFE_TO_BREAK.
...
HB_GLYPH_FLAG_UNSAFE_TO_BREAK means that the glyph with this flag is somehow affected by the previous logical glyph (the previous index in the buffer if ltr and the next index if the buffer is rtl). If these two glyphs are separated by a break (line or otherwise) then the underlying text should be re-shaped on both sides up to corresponding position in the text of some glyph not marked with this flag.
2018-02-09 15:39:45 -06:00
Garret Rieger
1582eabee6
Update head table with loca format selected by glyf+loca subsetting.
2018-02-09 12:52:08 -08:00
Garret Rieger
335bbaa66f
Remove uneeded code in hb-subset.
2018-02-09 10:55:15 -08:00
Rod Sheeter
1cd98d05e0
Create the groups for a cmap format12. Does not yet build the actual table.
2018-02-08 19:39:57 -08:00
Rod Sheeter
59c658c8d5
capture codepoints sorted so we can use them for cmap later. one day we will have a map
2018-02-08 19:22:47 -08:00
Rod Sheeter
5cca0c07af
fix comment
2018-02-08 19:05:46 -08:00
Rod Sheeter
a19138e668
comment the serialization of table
2018-02-08 19:04:06 -08:00
Garret Rieger
5a34114f96
Add an extra entry to the end of the loca table to identify the end of the last glyph's data.
2018-02-08 18:32:24 -08:00
Garret Rieger
aac7d96212
Apply per table subsetting while building the new face in hb_subset.
2018-02-08 18:18:16 -08:00
Behdad Esfahbod
9682ef135f
Minor fixups
2018-02-08 17:35:57 -06:00
Garret Rieger
42234424a0
Fix include gaurds and include order in hb-subset-glyf and hb-subset-plan
2018-02-08 17:31:11 -06:00
Garret Rieger
8e9fd6f1ab
Implement basic loca (long version only) subsetting.
2018-02-08 17:31:11 -06:00
Garret Rieger
f9c665fed1
Update interface to hb-subset-glyf to subset glyf and loca.
2018-02-08 17:31:11 -06:00
Garret Rieger
217ed5e3c8
Cleanups in hb-subset-glyf and hb-subset-plan.
2018-02-08 17:31:11 -06:00
Rod Sheeter
13193a9b97
move to the hb_face_t dest pattern
2018-02-08 17:31:11 -06:00
Rod Sheeter
0859a00669
sketch a subset<T> and call it for cmap. Add subset to cmap, albeit not working even for the msot basic case just yet
2018-02-08 17:31:11 -06:00
Behdad Esfahbod
c1ab95dd90
Fix overflow in space fallback shaping
...
Fixes https://bugs.chromium.org/p/chromium/issues/detail?id=657466
2018-02-08 17:22:07 -06:00
Behdad Esfahbod
b220b5a444
Avoid undefined-behavior in fallback mark positioning
...
Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=5584
2018-02-08 17:14:52 -06:00
Behdad Esfahbod
3b68a03a1c
[fuzzer] Minor
2018-02-08 17:00:37 -06:00
Behdad Esfahbod
5021ba2a21
[aat] Minor
2018-02-08 15:11:28 -06:00
Behdad Esfahbod
77ad8b5c8b
TODO
2018-02-07 21:54:33 -06:00
Behdad Esfahbod
941bbd9f25
[subset] Fix thinko
2018-02-07 21:49:01 -06:00
Behdad Esfahbod
931f8b7eb5
Fix another thinko
2018-02-07 21:42:03 -06:00
Behdad Esfahbod
39b86695cf
[subset] Fix thinko
2018-02-07 21:37:03 -06:00
Behdad Esfahbod
eeffabc875
Build
2018-02-07 21:34:05 -06:00
Behdad Esfahbod
c479a59988
[subset] Assemble font
2018-02-07 21:26:04 -06:00
Behdad Esfahbod
34ac3548b7
[set] Respect stride
...
Ouch!
2018-02-07 18:07:45 -06:00
Behdad Esfahbod
577becaf7b
[subset] Fixup
2018-02-07 17:38:40 -06:00
Behdad Esfahbod
c9acab3cfb
Whitespace
2018-02-07 17:28:43 -06:00
Behdad Esfahbod
7fd0b61dee
[subset] Create new face and copy all tables to it
...
test-subset fails now because subset-face does not know how to compile itself.
2018-02-07 17:28:43 -06:00
Garret Rieger
4e1abe2ce0
Refactor subset glyf to remove multiple calls to glyf.fini()
2018-02-07 17:28:43 -06:00
Garret Rieger
0a5d1440f8
Add implementation of glyf subsetting.
2018-02-07 17:28:43 -06:00
Garret Rieger
05d65baa1b
Extract glyf offset calculation into it's own method.
2018-02-07 17:28:43 -06:00
Behdad Esfahbod
6d7c6e19dc
Fix two undefined-behavior issues
...
Fixes https://github.com/harfbuzz/harfbuzz/issues/761
Fixes https://github.com/harfbuzz/harfbuzz/issues/762
2018-02-07 14:09:56 -06:00
Behdad Esfahbod
b87cbe2bec
Try fixing build for platforms that have no visibility attributes
2018-02-07 14:11:26 -05:00
Behdad Esfahbod
6804b61d2e
[subset] Add hb_subset_face
...
It's a hb_face_t that has add_table() and in the future knows how to
compile itself into a font blob.
2018-02-07 13:47:35 -05:00
Behdad Esfahbod
af02812fc5
[subset] Change hb_subset API to remove hb_subset_face_t
2018-02-07 13:07:46 -05:00
Behdad Esfahbod
2da0d87e76
Remove NullPool visibility hack
...
We keep a separate private NullPool in libharfbuzz-subset.so
This can fire back later since now there are two separate null objects,
and comparisons to the null pool can be confused. Something to deal
with when it comes up. Ouch!
2018-02-07 12:44:35 -05:00
Rod Sheeter
b95aa204ee
glyph ids to retain should most likely keep the glyph id not the codepoint
2018-02-07 12:41:21 -05:00
Rod Sheeter
91428713bd
Remove \ns leftover from fprintf
2018-02-07 12:41:21 -05:00
Rod Sheeter
eb485bb9e9
Horrid hack to assign new gids. Use DEBUG_MSG over fprintf
2018-02-07 12:41:21 -05:00
Rod Sheeter
8b80cbb1dd
Add a subset debug category
2018-02-07 12:41:21 -05:00
Behdad Esfahbod
ee433d36fa
[aat] Set debug lookup_index
2018-02-07 12:41:21 -05:00
Rod Sheeter
38df1ec8e0
TEMPORARY: remove HB_INTERNAL from null pool so subset builds again
2018-02-07 12:41:21 -05:00
Garret Rieger
53aa0e9542
Add an instance of glyf::accelerator_t to hb-subset-glyf.
2018-02-07 12:41:21 -05:00
Rod Sheeter
ef62dfed3f
add back assert_pod
2018-02-07 12:41:21 -05:00
Rod Sheeter
d0ce3c66e2
Resolve codepoints:glyph ids. Does not compile; undefined reference to OT::_hb_NullPool
2018-02-07 12:41:21 -05:00
Garret Rieger
6a45e5df24
Add skeleton of hb-subset-glyf, call if from hb_subset(...)
2018-02-07 12:41:21 -05:00
Garret Rieger
31ec3c2ec4
Create a subset plan in hb_subset.
2018-02-07 12:41:21 -05:00
Garret Rieger
25e9173fe8
Make hb-subset-plan private.
2018-02-07 12:41:21 -05:00
Garret Rieger
af46a4da5a
Move definition of hb_subset_input into hb-subset-private.hh.
2018-02-07 12:41:21 -05:00
Garret Rieger
7481f0ce21
Add codepoints to subset input.
2018-02-07 12:41:21 -05:00
Garret Rieger
1cfe650f02
Add a basic sketch of hb-subset-plan.
2018-02-07 12:41:21 -05:00
Behdad Esfahbod
126ffdbe95
[aat] Fix debug compile
2018-02-07 12:26:57 -05:00
Behdad Esfahbod
2971e9da49
[aat] Adjust unsafe-to-break logic some more
...
I believe I'm happy with it now.
2018-02-06 11:48:04 -05:00
Behdad Esfahbod
f49256d80f
[aat] Simplify unsafe-to-break logic
2018-02-06 11:39:36 -05:00
Behdad Esfahbod
cc1e0840ba
[buffer] Tweak diff re glyph_flags again
...
We expect the buffer to have no flags that the reference doesn't...
Meh. Makes MORX tests pass now. Need to better define the behavior.
2018-02-06 10:20:48 -05:00
Ebrahim Byagowi
d49ae5154e
Fix hb-buffer logic error
2018-02-06 10:13:11 -05:00
Behdad Esfahbod
f41b92134a
Fix fallthrough compiler warning with gcc >= 7
...
Fixes https://github.com/harfbuzz/harfbuzz/issues/755
2018-02-05 19:51:09 -05:00
Behdad Esfahbod
0ff007daaa
[subset] Minor
2018-02-05 19:36:38 -05:00
Behdad Esfahbod
ae39fc8171
[subset] Build hb-subset into separate libharfbuzz-subset.so
2018-02-04 20:18:52 -05:00
Behdad Esfahbod
257022b178
Merge pull request #745 from googlefonts/master
...
Interface for hb_subset, skeleton for the hb-subset cli, and basic testing rigging.
2018-02-04 20:01:35 -05:00
Behdad Esfahbod
54e6efadd6
[aat] Fix unsafe-to-break
...
At any position, if state is not zero, mark unsafe-to-break before,
unless we can reason it safe.
At any position, if there's an action entry for end-of-text, mark
unsafe to break.
Also changes buffer diff impl to allow for flag differences as long
as the buffer glyph flags are superset of reference glyph flags.
With this, all MORX tests pass.
2018-02-04 17:18:54 -05:00
Garret Rieger
f83a43b561
Add CMake configuration for all of the new subsetting code.
2018-02-04 12:57:34 -08:00
Garret Rieger
34fa7b3ad2
Whitespace
2018-02-04 12:57:34 -08:00
Garret Rieger
8c3a672737
Get test-subset to pass.
2018-02-04 12:57:34 -08:00
Garret Rieger
74d39ed263
Attach add a hb_face_t to hb_subset_face_t.
2018-02-04 12:57:34 -08:00
Garret Rieger
a2965f2ea5
Add a basic implementation of hb-subset to enable compilation of test-subset.
2018-02-04 12:57:33 -08:00
Garret Rieger
cf403e1a53
Add hb-subset.h to hb.h
2018-02-04 12:57:33 -08:00
Garret Rieger
c02573516c
Fix typo in hb-subset.h
2018-02-04 12:57:33 -08:00
Rod Sheeter
9ccb8366f6
Start to sketch APIs for subsetting
2018-02-04 12:57:33 -08:00
Behdad Esfahbod
89b1906d99
[aat] More adjustment to ContextualSubtable
...
See comment.
With this, MORX-20 passes if I turn --verify off. Our unsafe-to-break
logic is currently broken in presence of end-of-text actions. That's,
ugh, extra work to fix. Let me try...
2018-02-04 14:45:02 -05:00
Behdad Esfahbod
8be596f0b7
[aat] In ContextualSubstitute, apply end-of-text action to last glyph
2018-02-04 14:40:17 -05:00
Behdad Esfahbod
c0b1c7eb2e
[aat] Remove unneeded check
2018-02-04 14:19:41 -05:00
Behdad Esfahbod
aed32589af
[aat] In ContextualSubtable, mark mark after substituting mark
...
Fixes MORX-21.
2018-02-04 12:36:54 -05:00
Behdad Esfahbod
fe5f9b1ae3
[aat] Fix ContextualSubtable sanitization
...
Fixes MORX-18, MORX-19, and MORX-22.
2018-02-04 12:36:54 -05:00
Bruce Mitchener
e8859fca3e
Enable use of atexit() on macOS and related platforms.
...
The atexit() man page indicates that this is expected to behave
in the expected way on unloading of shared libraries.
2018-02-03 19:20:40 -08:00
Bruce Mitchener
a89573770b
Use nullptr, not NULL.
2018-02-03 21:26:58 +02:00
David Corbett
ccb0367dae
Let VS1 follow U+1031 MYANMAR VOWEL SIGN E
2018-02-02 12:41:07 -08:00
punchcutter
c6dbf6e77c
Allow optional ZWJ in virama terminated cluster
2018-01-31 14:16:25 -08:00
Bruce Mitchener
dae20fb5a7
Use nullptr instead of 0.
2018-01-31 08:18:48 -08:00
Bruce Mitchener
90218fa93c
Fix typos.
2018-01-31 08:18:15 -08:00
Bruce Mitchener
148ca61075
[ot-layout] Fix nullptr dereference.
...
If the `calloc` for `gsub_accels` or `gpos_accels` fails, then the
unlikely branch afterwards can be taken, which frees up the
`hb_ot_layout_t`, but since those fields can now be `nullptr`, then
we don't want to dereference them.
2018-01-31 08:05:25 -08:00
Bruce Mitchener
0c66043a92
[coretext] Fix memory leaks.
...
In `reference_table`, if the data is empty and we return early,
we still need to release the data object.
In `hb_coretext_shape`, there two edge cases where an early
return should release the attributed string.
2018-01-31 08:04:15 -08:00
Behdad Esfahbod
e89df6e1ae
[aat] Limit number of DontAdvance transitions
...
Remove the faulty loop-detection logic. Use max-ops for breaking
out of infinite loops or heavy work.
https://twitter.com/behdadesfahbod/status/958065026262183936
2018-01-30 11:01:18 -08:00
Ebrahim Byagowi
55cae0d72e
[test] Use 'otool -L' where ldd doesn't exist (macOS) ( #732 )
2018-01-29 18:05:24 +03:30
David Corbett
2ec7dd1f6c
Fix Travis build on macOS ( #731 )
2018-01-29 02:18:28 +03:30
Behdad Esfahbod
12757b6929
Misc warning fixes
...
Fixes https://github.com/harfbuzz/harfbuzz/issues/712
2018-01-26 18:14:05 -08:00
bungeman
85be365ed9
Use KernSubTableFormat2::rightClassTable
...
Issue originally reported at http://cppfiles.com/chromium.txt .
This fixes what appears to be a copy - paste issue which causes both
KernSubTableFormat2::rightClassTable and the 'right' argument to
KernSubTableFormat2::get_kerning to go unused.
2018-01-26 15:20:18 -08:00
Bruce Mitchener
19a93fcf19
Fix typos.
2018-01-21 10:33:54 -08:00
Behdad Esfahbod
51ce3828e6
[aat] Fix Ligature matching
...
I hope... Makes "ffi" work with Zapfino. I'm not sure if doing it correctly though...
2018-01-19 18:37:58 -08:00
Behdad Esfahbod
bef509855c
[aat] Add TODO
2018-01-19 18:24:00 -08:00
Behdad Esfahbod
e6f283ed7d
[aat] Implement LigatureSubtable
...
We form the Zapfino ligature now. Yay! No further testing done.
2018-01-19 18:09:48 -08:00
Behdad Esfahbod
f07ce661a2
[aat] Embed a sanitizer context in hb_aat_apply_context_t
...
For run-time checking.
2018-01-19 16:52:01 -08:00
Behdad Esfahbod
046690a4df
[aat] Add hb_aat_apply_context_t
2018-01-19 16:40:13 -08:00
Behdad Esfahbod
fd03449094
Rename hb_apply_context_t to hb_ot_apply_context_t
2018-01-19 16:40:13 -08:00
Behdad Esfahbod
94b49beee9
Whitespace
2018-01-19 16:40:13 -08:00
Cosimo Lupo
c8f2a4f5b9
hb-common.cc: Hatran script is right-to-left ( #714 )
...
"Hatran is written from right to left horizontally"
http://www.unicode.org/L2/L2012/12312-n4324-hatran.pdf
This ancient script was added with Unicode 8.0.
Also this spreadsheet (referenced in an inline comment in the
source code) has it as RTL: http://goo.gl/x9ilM
2018-01-19 01:19:40 +03:30
Ebrahim Byagowi
00806149b9
Improve avoiding C++ linkage, definition creation and cmake tests ( #710 )
2018-01-19 01:12:31 +03:30
Behdad Esfahbod
461a605fde
[aat] Allocate set dynamically
2018-01-17 10:02:48 -08:00
Behdad Esfahbod
949f6af289
Disallow sanitize recursing into Extension subtables multiple times
...
Fixes https://oss-fuzz.com/v2/testcase-detail/5216838347653120
which is a stack overflow, not by way of infinite recursion, just
being deep. That's disallowed anyway, so catch it as it happens,
not afterwards.
2018-01-15 20:44:10 -05:00
Behdad Esfahbod
bcb6f1ae0a
Whitespace
2018-01-15 20:34:05 -05:00
Behdad Esfahbod
12fffce10e
[aat] Sanitize classTable in StateTable
2018-01-15 15:41:51 -05:00
Behdad Esfahbod
e6263c7142
[aat] Wire up table length to apply()
2018-01-15 15:37:55 -05:00
Behdad Esfahbod
679ae744d0
[aat] Towards implementing LigatureSubtable
2018-01-14 15:03:31 -05:00
Behdad Esfahbod
c9e12a2b9b
Fix set initializer
2018-01-13 17:05:12 +00:00
Behdad Esfahbod
9009b341c4
[aat] Fix some struct sizes
...
I hate it that with my compiler at least, it doesn't catch totally uncompilable
statements in templates if they are not used...
2018-01-12 12:04:53 +01:00
Behdad Esfahbod
57051b4f67
[aat] Flush rest of buffer if state machine failed
2018-01-12 11:42:25 +01:00
Behdad Esfahbod
25364c4f00
[aat] Fix symbol visibility
...
Not sure why only one of the bots sees this as visible...
2018-01-12 11:31:20 +01:00
Behdad Esfahbod
ee16b9d8d3
Revert accidental morx enablement
2018-01-12 11:28:09 +01:00
Behdad Esfahbod
cdfa801ff4
[aat] Tweak previous commit
2018-01-12 11:12:20 +01:00
Behdad Esfahbod
f7600228a4
[aat] Detect infinite-loops in state machine
2018-01-12 11:09:21 +01:00
Behdad Esfahbod
dd38db523a
[aat] Fix more builds
...
Maybe I should disable C++11 detection such that my compiler also catches
these. Doesn't look like we can switch to it for a while anyway...
2018-01-12 09:45:42 +01:00
Behdad Esfahbod
72cb2b1f57
[aat] Fix builds
2018-01-12 09:38:55 +01:00
Ting-Wei Lan
e3a15d0c6d
Update _POSIX_C_SOURCE to the latest version
...
Defining _POSIX_C_SOURCE to an old version on FreeBSD can cause C99 to
be disabled in libc.
2018-01-12 09:19:41 +01:00
Behdad Esfahbod
c70d58f97d
[aat] Port RearrangementSubtable to StateTableDriver
2018-01-12 00:08:22 +01:00
Behdad Esfahbod
117cfe7bb7
[aat] Add StateTableDriver and convert ContextualSubtable to it
2018-01-12 00:01:36 +01:00
Behdad Esfahbod
1f1c85a54a
[aat] Remove 'mort' support
...
It's dead, Jim!
2018-01-11 22:43:57 +01:00
Behdad Esfahbod
7e2fed6d73
[aat] Allow DontAdvance
...
Apparently CoreText does allow these. To be done: detect infinite
loops.
Fixes MORX-12 test.
2018-01-11 19:25:21 +01:00
Behdad Esfahbod
17f01aff91
[aat] Sanitize ContextualSubtable
2018-01-11 18:54:49 +01:00
Behdad Esfahbod
9b82aa19d8
More warning fixes
2018-01-11 18:19:42 +01:00
Behdad Esfahbod
680cbc2eb3
[aat] Sanitize StateTable
2018-01-11 18:15:53 +01:00
Behdad Esfahbod
0e3b3379a0
[aat] Actually fix d887f93148
2018-01-11 18:01:10 +01:00
Behdad Esfahbod
3f291ffd5a
[buffer] Fix compiler warnings
...
line 323: Warning: info hides hb_buffer_t::info
...
2018-01-11 17:57:46 +01:00
Behdad Esfahbod
d887f93148
[aat] Make bots happy
...
Don't know why this is not caught by my compiler. Looks like clang catches it
while gcc doesn't.
In file included from ../src/hb-aat-layout-morx-table.hh:31:
../src/hb-aat-layout-common-private.hh:523:30: error: no member named 'static_size' in 'AAT::ContextualSubtable<AAT::MorxTypes>::EntryData'
DEFINE_SIZE_STATIC (4 + T::static_size);
~~~^
2018-01-11 17:41:34 +01:00
Behdad Esfahbod
f6be730994
[aat] In NoncontextualSubtable, handle MarkLast with end-of-line transition
...
Fixes MORX-11 test.
2018-01-11 15:23:24 +01:00
Behdad Esfahbod
f9be673814
[aat] Implement ContextualSubtable
...
Tested with Zapfino and text "2nd". Sascha will create tests later.
2018-01-11 15:15:36 +01:00
Behdad Esfahbod
335a9c1fe4
[aat] Towards implementing ContextualSubtable
2018-01-11 15:15:36 +01:00
Behdad Esfahbod
62348f647f
[aat] Implement end-of-text in state machine
...
Passes MORX-10 test now.
2018-01-11 15:15:36 +01:00
Behdad Esfahbod
9adbd938fa
Minor
2018-01-11 15:15:36 +01:00
Behdad Esfahbod
94644d7ea4
[aat] Generate finegrained unsafe-to-break in state-machine!
...
Neato.
2018-01-11 11:49:07 +01:00
Behdad Esfahbod
994eb7744c
[buffer] Fix crash
2018-01-11 11:37:12 +01:00
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
Behdad Esfahbod
eeb26d21d4
[set] Actually commit fixes mentioned in previous commit!
2017-12-02 15:22:04 -08:00
Behdad Esfahbod
0744149cda
[set] Protect against bad input in hb_set_add_range()
2017-12-02 15:06:15 -08:00
Behdad Esfahbod
d5e29303db
[coretext] Add hb_coretext_font_create()
...
Fixes https://github.com/harfbuzz/harfbuzz/issues/628
New API:
hb_coretext_font_create()
2017-12-02 14:52:57 -08:00
Behdad Esfahbod
9d0194b3a8
[set] Optimize add_range() some more
...
It's as good as it gets, and seems to be on par with previous set implementation
in my benchmark.
Would be great if someone can double-check my bitops.
2017-12-01 13:56:06 -08:00
Behdad Esfahbod
438c325a25
[set] Optimize add_range()
...
With new set implementation, this became really costy. Optimize it.
There's more to be done, but this shaves off most of the fat.
Part of fixing https://bugs.chromium.org/p/chromium/issues/detail?id=782220
2017-12-01 13:34:14 -08:00
Behdad Esfahbod
be9e307a88
[ot] Ensure layout in hb_ot_layout_table_get_lookup_count()
2017-12-01 12:37:05 -08:00
Behdad Esfahbod
16fba5b215
[ot] Fix Extension type recurse to disallow recursing to another Extension
...
Particularly hazardous if the second layer mixes forward and backward lookups.
Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=4336
2017-11-29 16:08:11 -08:00
David Corbett
9f259769a6
Categorize U+A8B4 as Consonant_Medial
2017-11-21 13:48:32 -08:00
Behdad Esfahbod
8d55340593
Fix fallback positioning of double diacritic marks
...
Fixes https://bugzilla.gnome.org/show_bug.cgi?id=787284
2017-11-20 19:43:22 -08:00
David Corbett
87d74605f5
Categorize U+0C80 as Consonant_Placeholder
2017-11-20 13:10:28 -08:00
ebraminio
7c6937e7c7
Move all references of old url to the new address ( #622 )
2017-11-20 14:49:22 -05:00
Behdad Esfahbod
baf7779d2d
Limit how much recursion GSUB/GPOS does
...
This only counts recursions right now. Good start.
Hopefully...
Fixes https://github.com/behdad/harfbuzz/issues/429
2017-11-14 21:55:37 -08:00
Behdad Esfahbod
173dab6300
Minor move
2017-11-14 21:27:24 -08:00
Behdad Esfahbod
c6173a392c
Add Offset16 and Offset32
2017-11-14 21:09:03 -08:00
Behdad Esfahbod
6f335ed1e5
Replace USHORT/SHORT/ULONG/etc with UINT16/INT16/UINT32/etc
2017-11-14 21:06:07 -08:00
Behdad Esfahbod
a130ee6df5
Remove a couple of unused consts
2017-11-14 20:30:03 -08:00
Behdad Esfahbod
e20e47eaa1
[glyf] Try fixing undefined-behavior
...
Might fix https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=1463
2017-11-14 20:25:29 -08:00
Behdad Esfahbod
7b40876a58
[ot] Remove unneeded TODO item
...
Looks like hb-ot-font is complete after all!
CFF font names and CFF glyph metrics don't work though...
2017-11-14 20:22:05 -08:00
Behdad Esfahbod
eab4feb5e2
[hmtx] Use curiously recurring template pattern
...
https://en.wikipedia.org/wiki/Curiously_recurring_template_pattern
2017-11-14 20:17:15 -08:00
Behdad Esfahbod
977ddff1f1
[ot] Move hb_ot_face_cmap_accelerator_t
2017-11-14 20:06:19 -08:00
Behdad Esfahbod
a7f15959b5
Shuffle
2017-11-14 20:02:24 -08:00
Behdad Esfahbod
a85d7ead04
[ot] Move hb_ot_face_metrics_accelerator_t
2017-11-14 20:00:34 -08:00
Behdad Esfahbod
f00a94e1ec
Adjust privacy for recent changes
2017-11-14 19:54:48 -08:00
Behdad Esfahbod
7e2839c438
[ot] Move hb_ot_face_glyf_accelerator_t
2017-11-14 19:52:29 -08:00
Behdad Esfahbod
c4e18e54dc
[ot] Move hb_ot_face_cbdt_accelerator_t
2017-11-14 19:52:26 -08:00
Behdad Esfahbod
9b04b0384f
[ot] Fold hb_ot_face_post_accelerator_t
2017-11-14 19:31:50 -08:00
Behdad Esfahbod
702d86ba6b
[ot] Fold hb_ot_face_kern_accelerator_t
2017-11-14 19:25:51 -08:00
Behdad Esfahbod
909de95a11
Minor build fix
2017-11-14 16:22:52 -08:00
Behdad Esfahbod
e5930722d4
Fix invalid buffer access in OOM times
...
Hopefully fully fixes
https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=1856
2017-11-14 15:47:55 -08:00
Behdad Esfahbod
fcd6c338ff
Fix more compiler warnings
2017-11-14 15:04:19 -08:00
Behdad Esfahbod
7fdf16b2ce
Fix compiler warning
2017-11-14 15:04:19 -08:00
David Corbett
87f0ad183c
Allow U+20F0 in USE clusters
2017-11-14 15:04:10 -08:00
Behdad Esfahbod
93f7c1652a
Revert "[glib/ucdn/icu/ft/ot] Make returned funcs inert"
...
This reverts commit 5daf3bd449
.
If other atexit callbacks try to destruct the objects we destruct
in atexit callbacks, bad things will happen.
I'll come up with some other way to catch premature destruction
of HB-owned objects.
Fixes https://github.com/behdad/harfbuzz/issues/618
2017-11-14 10:59:54 -08:00
Behdad Esfahbod
c48475f33a
Whitespace
2017-11-13 20:26:29 -08:00
Behdad Esfahbod
83d6802736
Clean up GlyphID
...
After 4a27c17ea0
we do not need
the special GlyphID.cmp(hb_codepoint_t), so just make GlyphID
a typedef.
Fixes https://github.com/behdad/harfbuzz/issues/612
2017-11-13 20:25:02 -08:00
Behdad Esfahbod
7f39f57614
Implement strtod_l() on MSVC
...
Patch from Jean Ghali on mailing list.
2017-11-13 15:04:13 -08:00
Behdad Esfahbod
e4da380200
[coretext/uniscribe/directwrite/graphite/fallback] Update for unsafe-to-break
...
Fixes https://github.com/behdad/harfbuzz/issues/615
We'll see which bots I broke.
2017-11-10 17:14:27 -08:00
Martin Hosken
4de03a1585
Fix graphite intergration reordered clusters problem
2017-11-10 16:24:06 -08:00
Behdad Esfahbod
8eed9cb11e
[kern] Fix invalid memory access if offset is zero
...
If offset is zero, we return Null() object. Wasn't prepared for that.
Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=4088
2017-11-09 18:09:40 -08:00
Behdad Esfahbod
c4f4c0a2fa
Fix indexing in unsafe-to-break marking for 'stch' feature
...
Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=4099
2017-11-08 17:04:31 -08:00
David Corbett
5a9cba9744
Mark non-initial left matras as unsafe to break
2017-11-08 19:12:10 -05:00
Behdad Esfahbod
a615030683
[kern] Implement format-2 kern subtable
2017-11-06 15:40:07 -05:00
Behdad Esfahbod
82a38d1f7a
[kern] Allow subtables longer than 64kb
...
Apparently calibri.ttf does this:
https://github.com/fonttools/fonttools/pull/1094#discussion_r148933791
2017-11-06 15:28:24 -05:00
Behdad Esfahbod
625ae08fce
[kern] Towards implementing format-2
2017-11-06 15:06:30 -05:00
David Corbett
74e82adaea
Mark glyphs involved in 'stch' as unsafe to break
2017-11-06 15:06:23 -05:00
Behdad Esfahbod
5aad819433
Simplify tracing code when tracing is disabled
...
Fixes https://github.com/behdad/harfbuzz/pull/605
2017-11-03 17:18:17 -04:00
Behdad Esfahbod
40ec3bbb55
Consolidate debug stuff into hb-debug.hh
...
Part of fixing https://github.com/behdad/harfbuzz/pull/605
2017-11-03 17:18:17 -04:00
Behdad Esfahbod
384862d7ee
Remove NO_COPY()
2017-11-03 17:18:17 -04:00
Unknown
97145df249
Trivial typos
...
Found using `codespell -i 3 -w -I '../harf-whitelist.txt'`
whereas the whitelist contents were:
```
beng
iff
pres
ot
te
teh
```
2017-11-03 15:31:21 +02:00
Behdad Esfahbod
4b3278ef8d
[ot] Hook up horizontal kerning to kern table
...
Seems to work. Yay!
Still to do: run kerning if GPOS doesn't have 'kern' feature.
2017-11-01 19:41:29 -06:00
Behdad Esfahbod
77acc1106e
[kern] More...
...
Almost there.
2017-11-01 19:40:51 -06:00
Behdad Esfahbod
49c0f35580
[kern] See if this helps with making VS bot happy
2017-11-01 18:16:07 -06:00
Behdad Esfahbod
2c439210c9
[uniscribe] Fix a couple of VS warnings
2017-11-01 18:13:35 -06:00
Behdad Esfahbod
4c43a23bf4
[kern] Implement Format0
2017-11-01 18:12:26 -06:00
Behdad Esfahbod
ac3d937c6c
[kern] Implement some more
2017-11-01 17:54:56 -06:00
Behdad Esfahbod
2a16f647ae
[kern] Start implementing kern table
...
Pushing this out early to catch bot errors since I'm using template tricks
we were not using in HarfBuzz before.
2017-11-01 17:32:34 -06:00
ebraminio
102f5ead49
Enable PSVita (arm-none-eabi) compile again and add it to CI ( #594 )
2017-11-01 02:10:18 -07:00
Behdad Esfahbod
92bb508642
[indic] Use mutable for virama_glyph
2017-10-31 22:58:03 -06:00
Behdad Esfahbod
6c04dcb28d
Use bsearch() for large SFNT table directories
2017-10-31 20:11:00 -06:00
Behdad Esfahbod
b0e33da02d
Add BinSearchArrayOf<>
2017-10-31 20:05:37 -06:00
Behdad Esfahbod
aca378f51e
Sanitize (Headless)ArrayOf()::len to ensure it doesn't use offsets
2017-10-31 18:11:10 -06:00
Behdad Esfahbod
5f04711314
Fix HeadlessArrayOf::sanitize_shallow()
2017-10-31 18:10:40 -06:00
Behdad Esfahbod
7ce9f397d1
Rename hb-sort-r.hh -> hb-dsalgs.hh
2017-10-31 16:54:31 -06:00
Behdad Esfahbod
8eaff980fc
Remove HB_TAG_CHAR4
2017-10-31 16:54:31 -06:00
David Corbett
d016c5bdb9
Categorize Grantha candrabindu for use in Tamil
2017-10-31 16:54:23 -06:00
Behdad Esfahbod
0feff4ba7b
Simplify hb-sort-r.hh
...
See https://github.com/behdad/harfbuzz/pull/592
2017-10-31 14:02:54 -06:00
Behdad Esfahbod
c290ba5b7d
Define _GNU_SOURCE
...
Might help with https://github.com/behdad/harfbuzz/pull/592
Ie. bringing in qsort_r() prototype always.
2017-10-31 13:18:21 -06:00
Behdad Esfahbod
98acdde3c6
[coretext/uniscribe] Fix build
...
https://travis-ci.org/behdad/harfbuzz/jobs/295039536#L3468
https://ci.appveyor.com/project/behdad/harfbuzz/build/1.0.697/job/dr1ujlntxafeqbej#L142
2017-10-31 11:17:43 -06:00
Behdad Esfahbod
ec86cc5e55
Fix Windows build
...
(And prevent it from happening in the future.)
2017-10-30 14:11:59 -06:00
Behdad Esfahbod
e35a763c07
[post] Implement glyph_from_name()
...
This concludes https://github.com/behdad/harfbuzz/pull/568
2017-10-30 13:15:05 -06:00
Behdad Esfahbod
6c738f353e
Make string-array return hb_string_t
2017-10-30 12:21:44 -06:00
Behdad Esfahbod
e1a37f3db4
Add hb_string_t
2017-10-30 11:42:28 -06:00
Behdad Esfahbod
21ac567858
Fix tests
2017-10-30 09:48:09 -06:00
Behdad Esfahbod
0f8b5aa1bc
[post] Minor; towards implementing get_glyph_from_name()
2017-10-30 09:46:36 -06:00
Behdad Esfahbod
977679f229
Add hb_bsearch_r()
2017-10-29 17:33:32 -06:00
Behdad Esfahbod
0712e915b4
Remove hb_compare_func_t
2017-10-29 17:01:47 -06:00
Behdad Esfahbod
538da7496d
Add hb-sort-r, a portable qsort_r() replacement
2017-10-29 16:38:58 -06:00
Behdad Esfahbod
923a8f520a
Fix up 5de83fab94
2017-10-29 15:00:54 -06:00
Behdad Esfahbod
b98c7c3f1f
[post] Minor
2017-10-29 14:52:52 -06:00
Behdad Esfahbod
5de83fab94
[ot] Speed up get_glyph_name()
...
get_glyph_from_name() coming soon.
2017-10-28 19:54:04 -06:00
Behdad Esfahbod
feadee079e
[post] Refactor a bit, use our data types
2017-10-28 16:58:56 -06:00
Behdad Esfahbod
5014c60afa
More nullptr fix
...
Fixes https://github.com/behdad/harfbuzz/issues/585
2017-10-28 12:00:49 -06:00
Behdad Esfahbod
5daf3bd449
[glib/ucdn/icu/ft/ot] Make returned funcs inert
...
Such that client cannot accidentally destroy them, even though that
will be a bug in their code...
2017-10-27 16:37:11 -06:00
Behdad Esfahbod
bfa7f37a73
Fix previous commit
...
Oops.
2017-10-27 16:03:51 -06:00
Behdad Esfahbod
8864864b62
[glib/icu/ucdn] Make the funcs object allocated on demand
2017-10-27 15:26:45 -06:00
Behdad Esfahbod
af3f72f9eb
Correctly mark NullPool const
...
Saves some more code size as well!
2017-10-27 15:14:44 -06:00
Behdad Esfahbod
51f4d4d5cd
Reduce prealloced number of user-data items from 2 to 1
...
Even 1 is too many but putting 0 breaks compile. Saves 3k in .so
2017-10-27 15:09:22 -06:00
Behdad Esfahbod
3205de7906
Make the NullPool HB_INTERNAL shared
...
Saves 2k of .bss section.
2017-10-27 15:01:40 -06:00
Behdad Esfahbod
7036f1d22c
[ot] Remove shaper name
...
In ten years we never used them...
2017-10-27 14:42:59 -06:00
Behdad Esfahbod
4a27c17ea0
Fix IntType.cmp() to avoid narrowing down integer types
...
Fixes https://github.com/behdad/harfbuzz/issues/571
2017-10-27 14:29:12 -06:00
Behdad Esfahbod
62e312ead8
Use NULL instead of polyfill, if nullptr is not available
...
Part of fixing https://github.com/behdad/harfbuzz/issues/585
2017-10-27 09:29:20 -06:00
Behdad Esfahbod
17f40b7cad
Include hb-private.hh more consistently
...
Part of fixing https://github.com/behdad/harfbuzz/issues/585
2017-10-27 09:22:42 -06:00
Behdad Esfahbod
42d518513c
Towards compiling with pre-C++11 compilers and nullptr fallback
...
https://github.com/behdad/harfbuzz/issues/585
2017-10-27 00:25:11 -06:00
Behdad Esfahbod
0e9256984e
[post] Make format1 names array avoid relocations
2017-10-26 20:34:04 -06:00
Behdad Esfahbod
2a74968044
Add hb-string-array.hh
...
Used to build static string arrays that use no relocation.
2017-10-26 20:32:16 -06:00
Behdad Esfahbod
6f08b12bc3
Minor
2017-10-26 18:23:03 -06:00
Jonathan Kew
dfd234a97d
[set] Fix page_map[] indexing in backward loop.
...
Fixes https://github.com/behdad/harfbuzz/issues/579 .
2017-10-26 12:33:05 -05:00
Jonathan Kew
d511cfb557
[set] Bugfix for hb_set_next
2017-10-26 12:30:52 -05:00
Behdad Esfahbod
92bac64bd2
[post] Oops!
...
https://ci.appveyor.com/project/behdad/harfbuzz/build/1.0.668/job/ikfj8peowgrp059t
2017-10-25 18:22:47 -06:00
Behdad Esfahbod
543bd58d7a
[post] Touch up and fixes
...
The get_glyph_from_name() is incorrect; needs fixing.
2017-10-25 18:01:03 -06:00
Khaled Hosny
d9e166f74c
[ot-font] Implement hb_ot_get_glyph_from_name
2017-10-25 19:29:51 -04:00
Khaled Hosny
9d4d2fb9af
[ot-font] Implement hb_ot_get_glyph_name
...
Turns out we already have support for “post” table, it just needed to be
activated and put in use.
2017-10-25 19:29:51 -04:00
Behdad Esfahbod
33ca3b67bf
Check for headers in builddir first, in check-*.sh
...
Fixes https://bugs.freedesktop.org/show_bug.cgi?id=103346
2017-10-25 12:09:11 -04:00
Behdad Esfahbod
9ac2e5c6c0
check-externs.sh: Make output more verbose
...
Trying to figure out why this is failing on some Debian bots:
https://bugs.freedesktop.org/show_bug.cgi?id=103346
Maybe I should check for GNU grep specifically now that I'm using -n as well.
2017-10-24 10:06:25 -04:00
Behdad Esfahbod
30a591e3ce
[set] Rewrite another way :P
2017-10-23 14:29:20 -04:00
Behdad Esfahbod
8170801d78
[set] Fix crash
...
Ouch! That's what happens when one plays with increment/decrement operators!
Fixes https://github.com/behdad/harfbuzz/issues/578
2017-10-23 14:29:14 -04:00
Behdad Esfahbod
2ee710e02f
Minor
2017-10-23 08:37:48 -04:00
Behdad Esfahbod
dd33e4e96b
[set] Don't use major()
...
Fixes https://github.com/behdad/harfbuzz/issues/577
2017-10-23 08:36:40 -04:00
Behdad Esfahbod
d0f0ff85b9
[set] Don't use PAGE_SIZE
...
Fixes https://github.com/behdad/harfbuzz/issues/576
2017-10-23 08:34:30 -04:00
Behdad Esfahbod
ce97945440
[icu] Fix error check
2017-10-22 18:23:38 -04:00
Behdad Esfahbod
8b9d9b71b0
Fix set initialization issues
2017-10-22 17:48:06 -04:00
Behdad Esfahbod
ced86da7dd
Another try at fixing mingw32 build bot fail
2017-10-22 17:06:10 -04:00
ebraminio
d45a2138d9
Merge pull request #572 from fanc999/master.msvc
...
builds: Support HarfBuzz-GObject and introspection in CMake builds
2017-10-21 10:19:55 +03:30
Behdad Esfahbod
d8adaa97fb
Another try at fixing build bots
...
hb-ot-shape.cc:287:18: error: comparison of constant 32 with expression of type 'hb_unicode_general_category_t' is always true [-Werror,-Wtautological-constant-out-of-range-compare]
2017-10-20 13:57:43 -04:00
Behdad Esfahbod
6058f98825
Remove FLAG_SAFE()
...
No flag is safe, over time... See previous commit.
2017-10-19 11:39:52 -07:00
Behdad Esfahbod
7c561dacc3
[myanmar] Fix unsafe usage of FLAG_SAFE()
...
The commit f559c63307
caused
"undefined-shift" errors in Myanmar shaper as we changed the
numeric value of type D from 19 to 32 there, making the
"FLAG_SAFE (info.myanmar_category())" wrong.
Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=3546
2017-10-19 11:35:51 -07:00
Chun-wei Fan
162575f2c6
CMake builds: Fix builds
...
Include the fallback sources in the build, and update
src/Makefile.sources so that it can be read by the CMake build files.
Fix a typo in the DirectWrite configure option so that we can properly
enable DirectWrite builds.
Also, when building the utility program, install them as well.
2017-10-18 22:48:18 +08:00
Behdad Esfahbod
d6f612fac8
[bsearch] Micro-optimization
2017-10-17 16:32:12 -07:00
Fredrik Roubert
41b1984be9
Switch from ICU deprecated unorm_normalize to unorm2_normalize. ( #569 )
...
The new unorm2_normalize has been public API since ICU 4.4, while
the old unorm_normalize has been deprecated since ICU 56.
Now, beginning with ICU 60, unorm_normalize will also be annotated
U_DEPRECATED and trigger the compiler -Wdeprecated-declarations warning.
2017-10-17 15:06:31 -07:00
Behdad Esfahbod
ba8b569607
Try fixing build on VC
...
c:\projects\harfbuzz\src\hb-set-private.hh(151): error C2327: 'hb_set_t::page_t::v': is not a type name, static, or enumerator [C:\projects\harfbuzz\build\harfbuzz.vcxproj]
2017-10-17 11:16:36 -07:00
Behdad Esfahbod
80cc0a7e3e
[coretext] Fix build
...
error: static_assert expression is not an integral constant expression
2017-10-17 11:14:48 -07:00
Behdad Esfahbod
a11249ee93
[set] Fix merge logic
2017-10-16 01:33:32 -04:00
Behdad Esfahbod
ab8f327eb4
Ouch.
2017-10-15 18:21:35 -04:00
Behdad Esfahbod
bb9917913f
[set] Disable vectorization
...
Fixes clang "non-const reference cannot bind to vector element" error.
2017-10-15 18:20:25 -04:00
Behdad Esfahbod
221ce6c18f
Fix bots
2017-10-15 17:58:58 -04:00
Behdad Esfahbod
0cf7d957b7
[set] Remove TODO items not worth pursuing
2017-10-15 17:01:31 -04:00
Behdad Esfahbod
10d43658e7
[set] Speed up intersects()
2017-10-15 16:56:05 -04:00
Behdad Esfahbod
56ef4e0c52
Simplify hb_prealloced_array_t initialization
2017-10-15 16:38:29 -04:00
Behdad Esfahbod
7737e87ac4
Properly detect vector_size attribute and use fallback otherwise
2017-10-15 16:21:03 -04:00
Behdad Esfahbod
f8a0ec50e2
[set] Add fallback implementation of int-vector type
2017-10-15 16:10:35 -04:00
Behdad Esfahbod
deed4a48d1
Faster hb_set_t
...
Fixes https://github.com/behdad/harfbuzz/pull/23
2017-10-15 16:45:33 -03:00
Behdad Esfahbod
1d3971200b
Deprecate hb_set_invert()
2017-10-15 16:28:34 -03:00
Behdad Esfahbod
5e74044b6b
Add bfind() to prealloaced_array_t
2017-10-15 16:28:34 -03:00
Behdad Esfahbod
db5f7ef189
Inline another bsearch()
2017-10-15 16:28:34 -03:00
Behdad Esfahbod
6fb4ac73f9
Add popcount for 64bit ints
2017-10-15 16:00:09 +02:00
Behdad Esfahbod
473b17af4d
Remove unused hb_cache_t
2017-10-15 14:11:09 +02:00
Behdad Esfahbod
a433e60a43
Remove unused hb_frozen_set_t
2017-10-15 14:09:46 +02:00
Behdad Esfahbod
826a1daf2f
Move set-digests into their own header file
2017-10-15 14:09:05 +02:00
Behdad Esfahbod
3c13e153fe
Try fixing AppVeyor bots
2017-10-15 14:02:58 +02:00
Behdad Esfahbod
7e3015a315
Fix warnings
2017-10-15 12:13:19 +02:00
Behdad Esfahbod
dbdbfe3d7b
Use nullptr instead of NULL
2017-10-15 12:11:08 +02:00
Behdad Esfahbod
fbb937b680
Don't use NULL in public headers
2017-10-15 12:04:16 +02:00
Behdad Esfahbod
c3448e8d21
Use static_assert instead of custom ASSERT_STATIC
2017-10-15 12:02:00 +02:00
Behdad Esfahbod
76dcbf8b23
Add polyfill for static_assert and nullptr
...
Also fix hb_assert_constant_t.
2017-10-15 11:24:35 +02:00
Behdad Esfahbod
81e2b9b8a9
Never skip over CGJ
...
We might want to tweak this some more. For now, never skipping over
it is better behavior than always skipping.
Part of https://github.com/behdad/harfbuzz/issues/554
2017-10-15 10:49:06 +02:00
Behdad Esfahbod
74f1b88e37
[ucdn] Fix compiler warnings
2017-10-13 11:01:55 +02:00
Behdad Esfahbod
c2cf68dbdf
[coretext] Fix build
2017-10-13 10:30:19 +02:00
Behdad Esfahbod
95883fc5d4
[coretext] Pass correct font size to CoreText
...
CoreText "point"s are not typographic points, but CSS pixels. Ie.
they are 96 per inch, not 72 per inch.
2017-10-13 10:22:20 +02:00
Behdad Esfahbod
4f9a83ec21
Merge remote-tracking branch 'origin/master'
2017-10-12 14:08:58 +02:00
Behdad Esfahbod
fa48ccbe12
[indic] Special-case Kannada Ra,H,ZWJ sequence
...
Fixes https://github.com/behdad/harfbuzz/issues/435
2017-10-12 14:07:37 +02:00
n8willis
40b05d7b77
Replacing 'cluster' with 'syllable' when comments describe certain Indic shaping behavior ( #563 )
...
* Clarified wording of syllable/cluster behavior in Uniscribe in final_reordering; changed one other probable typo.
* Additional syllable/cluster swap in comments for final reordering and for initial-reordering matra decomposition.
2017-10-12 13:48:48 +02:00
Behdad Esfahbod
8923033eb2
[coretext] Use fabs() to silence compiler warning
2017-10-12 12:02:04 +02:00
Dominik Röttsches
dd4b321b4a
[coretext] Activate tracking for system fonts
...
Another attempt at fully fixing
https://github.com/behdad/harfbuzz/issues/360
2017-10-12 11:54:17 +02:00
Behdad Esfahbod
6a2cbc6ef5
[coretext] Use fabsf() instead of abs()
...
Fixes bots.
Link libharfbuzz.so with -lm. Surprising that we survived without
it so far!
2017-10-12 10:46:09 +02:00
Behdad Esfahbod
4e4781319b
[ft] Add hb_ft_font_changed()
...
When the font size or variations settings on underlying FT_Face change,
one can call hb_ft_font_changed() and continue using hb_font created using
hb_ft_font_create().
Fixes https://github.com/behdad/harfbuzz/issues/559
New API:
hb_ft_font_changed()
2017-10-12 10:33:16 +02:00
Behdad Esfahbod
94b3cafc3a
Add hb_face_get_table_tags()
...
New API:
hb_face_get_table_tags()
Fixes https://github.com/behdad/harfbuzz/issues/560
2017-10-11 17:22:44 +02:00
Behdad Esfahbod
e1b6d92302
Remove cast of functions to (hb_destroy_func_t)
...
Fixes https://github.com/behdad/harfbuzz/issues/474
2017-10-11 15:51:31 +02:00
Behdad Esfahbod
717fcb51dd
[coretext] Minor
2017-10-11 15:38:21 +02:00
Behdad Esfahbod
374bb48d90
Change ptem API to make 0 mean unset
2017-10-11 15:37:50 +02:00
Behdad Esfahbod
06c14225b2
[coretext] Minor
2017-10-11 15:29:53 +02:00
Behdad Esfahbod
a4b46212c5
[coretext] Adjust font size check for 0
2017-10-11 15:29:22 +02:00
Behdad Esfahbod
269cf1ca82
Correctly initialize ptem
2017-10-11 15:24:22 +02:00
Behdad Esfahbod
84686bf4c7
[coretext-aat] Also pass through CoreText if font has kerx table
...
SFNSText has kerx table which apparently is applied.
2017-10-11 15:02:48 +02:00
Behdad Esfahbod
296d0134c9
[coretext] Change default point size to 12
2017-10-11 14:09:30 +02:00
Dominik Röttsches
a5ebe1d4ae
[coretext] Recreate CTFont if pt size changed
...
Attempt at fixing #360
2017-10-11 13:33:05 +02:00
Dominik Röttsches
db7a73ce07
[coretext] Fix build
2017-10-11 13:24:48 +02:00
Behdad Esfahbod
f334130756
[coretext] Another try
2017-10-11 13:17:46 +02:00
Behdad Esfahbod
a8e466c3c1
[coretext] Move CT_Font to font data
...
Towards implementing optical sizing. Untested; won't compile.
https://github.com/behdad/harfbuzz/issues/360
2017-10-11 13:05:59 +02:00
Behdad Esfahbod
f9b4c6570a
[coretext] Move font size to a macro
2017-10-11 12:51:25 +02:00
Behdad Esfahbod
8d450dd188
Infrastructure for creating CTFont with correct font size
...
https://github.com/behdad/harfbuzz/issues/360
2017-10-11 12:43:46 +02:00
Behdad Esfahbod
16d02a58cf
[coretext] Change default font size from 36 to 18
2017-10-11 12:28:06 +02:00
Behdad Esfahbod
c0c2dbc871
Remove dirty tracking
...
Turns out I don't need this to resolve CoreText optical sizing
issue after all.
https://github.com/behdad/harfbuzz/issues/360
2017-10-11 12:23:35 +02:00
Behdad Esfahbod
b57f18da70
Add hb_font_[sg]et_ptem() to set/get point size on font
...
New API:
hb_font_set_ptem()
hb_font_get_ptem()
Needed for hb-coretext optical sizing:
https://github.com/behdad/harfbuzz/issues/360
2017-10-11 11:47:47 +02:00
Behdad Esfahbod
3f9370d9e5
Fix TODO item
2017-10-11 11:34:53 +02:00
Behdad Esfahbod
5f50f8837f
[arabic] Fix cluster merging
2017-10-07 13:17:33 +02:00
Behdad Esfahbod
c2545b9215
Add check for HB_EXTERNs
...
https://github.com/behdad/harfbuzz/pull/555
2017-10-07 12:57:30 +02:00
fanc999
48a9406839
Fix build of HarfBuzz tools and HarfBuzz-GObject on Visual Studio ( #555 )
...
* hb-buffer.h: Mark hb_buffer_diff() for export
This will fix the tools builds on Visual Studio, as the symbol is used
by the tools.
* build: Adapt NMake Makefiles for GLib 2.53.4 or later
glib-mkenums was ported from a PERL script to a Python script, so we
need to update how we generate the enum sources for HarfBuzz-GObject in
the NMake builds. Let this be known in the build documentation for MSVC
builds.
One of the problems with the underlying cmd.exe that the NMake Makefiles
run on is that shebang lines are not recognized, so we need to to test
run the script with Python and see whether it succeeded by outputing a
source file that is larger than 0 in file size (since running the PERL
version of the script will clearly fail and cause an empty file to be
created).
If it succeeds, we then run a small Python utility script that makes the
necessary string replacements, and we are done. If that fails, then we
run the glib-mkenums script with PERL, and do the replacements with the
PERL one-liners as we did before.
We need to make replace.py use latin-1 encoding when using Python 3.x to
cope with the copyright sign that is in the generated enum sources.
2017-10-07 12:57:14 +02:00
Behdad Esfahbod
c9e2cf6f55
[ot] Remove 'mal' and 'gle' lang tags
...
Fixes https://github.com/behdad/harfbuzz/issues/477
2017-10-04 16:59:22 +02:00
Behdad Esfahbod
621c49cb86
Improve performance of ligature component matching
...
This O(N^2) was introduced in 8b2c94c43f
.
Make it O(N).
2017-10-04 15:06:48 +02:00
Behdad Esfahbod
ab8d70ec70
[arabic] Implement Unicode Arabic Mark Ordering Algorithm UTR#53
...
Fixes https://github.com/behdad/harfbuzz/issues/509
2017-10-04 14:47:10 +02:00
Behdad Esfahbod
b6fe0ab636
Add info_cc() convenience macro
2017-10-04 13:37:08 +02:00
Behdad Esfahbod
7f9e7f8689
Adjust normalizer for out-of-order marks
...
We are going to implement Unicode Arabic Mark Ordering Algorithm:
http://www.unicode.org/reports/tr53/tr53-1.pdf
which will reorder marks out of their sorted ccc order. Adjust
normalizer to stop combining as soon as dangerous ordering is
detected.
2017-10-04 13:20:33 +02:00
Behdad Esfahbod
a252ad61f0
Minor
2017-10-04 13:07:08 +02:00
Behdad Esfahbod
4c05a405ac
Revert "Treat HAMZA ABOVE similar to SHADD for sorting purposes"
...
This reverts commit 5a33057576
.
Proper fix coming soon.
2017-10-04 13:06:51 +02:00
Behdad Esfahbod
d695cacbf4
Shorthand format controls should not be ignored
...
Fixes https://github.com/behdad/harfbuzz/issues/503
2017-10-04 11:33:47 +02:00
Behdad Esfahbod
50e95229d7
Add Chinantec language tags
...
Fixes https://github.com/behdad/harfbuzz/issues/516
2017-10-04 11:28:04 +02:00
Behdad Esfahbod
9786fcd8fd
Fix GPOS v_origin ordering
...
This should affect mark attachment in vertical text. I have no font to test,
but this sounds the right order.
Noticed while debugging https://github.com/behdad/harfbuzz/issues/532
2017-10-03 17:22:43 +02:00
Behdad Esfahbod
63db692fa9
[indic] Fix shaping of U+0AFB GUJARATI SIGN SHADDA
...
Fixes https://github.com/behdad/harfbuzz/issues/552
2017-10-03 16:00:18 +02:00
Behdad Esfahbod
f559c63307
[indic] Implement Consonent_With_Stacker
...
Fixes https://github.com/behdad/harfbuzz/issues/528
2017-10-03 15:20:07 +02:00
Behdad Esfahbod
e07669fc43
[use] Implement Consonant_With_Stacker
...
Related to https://github.com/behdad/harfbuzz/issues/528
2017-10-03 14:57:14 +02:00
Behdad Esfahbod
5d98de1f38
Tweak mark-base attachment
...
Apparently a base glyph can also become an attached component of a
ligature if the ligature-forming lookup used IgnoreBase. This was
being confused with a non-first component of a MultipleSubst and
hence not matched for mark-attachment. Tweak test to fix.
Fixes https://github.com/behdad/harfbuzz/issues/543
2017-10-03 13:49:40 +02:00
Behdad Esfahbod
c44657a05d
Tweak input matching some more
...
Followup to 8b2c94c43f
Allow matching sequences of marks attached to different ligatures,
as supposedly the base of the subsequent marks were already jumped
over.
2017-10-03 13:14:17 +02:00
Behdad Esfahbod
8b2c94c43f
Tweak ligature component matching for ligature formation
...
If two marks want to ligate and they belong to different components of the
same ligature glyph, and said ligature glyph is to be ignored according to
mark-filtering rules, then allow.
Example Burmese senquence:
U+1004,U+103A,U+1039,U+101B,U+103D,U+102D
Test font provided by Norbert Lindenberg.
Fixes https://github.com/behdad/harfbuzz/issues/545
2017-10-02 20:03:35 +02:00
Behdad Esfahbod
71c0a1429d
[indic] Fix shaping of U+0A51
...
Mark it as matra below to allow the sequence U+0A15, U+0A51, U+0A47.
Oh well...
Fixes https://github.com/behdad/harfbuzz/issues/524
2017-10-02 18:57:03 +02:00
Behdad Esfahbod
6eb8950e62
[ucdn] Oops!
2017-10-02 18:30:05 +02:00
Behdad Esfahbod
cbec0cd65e
Remove some really old cruft
2017-10-02 18:26:52 +02:00
Behdad Esfahbod
b3dff7720c
[ucdn] Update README
2017-10-02 18:22:51 +02:00
Behdad Esfahbod
57c55ef834
[ot] Improve shaper selection heuristic
2017-10-02 18:21:27 +02:00
Behdad Esfahbod
5680ef884c
[use] Hack to fix shaping of U+1A7F
...
Fixes https://github.com/behdad/harfbuzz/issues/525
2017-10-02 18:20:51 +02:00
Behdad Esfahbod
0faa16a253
[ucdn] Update to Unicode 10
...
Update to commit c000ebf79c095a7d58cf90090bde5715592c4834
plus this bug-fix: https://github.com/grigorig/ucdn/issues/18
2017-10-02 17:15:46 +02:00
Behdad Esfahbod
ea535a1dfa
[use] Update to Unicode 10
2017-10-02 17:02:39 +02:00
Behdad Esfahbod
29c244aff6
Minor
2017-10-02 16:36:21 +02:00
Behdad Esfahbod
1535f8c672
Add Unicode 10 scripts
2017-10-02 16:12:18 +02:00
Behdad Esfahbod
bdbe974f52
[indic] Update table to Unicode 10
2017-10-02 10:00:31 -04:00
Behdad Esfahbod
819cc36049
[indic] Move manual code out of generated table
2017-10-02 09:03:16 -04:00
Behdad Esfahbod
da4866f717
[arabic] Update table to Unicode 10 data
2017-10-02 08:57:06 -04:00
Behdad Esfahbod
1a0a356a0f
[indic] Categorize U+0980 BENGALI ANJI as placeholder
...
Fixes https://github.com/behdad/harfbuzz/issues/538
2017-10-02 08:49:23 -04:00
jfkthame
19e77e01bc
[shape-plan] Don't look for a cached plan if variation coords are specified. Fixes #549 . ( #550 )
...
This is a temporary hack just to avoid incorrect shaping results, pending proper support
for caching shape-plans with variation coordinates.
2017-10-02 08:08:49 -04:00
mhosken
66128d3cfb
Fix missing xscale in rtl graphite unpacking ( #541 )
...
* Fix missing xscale in rtl graphite unpacking
* Oops didn't need to mess with yscale
2017-09-26 14:29:45 -04:00
Behdad Esfahbod
3ca69c8c32
Use strtod_l() to correctly parse decimal numbers in French & other locales
...
Test with, eg.:
$ LC_ALL=fr_FR.utf-8 ./hb-view NotoSansArabic-VF.ttf بهداد --variations wght=1.2
2017-09-14 20:50:35 -04:00
Behdad Esfahbod
d03f11f246
Fix buffer_diff for empty buffers
...
If buffers are empty, content type should be ignored.
This fixes last of the failing tests: fuzzed.tests. Green again!
2017-09-04 20:14:13 -07:00
Behdad Esfahbod
7cc348041d
[unsafe-to-break] Fix unsafe-to-break for cluster-level=1
...
Fixes tests/shaping/tests/cluster.tests
2017-09-04 20:06:21 -07:00
Behdad Esfahbod
06cb162cd7
[indic] Treat Consonant_With_Stacker as consonant
...
Fixes https://github.com/behdad/harfbuzz/issues/528
"Kannada JIHVAMULIYA and UPADHMANIYA insert dotted circles"
2017-09-01 10:34:56 -07:00
Behdad Esfahbod
c449d2d8c9
[unsafe-to-break] Mark during fraction-slash formation
...
Fixes tests/automatic-fractions.tests
2017-08-30 17:28:22 -07:00
Behdad Esfahbod
099472e08b
hb_buffer_diff() tweak
...
I like to have a mode where CONTAINS_NOTDEF and CONTAINS_DOTTEDCIRCLE are not
returned. Abused a value of -1 for that. hb-shape now uses it. Fixes two
of the six tests failing with --verify in test/shaping/run-tests.sh.
2017-08-30 16:45:06 -07:00
Behdad Esfahbod
224d20e4e1
[docs] Minor
2017-08-23 14:49:10 -07:00
Behdad Esfahbod
b2dd0c1c32
Add hb_glyph_info_get_glyph_flags()
...
New API.
2017-08-23 13:12:54 -07:00
Behdad Esfahbod
3e8f4f1452
Rename HB_BUFFER_DIFF_FLAG_MASK_MISMATCH to HB_BUFFER_DIFF_FLAG_GLYPH_FLAGS_MISMATCH
2017-08-22 17:56:25 -07:00
Behdad Esfahbod
8820ba29df
Fix warning about "may be used uninitialized"
2017-08-15 17:12:21 -07:00
Emil A Eklund (eae)
91770e1c56
Fix signed/unsigned warning ( #522 )
...
Change hb_buffer_diff to explicitly cast result of abs to unsigned when
comparing with position_fuzz to avoid unsafe signed/unsigned comparions
warnings on windows.
2017-08-15 16:25:18 -07:00
Behdad Esfahbod
587f15ece3
Minor
2017-08-14 15:23:10 -07:00
Behdad Esfahbod
338e61ad1b
Fix typo
2017-08-14 12:36:38 -07:00
Jonathan Kew
331d66c7fe
Add function to compare two buffers
...
Based on patch from Jonathan Kew.
Needs more cleaning up and documentation.
New API:
hb_buffer_diff_flags_t
hb_buffer_diff()
2017-08-14 11:44:12 -07:00
Behdad Esfahbod
219af509ef
[graphite2] Fix warning
2017-08-13 15:10:26 -07:00
Behdad Esfahbod
239119a631
[unsafe-to-break] Mark all positions as unsafe in alternative shapers
2017-08-13 15:08:34 -07:00
Behdad Esfahbod
05fabbd03e
[unsafe-to-break] Towards verifying unsafe-to-break in --verify
...
We break and shape fragments and reconstruct shape result from them.
Remains to compare to original buffer. Going to add some buffer
comparison API and use here, instead of open-coding.
2017-08-11 20:00:55 -07:00
Behdad Esfahbod
6ce25f57c6
Fix hb_buffer_append()
...
Ouch!
2017-08-11 19:31:05 -07:00
Behdad Esfahbod
1c17c2bde5
[unsafe-to-break] Copy flag to all glyphs in a cluster
...
Makes consumption easier.
2017-08-11 19:06:07 -07:00
Behdad Esfahbod
ec104e5912
[unsafe-to-break] Mark unsafe is cluster merging is disabled
...
We were relying on cluster merges not requiring unsafe flagging because
they get merged. If cluster level requests no merging, then we flag
unsafe when merge would have happened.
2017-08-11 18:24:27 -07:00
Behdad Esfahbod
39a9749430
New API: hb_buffer_append()
2017-08-11 15:52:06 -07:00
Behdad Esfahbod
14a639ea59
[unsafe-to-break] Fix Use-of-uninitialized-value in unsafe_to_break_set_mask
...
Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=3011
2017-08-11 11:30:39 -07:00
Behdad Esfahbod
e43aad5552
[unsafe-to-break] Flag in Thai PUA shaping
2017-08-10 20:54:15 -07:00
Behdad Esfahbod
eae009602b
[unsafe-to-break] Flag in Hangul shaper
2017-08-10 20:50:48 -07:00
Behdad Esfahbod
b65aa1cd47
[unsafe-to-break] Flag during mark attachment
2017-08-10 20:32:02 -07:00
Behdad Esfahbod
882ebdadd6
[unsafe-to-break] Flag during cursive positioning
2017-08-10 20:23:17 -07:00
Behdad Esfahbod
2d158ca376
[unsafe-to-break] Flag during kerning
2017-08-10 20:20:30 -07:00
Behdad Esfahbod
a7c4972cce
[unsafe-to-break] Flag during fallback positioning
2017-08-10 20:16:15 -07:00
Behdad Esfahbod
e2a2b5b229
[unsafe-to-break] Be careful with flag propagation when merging clusters
2017-08-10 20:11:35 -07:00
Behdad Esfahbod
f2868c2008
Set mask to 0, instead of 1, by default
...
This shouldn't matter.
2017-08-10 20:10:53 -07:00
Behdad Esfahbod
9e005c5d86
[unsafe-to-break] Mark Indic-like clusters as unsafe-to-break
2017-08-10 20:10:53 -07:00
Behdad Esfahbod
5287ccc935
[unsafe-to-break] Allocate public bits from 0
2017-08-10 15:02:34 -07:00
Behdad Esfahbod
91ce0c45d6
[safe-to-break] Fix logic when there is no out-buffer
2017-08-10 15:02:34 -07:00
Behdad Esfahbod
a043c99f77
[unsafe-to-break] Simplify logic
...
Always use the algorithm for non-monotone case. It's more robust.
2017-08-10 15:02:34 -07:00
Behdad Esfahbod
40bd7e9a1c
[unsafe-to-break] Add UNSAFE_TO_BREAK flag
...
Not all shapers code is updated to set this properly.
GSUB and Arabic shaper are updated.
GPOS and other shapers are NOT.
Fixes https://github.com/behdad/harfbuzz/issues/224
2017-08-10 15:02:28 -07:00
Behdad Esfahbod
ac8c4e56d8
[ft] Fix theoretical leak
2017-08-09 22:05:08 -07:00
Behdad Esfahbod
5a33057576
Treat HAMZA ABOVE similar to SHADD for sorting purposes
...
Part of https://github.com/behdad/harfbuzz/issues/509
2017-08-09 17:23:28 -07:00
Behdad Esfahbod
68af14d5cc
Protect against div-by-zero in CBDT extent code
...
Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=1452#c5
CC https://github.com/behdad/harfbuzz/issues/139
2017-08-09 17:09:21 -07:00
Behdad Esfahbod
5dc30451b8
Two fixes to avar mapping
...
1. Handle segment with two entries correctly,
2. Fix rounding math. Ouch!
Fixes https://github.com/behdad/harfbuzz/issues/521
2017-08-07 21:37:07 -07:00
Behdad Esfahbod
dc2c418e39
[check-defs/symbols.sh] Drop empty-symbol lines
...
Fixes https://github.com/behdad/harfbuzz/issues/510
2017-08-03 12:34:15 +01:00
Ebrahim Byagowi
65f64d1400
Unbreak arm-none-eabi build again ( #514 )
2017-07-19 02:42:53 +04:30
Behdad Esfahbod
c1432bce3c
[arabic] Adjust feature order again
...
Fixes https://github.com/behdad/harfbuzz/issues/505
2017-07-14 17:35:17 +01:00
Cosimo Lupo
9813be3d12
[coretext] Allow to disable kern ( #508 )
...
* Minor
* [coretext] Fix leak
* [coretext] Do not reset num_features
* [coretext] allow to disable kern; re-enabling doesn't seem to be working
2017-07-14 17:11:46 +01:00
Behdad Esfahbod
9dd29c681e
[use] Allow up to two medial-below letters
...
Fixes https://github.com/behdad/harfbuzz/issues/376
2017-07-14 17:01:27 +01:00
Behdad Esfahbod
216b003c91
[use] Fix shaping of U+AA29 CHAM VOWEL SIGN AA
...
Part of https://github.com/behdad/harfbuzz/issues/376
Also see https://github.com/roozbehp/unicode-data/issues/6
Test added, using NotoSansCham built from Noto Phase III sources.
2017-07-14 16:38:51 +01:00
Behdad Esfahbod
f1cd7ca893
[indic] Add github URL
2017-07-14 15:59:40 +01:00
Behdad Esfahbod
3cc84f45b9
[indic] Fix https://github.com/behdad/harfbuzz/issues/478
2017-07-14 15:50:22 +01:00
Behdad Esfahbod
e359a4b8f5
[indic] Disable automatic ZWNJ handling for Indic features
...
Fixes https://github.com/behdad/harfbuzz/issues/294
Also fixes a bunch of other Indic issues. Test results after:
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: 60732 out of 60747 tests passed. 15 failed (0.0246926%)
KANNADA: 951201 out of 951913 tests passed. 712 failed (0.0747968%)
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%)
Before:
BENGALI: 353725 out of 354188 tests passed. 463 failed (0.130722%)
DEVANAGARI: 707307 out of 707394 tests passed. 87 failed (0.0122987%)
GUJARATI: 366349 out of 366457 tests passed. 108 failed (0.0294714%)
GURMUKHI: 60732 out of 60747 tests passed. 15 failed (0.0246926%)
KANNADA: 951190 out of 951913 tests passed. 723 failed (0.0759523%)
KHMER: 299070 out of 299124 tests passed. 54 failed (0.0180527%)
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: 1091753 out of 1091754 tests passed. 1 failed (9.15957e-05%)
TELUGU: 970555 out of 970573 tests passed. 18 failed (0.00185457%)
2017-07-14 14:22:52 +01:00
Behdad Esfahbod
cdf1fd0627
[indic] Add infrastructure to disable ZWNJ-skipping in context-matching
...
Not used yet.
2017-07-14 12:43:34 +01:00
Dominik Schlösser
4e21ec5469
Fix for reordering of Tibetan vowel u ( #443 )
...
* Undone change for Tibetan vowel u
* removed comment on reordering that became invalid with roll-back
* Support for Dzongkha contractions with multiple vowel-signs
* Removed non-functional and unnecessary defines for HB_MODIFIED_COMBINING_CLASS_CCC138,140
2017-07-14 12:14:23 +01:00
Ebrahim Byagowi
3b0e47ca00
Fix arm-none-eabi build ( fixes #451 ) ( #496 )
2017-06-19 14:47:09 +04:30
Ebrahim Byagowi
76c4873e8c
Support branch prediction helpers on clang compiles ( #491 )
2017-06-02 13:23:10 -04:00
Behdad Esfahbod
7dba30639a
Handle allocation failure in hb-language code
2017-06-01 11:44:42 -04:00
Sebastian Rasmussen
92e2c4baaf
Avoid using strdup inside library. ( #488 )
...
If an application provides a malloc replacement through
hb_malloc_impl() it is important that it is used to allocate
everything, but the use of strdup() circumvents this and
causes system malloc() to be called instead. This pairs
badly with the custom hb_free_impl() being called later.
2017-05-29 10:53:30 -07:00
Khaled Hosny
06cfe3f736
Do not skip TAG characters in glyph substitution ( #487 )
...
Hide them like Mongolian Free Variation Selectors instead.
Fixes https://github.com/behdad/harfbuzz/issues/463
2017-05-17 11:32:47 -07:00
Behdad Esfahbod
1817221620
Minor
2017-05-16 14:26:28 -07:00
mhosken
74b99ef224
Fix graphite2 rtl conversion ( #475 )
2017-04-20 11:13:22 -07:00
Chris Peterson
aacca37590
Fix clang -Wcomma warnings ( #471 ) ( #472 )
...
clang's new -Wcomma compiler option warns about possible misuse of the
comma operator such as between two statements.
hb-common.cc:190:9 [-Wcomma] possible misuse of comma operator here
hb-ot-layout-gsubgpos-private.hh:345:30 [-Wcomma] possible misuse of
comma operator here
hb-shape-plan.cc:438:26 [-Wcomma] possible misuse of comma operator here
2017-04-17 23:25:24 -07:00
William Hua
5ecf96e3a2
Use absolute paths of ragel generated headers ( #467 )
...
https://github.com/behdad/harfbuzz/issues/455
2017-04-16 22:33:42 -07:00
jfkthame
c04c1fe86e
Blacklist GDEF table in additional Tahoma versions. ( #459 )
...
There are more broken versions of Tahoma out there on various Windows releases,
so we need to add them to our blacklist to avoid broken rendering.
See https://bugzilla.mozilla.org/show_bug.cgi?id=1279925 for details.
2017-04-11 14:29:13 -07:00
ebraminio
adfd4ae1cf
[cmake] Improve third party libraries support ( #461 )
2017-04-11 23:18:18 +04:30
Behdad Esfahbod
a4471d0c2c
Move list of ragel sources to Makefile.sources as well
2017-04-05 15:42:11 +02:00
ebraminio
d2acaf6d72
Split ragel generated files lists and remove hardcoded rl files lists ( #453 )
2017-04-05 11:21:23 +02:00
jfkthame
740fdbcd0e
avoid UBSan warning in get_stage_lookups ( #450 )
...
See https://bugzilla.mozilla.org/show_bug.cgi?id=1336600
2017-04-03 13:22:39 +02:00
Behdad Esfahbod
edcf6344bc
Blacklist more versions of Padauk
...
Patch from Phil Race.
2017-03-24 10:24:52 -07:00
Khaled Hosny
91570a1eeb
Just always use strtod here
2017-03-22 23:07:20 +02:00
Chun-wei Fan
539571c1a9
src/hb-common.cc: Fix build on older Visual Studio
...
Visual Studio only supported strtof() from Visual Studio 2013 onwards, so
use strtod() instead to do the operation, which should do the same thing,
sans going to a double, not a float.
2017-03-22 23:03:49 +02:00
Behdad Esfahbod
47e7a1800f
Revert "Fix Context lookup application when moving back after a glyph delete"
...
This reverts commit b9b005f3a4
.
This introduced invalid access cases. Revert until I fix correctly.
2017-03-10 13:23:02 -08:00
Behdad Esfahbod
3c080a7a0a
Fix buffer serialize of empty buffer
...
Ouch!
2017-03-07 18:13:28 -08:00
Behdad Esfahbod
9ac9af725c
Add TODO item
2017-03-05 13:51:01 -08:00
Elie Roux
3ebcd5a381
first working version!
2017-03-05 16:26:01 +01:00
Elie Roux
e65aaaa00a
BASE: start api
2017-03-05 14:53:39 +01:00
Behdad Esfahbod
5aec2fb8d0
Remove TODO item that is not going to happen
2017-03-02 11:46:33 -08:00
Behdad Esfahbod
b9b005f3a4
Fix Context lookup application when moving back after a glyph delete
...
This was broken forever, since days that we did not allow moving
tape backwards. Works now. Reported by Doug Felt.
2017-03-01 14:27:23 -08:00
Elie Roux
f72726c52b
BASE: add function in main BASE object
2017-02-26 15:08:43 +01:00
Elie Roux
3963315f1b
BASE: first complete version
2017-02-26 15:07:53 +01:00
Behdad Esfahbod
85630996b8
Fix buffer-overrun with Bengali reph positioning code
...
This has no security implications whatsoever since we always keep
and extra element at the end of buffer, just in case.
Discovered by oss-fuzz
CC https://github.com/behdad/harfbuzz/issues/139
Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=660
2017-02-25 13:32:20 -08:00
Elie Roux
d34e35b474
BASE: WIP: more access functions
2017-02-25 20:41:05 +01:00
Elie Roux
bd15567ed6
BASE: align member's names
2017-02-25 17:08:01 +01:00
Elie Roux
499b4bef2a
BASE: more consistent naming (with spec and Harfbuzz code base)
2017-02-25 16:48:22 +01:00
Elie Roux
a0bdd546c5
factorize horiz+vertAxis
2017-02-25 16:34:58 +01:00
Elie Roux
1d30c6d935
BASE: sanitize
2017-02-25 16:19:35 +01:00
Dominik Röttsches
a657f23ca3
Blacklist another instance of Padauk ( #419 )
...
In https://crbug.com/681813 another instance of Padauk was identified
triggering collapsed glyphs. Blacklist this version by patching
hb-ot-layout.cc to print out gdef, gsub, and gpos table length, then
adding those to the list of blacklisted versions.
2017-02-20 13:52:07 -06:00
Elie Roux
f131f00b17
compile, move into hb-ot-layout.cc
2017-02-19 10:12:22 +01:00
Elie Roux
d0b97353e9
hb-ot-base-table.hh -> hb-ot-layout-base-table.hh
...
per https://github.com/behdad/harfbuzz/issues/418#issuecomment-280873811
2017-02-19 08:48:22 +01:00
Elie Roux
f748e11645
bootstraping structure
2017-02-18 19:54:33 +01:00
jfkthame
44f7d6ecde
Guard against underflow when adjusting length ( #421 )
...
* Guard against underflow when adjusting length
With the fuzz-testcase in mozilla bug 1295299, we end up with a recursed lookup that removes 3 items, when `match_positions[idx]` is 0, which results in (unsigned) `end` wrapping to a huge value.
Making `end` a signed int is probably the simplest route to a fix.
Fixes https://bugzilla.mozilla.org/show_bug.cgi?id=1295299 .
* Add testcase for #421 .
2017-02-16 19:03:24 -08:00
jfkthame
45766b673f
[indic] Add support for Grantha marks that may be used in Tamil to th… ( #401 )
...
* [indic] Add support for Grantha marks that may be used in Tamil to the Indic table.
See https://bugzilla.mozilla.org/show_bug.cgi?id=1331339 .
Testcase: U+0BA4,U+0BC6,U+1133c,U+0BAA,U+1133c,U+0BC6,U+1133c
* [indic] Add test for Grantha nukta that is allowed in Tamil by ScriptExtensions.txt
2017-02-16 09:40:21 -08:00
Behdad Esfahbod
d4bb52b9fd
Unbreak hb-coretext build
2017-02-09 14:13:25 -08:00
Behdad Esfahbod
c8dfed8e1e
Merge pull request #357 from khaledhosny/graphite-scale
...
[graphite] Fix shaping with varying font sizes
2017-02-08 14:36:18 -08:00
Behdad Esfahbod
7c47474f20
Set LC_ALL instead of LANG when creating harfbuzz.def
...
Hopefully fixes Travis faliure?
https://github.com/behdad/harfbuzz/pull/413#issuecomment-278481882
https://travis-ci.org/khaledhosny/harfbuzz/jobs/199785332#L1065
2017-02-08 14:33:28 -08:00
Philip Withnall
ffde3c9f9e
hb-font: Fix a potentially undefined use of memcmp() ( #413 )
...
While it’s fine to call memcmp(x, 0, 0) in practice, the C99 standard
explicitly says that this is not allowed: even if the length is zero,
the pointer arguments must be valid.
http://stackoverflow.com/a/16363034
Coverity ID: 141178
Signed-off-by: Philip Withnall <withnall@endlessm.com>
2017-02-08 13:56:57 -08:00
Behdad Esfahbod
73c6dcbb45
Silence Coverity warning
...
Fixes https://github.com/behdad/harfbuzz/issues/408
2017-02-07 16:53:21 -08:00
Behdad Esfahbod
466b3e58bd
Shuffle things around a bit
2017-02-03 16:57:15 -08:00
Behdad Esfahbod
fc8189b639
Minor
2017-02-03 16:17:08 -08:00
Behdad Esfahbod
d3d3691806
Add dirty-state tracking to hb_face_t
2017-02-03 15:42:03 -08:00
Behdad Esfahbod
2171f48b4b
Add dirty-state tracking to hb_font_t
2017-02-03 10:58:09 -08:00
Behdad Esfahbod
95808bad2c
Add new API hb_font_set_face()
...
For completeness.
2017-02-03 10:39:40 -08:00
jfkthame
4ec19319ab
Add Win10 Anniversary Update version of Tahoma to GDEF blacklist. ( #412 )
2017-02-02 10:48:23 -08:00
Behdad Esfahbod
1dd630a7f2
Minor
...
Fixes https://github.com/behdad/harfbuzz/issues/411
2017-02-01 11:57:21 -08:00
Behdad Esfahbod
e888f642db
Route Adlam through Arabic shaper
...
Fixes joined Adlam rendering.
Fixes https://github.com/googlei18n/noto-fonts/issues/828
2017-01-26 14:50:14 -08:00
jfkthame
72c754873c
Add Win7 version of himalaya.ttf to the GDEF table blacklist. ( #407 )
2017-01-26 14:35:41 -08:00
Behdad Esfahbod
22af28a3f1
[var] Implement MVAR table
...
Unhooked. Untested.
2017-01-23 23:42:53 -08:00
Behdad Esfahbod
67a191164d
[var] Whitespace
2017-01-23 23:21:30 -08:00
Behdad Esfahbod
79e8e27ffd
[var] Hook up advance variations to hb-ot-font
...
Yay, works!
2017-01-23 17:57:27 -08:00
Behdad Esfahbod
6074340371
[var] Fix bug in HVAR/VVAR impl
2017-01-23 17:55:16 -08:00
Behdad Esfahbod
bd3b11d926
[var] Prepare for hooking up advance variations to hb-ot-font
2017-01-23 17:37:19 -08:00
Behdad Esfahbod
a4fca9f005
[var] Implement DeltaSetIndexMap and advance delta fetching
...
Not hooked up to hb-ot-font yet.
2017-01-23 12:25:40 -08:00
Behdad Esfahbod
7b399f73ef
[var] Start adding HVAR/VVAR
2017-01-23 11:41:43 -08:00
Behdad Esfahbod
b732c53eb5
Add LArrayOf<>
2017-01-22 20:31:53 -08:00
Behdad Esfahbod
5e156fa5ed
Add LOffsetTo<>
2017-01-22 20:28:56 -08:00
Behdad Esfahbod
d6bdbbca30
[var] Remove HB_OT_TAG_fvar/avar
...
We're not going to define public macros for tags for tables.
There's little use to those and they are implementation detail.
2017-01-22 20:16:51 -08:00
Behdad Esfahbod
a11d9a0466
Minor
2017-01-22 20:11:57 -08:00
Behdad Esfahbod
7a860f656e
[var] Add macros for standard axes
2017-01-22 19:52:09 -08:00
Behdad Esfahbod
a484e237b1
[var] Implement 'avar' table mapping
...
Untested!
2017-01-22 19:41:33 -08:00
Behdad Esfahbod
5ec96d30ca
[var] Adjust API in prep for 'avar' implementation
...
The 'avar' table does not allow random access to axis maps,
so change API to avoid quadratic-time implementation.
Removed -hb_ot_var_normalize_axis_value(), added
+hb_ot_var_normalize_variations() and
+hb_ot_var_normalize_coords() instead.
2017-01-22 18:52:00 -08:00
Behdad Esfahbod
8a577aaa0d
[var] Stub implementation of avar table
2017-01-22 18:22:40 -08:00
Behdad Esfahbod
7647a05a0b
Minor
2017-01-22 17:47:49 -08:00
Behdad Esfahbod
d2f249e745
Stub out doc comments for new symbols
2017-01-22 17:42:33 -08:00
Behdad Esfahbod
5dfd341f51
Minor
2017-01-22 16:55:40 -08:00
Behdad Esfahbod
825e40407d
[hb-ft] Remove use of variable-length array
...
Hopefully also fixes build failure on msvc.
2017-01-22 16:41:45 -08:00
Behdad Esfahbod
47ee34e847
[var] Hook up variations to FreeType face
...
hb-view correctly renders variations with ft font-funcs now.
hb-ot-font needs HVAR implementation.
2017-01-21 18:10:08 -08:00
Behdad Esfahbod
bb1e19268f
[var] Rename var_coord to variation
...
Looks much better.
2017-01-21 17:42:50 -08:00
Behdad Esfahbod
64fe92bf2d
[var] Remove use of variable-length arrays
2017-01-21 15:36:35 -08:00
Behdad Esfahbod
2491134b38
[var] Add hb_font_set_var_coords()
2017-01-21 15:21:50 -08:00
Behdad Esfahbod
113393efec
Remove a few unused includes
2017-01-21 15:12:03 -08:00
Behdad Esfahbod
2d40923ca9
Minor
2017-01-21 15:06:15 -08:00
Behdad Esfahbod
8b2a580470
[var] Add hb_font_set_var_coords_design()
2017-01-21 15:05:00 -08:00
Behdad Esfahbod
0dcc7b49a8
[var] Minor lifecycle adjustment
2017-01-21 14:50:22 -08:00
Behdad Esfahbod
bf0d3a665b
[var] Add hb_font_get_var_coords_normalized()
2017-01-21 14:48:46 -08:00
Behdad Esfahbod
b3c0714b4b
[var] Add hb_var_coord_t and parsing routines
2017-01-20 20:30:03 -08:00
Behdad Esfahbod
72364103bc
Move code around
2017-01-20 20:16:53 -08:00
Behdad Esfahbod
785982bf83
[var] Flesh out some more
2017-01-20 20:05:45 -08:00
Behdad Esfahbod
422c0c36c8
[var] Flesh out a bit
2017-01-20 19:14:54 -08:00
Behdad Esfahbod
b8376b1090
Minor
2017-01-20 18:19:28 -08:00
Behdad Esfahbod
f2e73d37e7
[var] Remove over-optimization
2017-01-20 17:42:18 -08:00
Behdad Esfahbod
469926cc45
[var] Change double to float in API
2017-01-20 17:40:46 -08:00
Behdad Esfahbod
55d42fd667
Start adding hb-ot-var.h and implementation
...
Supports enumerating variation axes, normalizing values, etc.
2017-01-19 19:35:48 -08:00
Behdad Esfahbod
272b511532
Minor
2017-01-19 19:33:07 -08:00
Khaled Hosny
2452543fdd
[ot] Fix automatic fraction for RTL scripts ( #405 )
...
The numbers for right-to-left scripts are processed also from right to
left, so the order of applying “numr” and “dnom” features should be
reversed in such case.
Fixes https://github.com/behdad/harfbuzz/issues/395
2017-01-18 12:48:13 -08:00
Sascha Brawer
1337428e4f
Update language tags to OpenType 1.8.1 ( #403 )
...
Resolves https://github.com/behdad/harfbuzz/issues/324
2017-01-18 04:51:02 -08:00
Behdad Esfahbod
784d1180de
Fix build with clang
2017-01-11 11:58:13 -08:00
Behdad Esfahbod
1f810daf16
Port math table to hb_lazy_table_loader_t
2017-01-09 23:50:56 -08:00
Behdad Esfahbod
ebbcc11122
Add hb_lazy_table_loader_t
2017-01-09 22:47:47 -08:00
Behdad Esfahbod
1af9d924a4
Move lazy-loader to more generic place
2017-01-09 22:22:37 -08:00
Behdad Esfahbod
ac274331c2
In lazy-loading, remember allocation failure
2017-01-09 22:20:38 -08:00
Behdad Esfahbod
29fb0cb727
Minor
2017-01-09 21:18:55 -08:00
Behdad Esfahbod
93ef684b9b
Rename hb-ot-layout-math-table.hh to hb-ot-math-table.hh
2017-01-09 21:11:00 -08:00
Behdad Esfahbod
3b5263b0e9
Typo
2017-01-09 15:49:08 -08:00
Behdad Esfahbod
00adf9c8a4
Minor
...
Should be enough to get -hangul.cc out of SOURCES in Firefox build:
https://dxr.mozilla.org/mozilla-central/source/gfx/harfbuzz/src/moz.build
No one else should care!
2017-01-09 00:00:49 -08:00
Behdad Esfahbod
7cf9952e7f
[USE] Remove non-canonical decompositions
...
We have had added this in Indic shaper to assist shaping these scripts.
In Universal Shaping Engine however, it is up to font designer to
decompose them. Hence moving them from Indic shaper to USE was
wrong.
Fixup for f6ba63b2e8
Part of fixing https://github.com/behdad/harfbuzz/issues/387
2017-01-08 23:55:54 -08:00
Khaled Hosny
b435c7c46a
[graphite] Stop creating unused gr_face
...
It is unused after previous commit, hb_graphite2_font_get_gr_font()
makes no sense now so deprecating it.
2017-01-07 01:57:28 +02:00
Khaled Hosny
1b00a3b048
[graphite] Fix shaping with varying font sizes
...
Shape using design units and scale the output.
See https://bugs.documentfoundation.org/show_bug.cgi?id=103403#c7
2017-01-07 01:57:28 +02:00
Behdad Esfahbod
53543f8b3e
Ship UCDN and use it by default
...
So we are not relying on version of Unicode data in glib...
Fixes https://github.com/behdad/harfbuzz/issues/386
Fixes https://github.com/behdad/harfbuzz/issues/388
2017-01-05 20:12:32 -08:00
Frédéric Wang
ae00af4a47
Move math-specific code from hb-ot-layout to hb-ot-math #235 ( #384 )
2017-01-02 23:55:09 -05:00
Behdad Esfahbod
6cff753941
Remove Tibetan decomposition rules from Indic shaper
...
The decomposition is very obscure and unlikely to help
any fonts. Just remove it since Uniscribe probably doesn't
do this either.
Fixes https://github.com/behdad/harfbuzz/issues/382
2016-12-28 13:47:13 -05:00
Behdad Esfahbod
f6ba63b2e8
Port decompositions from Indic to USE shaper
...
Part of https://github.com/behdad/harfbuzz/issues/382
2016-12-28 13:45:32 -05:00
Behdad Esfahbod
e678b537f7
[indic] Remove Chakma decomposition rule from Indic shaper
...
This is now added to USE:
https://github.com/behdad/harfbuzz/pull/383
See:
https://github.com/behdad/harfbuzz/issues/381
https://github.com/behdad/harfbuzz/issues/382
2016-12-28 13:40:55 -05:00
jfkthame
49ba698124
[use] Special-case Chakma split-vowel decomp in the USE shaper. ( #383 )
2016-12-28 13:00:51 -05:00
Behdad Esfahbod
c4ca49d55b
Revert "[indic] Remove redundant Chakma decomposition rule"
...
This reverts commit 805f76fc00
.
Need to investigate why having this rule (with the reversed order)
fixes decomposition as reported by punchcutter:
https://github.com/behdad/harfbuzz/issues/381#issuecomment-269237796
2016-12-26 14:52:08 -05:00
Behdad Esfahbod
805f76fc00
[indic] Remove redundant Chakma decomposition rule
...
This was not used BTW since Chakma doesn't go through Indic shaper
anymore.
See:
https://github.com/behdad/harfbuzz/issues/381
https://github.com/behdad/harfbuzz/issues/382
2016-12-26 14:12:39 -05:00
Behdad Esfahbod
3cc48a46b5
[indix] Comment
2016-12-26 13:16:56 -05:00
nvelinov
7d1c5d8281
Compilation Error for ASSERT_STATIC on Some Compilers ( #380 )
...
* this pointer in type definitions is not interpreted as a constant.
This rule is not enforced strictly by all compilers, but the Green Hills Software compiler will regard this as an error.
* Merging branches for the DEFINE_SIZE_UNION macro
Adding check for the existence of static_size field in the tested member.
2016-12-23 19:46:37 -06:00
Behdad Esfahbod
e2b878055b
Disable OTL processing for Hebrew if GPOS doesn't have Hebrew subtable
...
New approach to fix this:
69f9fbc420
Previous approach was reverted as it was too broad. See context:
https://github.com/behdad/harfbuzz/issues/347#issuecomment-267838368
With U+05E9,U+05B8,U+05C1,U+05DC and Arial Unicode, we now (correctly) disable
GDEF and GPOS, so we get results very close to Uniscribe, but slightly different
since our fallback position logic is not exactly the same:
Before: [gid1166=3+991|gid1142=0+737|gid5798=0+1434]
After: [gid1166=3+991|gid1142=0@402,-26+0|gid5798=0+1434]
Uniscribe: [gid1166=3+991|gid1142=0@348,0+0|gid5798=0+1434]
2016-12-22 14:43:23 -06:00
Behdad Esfahbod
1a0f4aa6df
Revert "Synthesize GDEF glyph class for any glyph that does not have one in GDEF"
...
This reverts commit 69f9fbc420
.
See https://github.com/behdad/harfbuzz/issues/347#issuecomment-268873401
Fixes https://github.com/behdad/harfbuzz/issues/347
2016-12-22 14:43:14 -06:00
Behdad Esfahbod
4b4a1b9f23
Fix assert fail with contextual matching
...
As discovered by libFuzzer / Chromium fuzzing.
Fixes https://bugs.chromium.org/p/chromium/issues/detail?id=659496
CC https://github.com/behdad/harfbuzz/issues/139
2016-12-21 23:14:16 -06:00
Behdad Esfahbod
df98ce5fc8
Improve debug output with really deep nesting
2016-12-21 19:27:30 -06:00
Behdad Esfahbod
eab418c5e6
Avoid infinite loop in CoverageFormat2 iteration with bad fonts
...
Fixes https://github.com/behdad/harfbuzz/issues/363
2016-12-21 15:51:28 -06:00
Behdad Esfahbod
7ed71eb347
Protect collect_glyphs() and closure() against malicious DDOS fonts
...
Fixes https://github.com/behdad/harfbuzz/issues/363
2016-12-20 15:01:16 -06:00
Mike Hommey
1c98ff87c7
Support building with older glib versions
...
It is desirable to be able to build against older versions of glib.
fd7a245
changed the configure check to require glib > 2.38 for
G_TEST_DIST. Before that, version 2.16 was required, but in fact,
since aafe395
, G_PASTE is being used, which was introduced in 2.19.1.
And since 0ef179e2
, hb-glib uses GBytes, which were introduced in
2.31.10.
2.19.1 is rather old, but 2.38 is rather new. For Firefox, building
against 2.22 is still supported, although we could probably get away
with bumping that to 2.28. Either way, GBytes is not available.
Arguably, if you build against a glib that doesn't support GBytes,
you're not going to use the hb_glib_blob_create function, so we hide
the function when building against such a glib.
As for G_TEST_DIST, when building against versions of glib that don't
support it, we can fallback to the previous behavior, which, AIUI, was
just making the test not work when building in a separate directory.
2016-12-18 01:37:07 -06:00
Volker H. Simonis
ad273881c5
Minor fixes to pacify Coverity code scan
...
Fixes https://github.com/behdad/harfbuzz/pull/377
2016-12-18 00:14:06 -06:00
ebraminio
1e1825bf47
[dwrite] Provide an experimental API for justification ( #279 )
2016-12-17 10:30:40 +03:30
Behdad Esfahbod
219cb29c5d
Fix build after rebasing opentype-gx branch on top of MATH table
2016-12-16 19:06:26 -06:00
Behdad Esfahbod
0aedfd59be
[GX] Apply 'rvrn' feature before any other feature
2016-12-16 19:06:26 -06:00
Behdad Esfahbod
42c8142531
[GX] Fix build with older FreeType
2016-12-16 19:06:26 -06:00
Sascha Brawer
72873cf522
Call hb_font_set_var_coords_normalized() from FT_Face coords
2016-12-16 19:06:26 -06:00
Behdad Esfahbod
4ebbeb7c50
[GX] Make FeatureVariations actually work
...
Yay!!!!
2016-12-16 19:06:26 -06:00
Behdad Esfahbod
72ada4f0c6
[GX] Hook up feature variations
...
Shape-plan caching is not implemented.
2016-12-16 19:06:26 -06:00
Behdad Esfahbod
ec87ba9ba3
[GX] Add hb_ot_layout_feature_with_variations_get_lookups()
2016-12-16 19:06:26 -06:00
Behdad Esfahbod
30c42b644e
[GX] Add hb_ot_layout_table_find_feature_variations()
2016-12-16 19:06:26 -06:00
Behdad Esfahbod
7ceadbe981
Shuffle code around
2016-12-16 19:06:26 -06:00
Behdad Esfahbod
bde5e3959c
Move add_lookups from map to map-builder
...
In prep for more changes.
2016-12-16 19:06:26 -06:00
Behdad Esfahbod
26648cebcd
[GX] Remove (partial) support for anisotropic variations
...
It doesn't always work, not part of FreeType, and we were not going
to expose it in the API anyway. Can always be added later.
2016-12-16 19:06:26 -06:00
Behdad Esfahbod
c22176d4ba
[GX] Handle setting var coords to NULL
2016-12-16 19:06:26 -06:00
Behdad Esfahbod
59055b5494
[GX] Implement Feature Variations
...
Not hooked up to shaper yet.
2016-12-16 19:06:26 -06:00
Behdad Esfahbod
85ec494434
[GX] Fix another x/y thinko
...
Thanks Werner!
2016-12-16 19:06:26 -06:00
Behdad Esfahbod
cf3de4d8f7
[GX] Rename VarStore to VariationStore
2016-12-16 19:06:26 -06:00
Behdad Esfahbod
1f6ed356e0
[GX] Fix build with some compilers
...
Eg. https://ci.appveyor.com/project/behdad/harfbuzz/build/1.0.48/job/o9mnd33kcdeeg30r
hb-open-type-private.hh:103:29: error: static data member 'OT::Device::<anonymous union>::<anonymous struct>::static_size' in unnamed class [-fpermissive]
2016-12-16 19:06:26 -06:00
Behdad Esfahbod
250bcd6fb6
[GX] Skip tail zero entries when setting variation coordinates
2016-12-16 19:06:26 -06:00
Behdad Esfahbod
1124d2ece5
[GX] Fix thinko
2016-12-16 19:06:26 -06:00
Behdad Esfahbod
ad69e8f07c
[GX] Add new API hb_font_set_var_coords_normalized()
...
Will probably change.
2016-12-16 19:06:26 -06:00
Behdad Esfahbod
151d93de8a
[GX] Hook up GPOS to Variation Store stored in GDEF
...
Untested.
2016-12-16 19:06:26 -06:00
Behdad Esfahbod
dcfd309533
[GX] Change GDEF API to return varStore
2016-12-16 19:06:26 -06:00
Behdad Esfahbod
49cb87850c
[GX] Pass apply-context down to get_anchor()
...
Needed to access GDEF for varStore.
2016-12-16 19:06:26 -06:00
Behdad Esfahbod
f0c3fd8c9a
[GX] Add varStore member to GDEF
...
Still not hooked up from GPOS.
2016-12-16 19:06:26 -06:00
Behdad Esfahbod
5c971f8dbc
Minor change to GDEF, in prep for new version
2016-12-16 19:06:26 -06:00
Behdad Esfahbod
dc9f229799
[GX] Port variation stuff to Variation Store design
...
Not hooked up to GDEF yet.
2016-12-16 19:06:26 -06:00
Behdad Esfahbod
a7edeb6f02
Make OffsetArrayOf take OffsetType template argument
2016-12-16 19:06:26 -06:00
Behdad Esfahbod
8dddc231cf
[GX] Revert "[GX] Add VariationAlternates, to allow conditional lookups in GSUB/GPOS"
...
This reverts commit 2859f1c7174d6f7ae5dcf0db5411bc0182b21594.
We are going in a different direction.
2016-12-16 19:06:26 -06:00
Behdad Esfahbod
bb4d2e6ed5
[GX] Free GX coordinates
2016-12-16 19:06:26 -06:00
Behdad Esfahbod
baa329c6a1
[GX] Add compact VariationDevice implementation
...
Add compact format that uses signed bytes instead of shorts.
2016-12-16 19:06:26 -06:00
Behdad Esfahbod
71b06fd392
[GX] Add VariationAlternates, to allow conditional lookups in GSUB/GPOS
...
Not hooked up to runtime yet.
2016-12-16 19:06:26 -06:00
Behdad Esfahbod
976eeb8e02
[GX] Minor
2016-12-16 19:06:26 -06:00
Behdad Esfahbod
ed8a9067ca
[GX] Minor
2016-12-16 19:06:26 -06:00
Behdad Esfahbod
15c5ee6747
[GX] Minor rename
2016-12-16 19:06:26 -06:00
Behdad Esfahbod
4c535a822f
[GX] Hookup VariationDevice to Device table implementation
2016-12-16 19:06:26 -06:00
Behdad Esfahbod
a0c2366075
[GX] Break out early if factor is zero
...
Also disable sanity-checking of variation records.
2016-12-16 19:06:26 -06:00
Behdad Esfahbod
ca28670316
[GX] Towards anisotropic interpolation
...
Also hookup to ValueRecord and Anchors.
2016-12-16 19:06:26 -06:00
Behdad Esfahbod
6d9d3c55bb
[GX] Add data types for encoding numerical variations
2016-12-16 19:06:26 -06:00
Behdad Esfahbod
e4bfccfb2a
[CBDT] Minor
2016-12-04 19:45:46 -08:00
Behdad Esfahbod
b7068af423
[CBDT] Fix thinko!
2016-12-04 19:36:30 -08:00
Behdad Esfahbod
a141d1da9b
[CBDT] Implement IndexSubtableFormat3
2016-12-04 19:26:54 -08:00
Behdad Esfahbod
9eda74c92c
[cbdt] Move some more code around
2016-12-04 19:12:52 -08:00
Behdad Esfahbod
654f9ab0d8
[cbdt] Fix sign bug
...
Was introduced in d495fc5e38
2016-12-04 18:56:24 -08:00
Behdad Esfahbod
c27d6fcf8d
[cbdt] Last of sanitization fixes
...
Should be all good now..
2016-12-02 22:43:05 -08:00
Behdad Esfahbod
d495fc5e38
[cbdt] Clean up some more
...
Almost there..
2016-12-02 21:52:33 -08:00
Behdad Esfahbod
ce09e90e15
[cbdt] More sanitize work
2016-12-02 20:12:57 -08:00
Behdad Esfahbod
70eb2ff682
Check for offset overflows during sanitize
2016-12-02 19:51:23 -08:00
Behdad Esfahbod
4b58c9e326
[cbdt] Start fixing sanitization (or lack thereof)
2016-12-02 19:25:54 -08:00
Behdad Esfahbod
b92ba7bafc
[CBDT] Use CHAR instead of int8_t
2016-12-02 15:21:43 -08:00
Behdad Esfahbod
efca7bf97f
Rename 'ebdt' to 'cbdt' since we only support the PNG format
2016-12-02 15:11:37 -08:00
Seigo Nonaka
831852594b
Introduce get_extent support for color bitmap font. ( #351 )
...
hb_font_get_glyph_extents now works for color bitmap fonts.
Currently only font having index format 1 and image format 17
is supported.
2016-12-02 17:03:50 -06:00
Behdad Esfahbod
2b117720c0
Use horizontal ascent as fallback vertical origin
2016-10-26 18:12:50 +02:00
Behdad Esfahbod
a7b32f2057
Move code around
2016-10-26 18:08:41 +02:00
Behdad Esfahbod
63635c763d
[hb-ot-font] Use ascent+descent as fallback vertical advance
2016-10-26 18:01:24 +02:00
Behdad Esfahbod
9ee23c49a7
Fix vertical glyph origin with hb-ot-font
2016-10-26 18:01:24 +02:00
Behdad Esfahbod
b3b0816d5f
Fix vertical font metrics
...
Ouch!
2016-10-26 18:01:20 +02:00
Behdad Esfahbod
0e79ebb3ca
[gobject] Update for new MATH structs
2016-10-26 10:32:48 +02:00
Ebrahim Byagowi
bef240b36e
[ci] Whitelist more symbols and unbreak mac CI
...
Thanks to @khaledhosny, actually this is his work :)
2016-10-11 17:12:08 +03:30
Behdad Esfahbod
d1c62370a0
Aim math API for 1.3.3 instead of 1.4.0
2016-10-04 14:47:12 -07:00
Khaled Hosny
7adbc5dd62
Fix building math docs ( #335 )
2016-09-30 04:01:24 -07:00
Behdad Esfahbod
c3e21a6620
[MATH] Fix more docs
2016-09-27 16:51:38 +02:00
Behdad Esfahbod
46cc4a3a2a
[MATH] Rename hb_math_*_t types to hb_ot_math_*_t
...
With this, I believe MATH table API is not ready to be merged.
2016-09-27 16:44:22 +02:00
Frédéric Wang
0762b35474
Document API for MathVariants ( #330 )
2016-09-27 15:28:35 +02:00
Behdad Esfahbod
bc19f7fe20
[MATH] Add HB_OT_MATH_SCRIPT
2016-09-27 10:58:08 +02:00
Behdad Esfahbod
86106c7528
[MATH] Rename all API to hb_ot_math_*
2016-09-26 22:14:29 +02:00
Behdad Esfahbod
1ba767cd4e
[MATH] Move API from hb-ot-layout.h to hb-ot-math.h
2016-09-26 21:57:14 +02:00
Behdad Esfahbod
97b72da600
Whitespace
2016-09-26 21:53:25 +02:00
Behdad Esfahbod
559eb56447
[MATH] Wire up get_glyph_assembly()
2016-09-26 21:46:05 +02:00
Behdad Esfahbod
353f455af7
[MATH] Wire up get_glyph_variants()
2016-09-26 21:25:00 +02:00
Behdad Esfahbod
7fe0e28c22
[MATH] Start fleshing out glyph variant API
2016-09-26 17:51:47 +01:00
Behdad Esfahbod
1f3327f210
[MATH] Clean up math variants
2016-09-26 16:10:08 +01:00
Frédéric Wang
51da7a1cd6
MATH table: Add API to access math variants.
2016-09-26 15:18:16 +01:00
Behdad Esfahbod
8d58e3433e
[MATH] Fix get_kerning() with negative y-scale
2016-09-26 13:39:58 +01:00
Behdad Esfahbod
94f5df5626
[MATH] Clean up get_kerning()
2016-09-26 13:31:47 +01:00
Behdad Esfahbod
17ff30e9af
[MATH] Clean up get_top_accent_attachment()
...
Note, the function now returns "half of horizontal advance width"
if top accent attachment for glyph is not explicitly defined.
This is what the spec requires. Updated tests.
2016-09-26 12:21:27 +01:00
Behdad Esfahbod
8bcf517fe5
[MATH] Clean up get_italics_correction()
2016-09-26 12:13:14 +01:00
Behdad Esfahbod
06003f71ba
[MATH] Clean up a bit more
2016-09-26 12:07:29 +01:00
Behdad Esfahbod
54c0cc38fb
[MATH] Clean up get_math_constant implementation
2016-09-26 11:56:40 +01:00
Behdad Esfahbod
8a8cfad9a0
[MATH] Cleanup previous commit a bit
2016-09-26 11:51:07 +01:00
Frédéric Wang
d7182d1296
MATH Table: Add API to access glyph info.
2016-09-26 11:32:25 +01:00
Behdad Esfahbod
6fd2fe418d
[MATH] Fixup math constants commit a bit more
2016-09-26 11:24:39 +01:00
Behdad Esfahbod
1a381153a2
[MATH] Fixups for math constants commit
2016-09-26 11:15:59 +01:00
Frédéric Wang
319ff59161
MATH Table: Add API to access math contants.
2016-09-26 10:49:09 +01:00
Behdad Esfahbod
4d3892e9b0
[MATH] Fixups for previous commit
2016-09-26 10:45:58 +01:00
Frédéric Wang
5fbcb992bd
MATH Table: Add API to check availability of math data.
2016-09-26 10:27:33 +01:00
Ebrahim Byagowi
fc4e671f31
[coretext] Use intended coretext version check logic ( #315 )
2016-09-09 11:58:28 -07:00
Khaled Hosny
4867734528
Try to unbreak building on older macOS again ( #314 )
2016-09-07 18:44:37 -07:00
Dominik Röttsches
b717cd7be5
Do reconfigure the cascade list for Emoji font on OS X 10.9.5 ( #313 )
...
This seems to fix crash issues on 10.9.5 reported on Chrome, compare
crbug.com/549610
2016-09-07 13:56:57 -07:00
Dominik Röttsches
67e9fdf427
Blacklist Padauk 2.80 and 3.00 ( #311 )
...
According to comments in issue #305 broken GDEF tables lead
to incorrect rendering of Latin characters. Blacklisting
this font.
2016-09-05 01:27:25 -07:00
Ebrahim Byagowi
5362ce6a64
[dwrite] Minor, don't include unnecessary headers ( #309 )
2016-09-01 08:35:45 -07:00
Khaled Hosny
3d976d20f1
Show the shaper name in the debug message ( #306 )
2016-08-27 16:38:42 +03:00
Sascha Brawer
e7ecbba2cc
Support Americanist Phonetic Notation
...
OpenType language system tag: `APPH`
https://www.microsoft.com/typography/otspec/languagetags.htm
IETF BCP47 variant tag: `fonnapa`
http://www.iana.org/assignments/language-subtag-registry/language-subtag-registry
2016-08-18 14:13:26 +02:00
Khaled Hosny
a0f1b44b6c
[coretext] Blind fix for build on MacOS 10.9
2016-08-16 03:09:04 +02:00
Behdad Esfahbod
37f21bdbb7
Map Macao to ZHH lang tag
...
Fixes https://github.com/behdad/harfbuzz/issues/300
2016-08-08 17:57:06 -07:00
Behdad Esfahbod
09c7a2d6bf
Limit bits-per-feature to eight
...
Limits number of alternatives per glyph per feature to 255, so be it.
That's better than possibly breaking shaping because of one bad feature
value.
2016-08-08 17:29:30 -07:00
Behdad Esfahbod
333173103b
Fix sign of shift operators
...
This one:
map->mask = (1 << (next_bit + bits_needed)) - (1 << next_bit);
before the fix, the shift was done as an int, causing overflow
if it ever got to 1 << 31. Sprinkle 'u's around.
Fixes https://bugs.chromium.org/p/chromium/issues/detail?id=634805
2016-08-08 17:28:14 -07:00
Behdad Esfahbod
10a0d4aa22
Map zh-Hant-HK to ZHH
...
Fixes https://github.com/behdad/harfbuzz/issues/300
2016-08-08 16:51:08 -07:00
Behdad Esfahbod
489acf6c31
[coretext] "Fix" crashes on CoreText < 10.10
...
Fixes https://github.com/behdad/harfbuzz/issues/297
2016-07-22 17:41:43 -07:00
Behdad Esfahbod
08c08af2f9
[ucdn] Update to Unicode 9.0.0
...
Fixes https://github.com/grigorig/ucdn/issues/12
2016-07-21 01:35:30 -07:00
jfkthame
f3f6c1ccbf
Blacklist GDEF tables of more fonts
...
This is based on bug reports that have been filed against Firefox since it
updated to a version of harfbuzz that uses zeroing by GDEF rather than by
Unicode. I'm sure there are a bunch more font versions that should also be
included; these are just the ones I have on hand and have confirmed as having
bad GDEF data.
Given how the list here is growing, I think we should reconsider the approach,
and perhaps revert to zeroing by Unicode instead.
Fixes https://github.com/behdad/harfbuzz/issues/264
Fixes https://github.com/behdad/harfbuzz/pull/266
2016-07-21 01:15:12 -07:00
Behdad Esfahbod
34f9aa582c
Implement symbol cmap in ft and ot fonts
...
Fixes https://github.com/behdad/harfbuzz/issues/236
Fixes https://bugs.chromium.org/p/chromium/issues/detail?id=627953
2016-07-20 02:35:54 -07:00
Behdad Esfahbod
6363d7df28
Clean up buffer area when rewinding
...
Fixes https://bugs.chromium.org/p/chromium/issues/detail?id=614647
If allocation fails, we might be leaving junk behind. At least
clear it up.
2016-07-20 01:44:47 -07:00
Behdad Esfahbod
f80c34eb55
Whitespace
2016-07-12 11:18:26 -07:00
Ebrahim Byagowi
874421203e
[coretext] Speculative fix for CoreText nullptr access ( #288 )
2016-07-11 16:19:21 -07:00
Birunthan Mohanathas
6bf9db4f1e
[ft] Fix unsafe cast of FT_Done_Face in hb_ft_{face,font}_create_referenced ( #289 )
...
Prior to this change the function `FT_Error FT_Done_Face(FT_Face *)` was
called through a pointer with the signature `void (void *)` resulting in
undefined behaviour.
2016-07-11 13:38:23 -07:00
Steve Lhomme
0b8f3ab022
clang in MSVC mode doesn't like when we redefine __attribute__ ( #283 )
2016-07-11 12:57:26 -07:00
Khaled Hosny
e4d451ee55
[introspection] Fix hb_tag_from_string annotation
2016-07-02 00:04:57 +02:00
Behdad Esfahbod
d3e2a06b0f
[python] Use utf-32 / utf-16 based on build of Python
...
Fixes https://github.com/behdad/harfbuzz/pull/271
2016-06-30 11:01:22 -07:00
Behdad Esfahbod
fc9de44a03
Comments
2016-06-30 09:46:52 -07:00
Dominik Röttsches
1bea49eb4b
Merge branch 'master' into conflictingFontFix
2016-06-29 12:10:41 +02:00
Behdad Esfahbod
70e72e5f61
[gobject] Fix a few warnings
...
Part of https://github.com/behdad/harfbuzz/issues/277
2016-06-28 21:15:36 -07:00
Behdad Esfahbod
ae9054c740
Revert "use utf32"
2016-06-28 21:14:38 -07:00
Dominik Röttsches
7aa3631dd0
Merge branch 'master' into conflictingFontFix
2016-06-28 09:52:18 +02:00
Ebrahim Byagowi
8179ff5d7b
[dwrite] Don't allocate more than needed
...
Addressing Nikolay Sivov reviews on harfbuzz mailing list
2016-06-27 03:58:49 +04:30
Sascha Brawer
5967eaba72
[CPAL] Return 0xFFFF as name id for unnamed palettes
...
The name id 0 is used as Copyright notice. It's quite unlikely that a
font supplies a color palette with the exact same name as the font's
copyright notice, but the API should not prevent this.
Also, try to fix a problem with GObject introspection, where the
auto-generated Python bindings could not return palette colors.
2016-06-24 16:46:49 +02:00
Ebrahim Byagowi
07b724f341
[dwrite] Delete remained objects
...
No longer noticeable memory increase on create/destroy iterations,
highly better than current state of uniscribe backend
2016-06-24 14:29:24 +04:30
Ebrahim Byagowi
be565d1714
[dwrite] Release allocated blob on face destroy
...
This reduces memory consumption of my iterated font create/destroy cycle test
significantly and makes it much better than uniscribe backend even
2016-06-24 11:46:53 +04:30
Ebrahim Byagowi
f3f0ea980a
[dwrite] Remove ifdefs without breaking execution on old Windows versions
2016-06-23 17:26:55 +04:30
Ebrahim Byagowi
6b861dbd8b
[dwrite] Use stream font loader instead GDI interop
...
With help of
https://dxr.mozilla.org/mozilla-central/source/gfx/2d/NativeFontResourceDWrite.cpp
2016-06-23 15:57:34 +04:30
Dominik Röttsches
f7da0486ed
Merge branch 'master' into conflictingFontFix
2016-06-20 10:25:43 +03:00
Sascha Brawer
d34d3ac985
Support CPAL table
2016-06-19 13:17:57 +02:00
Kelvin
07461d06d2
Use UTF-32 in Python sample
2016-06-19 01:46:38 +03:00
Dominik Röttsches
a0223274b9
Discard reconfigured CTFont if URL changes
...
Fixes https://github.com/behdad/harfbuzz/issues/267
2016-06-16 14:19:39 +02:00
Behdad Esfahbod
4b8de1ea80
Round, not truncate, when scaling values
...
Fixes https://github.com/behdad/harfbuzz/issues/255
2016-06-06 23:08:54 -07:00
Behdad Esfahbod
bed201d2b8
Update for latest Unicode 9 data files
2016-06-06 14:14:24 -07:00
Behdad Esfahbod
aba4b0ca52
Add TODO
2016-06-01 16:57:29 -07:00
Behdad Esfahbod
a2b03de5b3
[myanmar] Handle U+AA74..U+AA76
...
Fixes https://github.com/behdad/harfbuzz/issues/218
2016-05-06 17:56:07 +01:00
Behdad Esfahbod
9b6312f945
[use] Update to draft spec from Andrew Glass from August 2015
2016-05-06 17:41:49 +01:00
Behdad Esfahbod
3e4e7616a8
[use] Add a catch-all clause to the machine
2016-05-06 17:28:25 +01:00
Behdad Esfahbod
d04e461fe3
[use] Fix 'Number-joiner terminated cluster' to use HN instead of H
...
From draft update to USE.
2016-05-06 17:17:00 +01:00
Behdad Esfahbod
359dead960
Allow MultipleSubst to delete glyph
...
Fixes https://github.com/behdad/harfbuzz/issues/253
Hopefully we got the logic right.
2016-05-06 16:19:19 +01:00
Behdad Esfahbod
3c1666cfb5
[indic] Remove more unused logic after Javanese is gone
2016-05-06 16:05:07 +01:00
Behdad Esfahbod
8b5d6e755b
[indic] Remove unused Javanese bits
2016-05-06 15:59:27 +01:00
Behdad Esfahbod
30e6e29f0f
[indic/use] Move Javanese from Indic shaper to USE
...
Fixes https://github.com/behdad/harfbuzz/issues/243
With javatext.ttf, the reodering medial Ra gets its advance width
zero'ed in Uniscribe implementation, and the font adds the advance
back. Our Indic shaper does not do that, but USE does. So, route
Javanese through USE. That's what Microsoft does anyway. Test:
U+A9A5,U+A9BA
This also seems to fix the following sequence, and variations thereof:
U+A99F,U+A9C0,U+A9A2,U+A9BF
2016-05-06 15:52:27 +01:00
Behdad Esfahbod
01a30a6aa9
[indic] Remove data for scripts that don't go thorough this shaper
2016-05-06 12:10:07 +01:00
Behdad Esfahbod
7cd9269f4e
Update tables to Unicode 9.0.0 beta
...
Fixes https://github.com/behdad/harfbuzz/issues/251
2016-05-06 12:10:03 +01:00
Behdad Esfahbod
f718fe370e
Minor
2016-05-06 12:10:00 +01:00
Behdad Esfahbod
691086f131
Add Unicode 9 beta scripts
...
These are frozen, so good time to add.
2016-05-06 12:09:53 +01:00
Behdad Esfahbod
bc5198fe12
Whitespace
2016-05-06 12:09:49 +01:00
Behdad Esfahbod
9879fc1db3
[ot-font] Remove unused 'post' table include for now
...
To make a release...
2016-05-02 10:29:12 +02:00
Behdad Esfahbod
f00ab2a33a
[hb-ot-font] Make 'glyf' table loading lazy
...
Apparently some clients have reference-table callbacks that copy the table.
As such, avoid loading 'glyf' table which is only needed if fallback positioning
happens.
2016-05-02 10:24:00 +02:00
Behdad Esfahbod
587d46227a
[ot-font] Start implementing 'post' table, for accessing glyph names
2016-04-30 19:20:56 +02:00
Behdad Esfahbod
9abaaac409
Merge commit '264b7a728a41becfbf23ce258fc2a3af19d0cbbe' into HEAD
2016-04-27 03:38:24 -07:00
Behdad Esfahbod
2f560ee44b
[tibetan] Reorder marks to better match Uniscribe
...
Fixes https://github.com/behdad/harfbuzz/issues/237
Note that Uniscribe enforces a certain syllable order. We don't.
But with this change, I get all of the tibetan contractions pass
with Microsoft Himalaya font.
2016-04-27 03:11:41 -07:00
Arthur Reutenauer
adafdcddce
Mass-added “difficult” tags – to be curated.
2016-04-27 02:14:16 +02:00
Arthur Reutenauer
3d6a2c0d7d
Initial import of missing OpenType 1.7 language tags.
2016-04-27 02:14:16 +02:00
Behdad Esfahbod
7e2da035f6
Undo accidental change
2016-04-26 16:42:25 -07:00
Behdad Esfahbod
b20305022a
Do NOT ignore Mongolian Free Variation Selectors during matching
...
Fixes https://github.com/behdad/harfbuzz/issues/234
2016-04-26 16:41:17 -07:00
Behdad Esfahbod
21ab5501f5
Move ZWJ/ZWNJ bits to top byte of unicode_props()
...
To make room to remember Mongolian Free Variation Selectors.
Part of fixing https://github.com/behdad/harfbuzz/issues/234
2016-04-26 16:15:22 -07:00
Behdad Esfahbod
29393884b9
Annotate blacklisted fonts with their sha1sum
2016-04-26 10:35:47 -07:00
Konstantin Ritt
5069062d0a
Unbreak build on Windows CE
...
0475ef2f97
broke the build by using
vsnprintf(), which is not defined on Windows CE
2016-04-26 12:02:26 +04:00
Behdad Esfahbod
1c625dff22
Minor
2016-04-09 12:53:23 -07:00
Behdad Esfahbod
851b0db36d
Minor. We should never get to this branch, but fix it anyway.
2016-04-08 23:46:55 -07:00
Behdad Esfahbod
4f3d59a187
Blacklist another set of timesi.ttf and timesbi.ttf
2016-04-08 13:41:20 -07:00
Behdad Esfahbod
ef476be80d
Merge pull request #239 from ebraminio/dwfix
...
Improve DirectWrite backend
2016-04-08 13:16:33 -07:00
Ebrahim Byagowi
d3134a66ad
Fix when no feature is given
2016-04-05 21:42:37 +00:00
Behdad Esfahbod
59089622db
[coretext] Clarify comment
2016-04-04 14:56:15 -07:00
Behdad Esfahbod
6dd80faf0d
Fix FixedVersion::to_int()
...
Ouch. Had broken it in 9a13ed453e
Fixes https://github.com/behdad/harfbuzz/issues/238
Will add test soon.
2016-04-04 14:34:25 -07:00
Ebrahim Byagowi
4a10402169
Hide justification behind HB_DIRECTWRITE_EXPERIMENTAL_JUSTIFICATION
2016-04-02 13:47:59 +00:00
Ebrahim Byagowi
63ee9ca5d8
Use standard types instead Windows favourites ones
2016-04-01 15:47:07 +00:00
Ebrahim Byagowi
adf20ba0d1
Limit GetJustifiedGlyphs only to scripts with custom justification character
2016-04-01 15:36:40 +00:00
Ebrahim Byagowi
32ae9d1b3f
Add justification support
2016-04-01 14:39:07 +00:00
Ebrahim Byagowi
10c3d9e415
Basic opentype features support
2016-04-01 01:39:15 +00:00
Ebrahim Byagowi
d129897120
Refactor and remove dupe getglyphs call
2016-03-31 13:47:32 +00:00
Ebrahim Byagowi
5f1a896100
Better glyph offset support
2016-03-31 12:43:37 +00:00
Ebrahim Byagowi
d691ba3f40
Don't fail when language is not set
2016-03-30 20:50:28 +00:00
Ebrahim Byagowi
1c00a46c7a
Make DirectWrite backend to work with different font sizes
...
Actually copyedited same logic from Uniscribe to make it just work
2016-03-30 20:15:09 +00:00
Behdad Esfahbod
69f9fbc420
Synthesize GDEF glyph class for any glyph that does not have one in GDEF
...
Previously we only synthesized GDEF glyph classes if the glyphClassDef
array in GDEF was null. This worked well enough, and is indeed what
OpenType requires: "If the font does not include a GlyphClassDef table,
the client must define and maintain this information when using the
GSUB and GPOS tables." That sentence does not quite make sense since
one needs Unicode properties as well, but is close enough.
However, looks like Arial Unicode as shipped on WinXP, does have GDEF
glyph class array, but defines no classes for Hebrew. This results
in Hebrew marks not getting their widths zeroed. So, with this change,
we synthesize glyph class for any glyph that is not specified in the
GDEF glyph class table. Since, from our point of view, a glyph not
being listed in that table is a font bug, any unwanted consequence of
this change is a font bug :).
Note that we still don't get the same rendering as Uniscribe, since
Uniscribe seems to do fallback positioning as well, even though the
font does have a GPOS table (which does NOT cover Hebrew!). We are
not going to try to match that though.
Test string for Arial Unicode:
U+05E9,U+05B8,U+05C1,U+05DC
Before: [gid1166=3+991|gid1142=0+737|gid5798=0+1434]
After: [gid1166=3+991|gid1142=0+0|gid5798=0+1434]
Uniscribe: [gid1166=3+991|gid1142=0@348,0+0|gid5798=0+1434]
Note that our new output matches what we were generating until July
2014, because the Hebrew shaper used to zero mark advances based on
Unicode, NOT GDEF. That's 9e834e29e0
.
Reported by Greg Douglas.
2016-03-17 11:59:43 -07:00
Behdad Esfahbod
fef5dd9a72
Merge pull request #232 from c0nk/wip-icu
...
Add --with-icu=builtin option; fix compile error
2016-03-12 19:15:15 -08:00
Behdad Esfahbod
3e10460a1d
Minor comment
2016-03-11 18:45:19 -08:00
Behdad Esfahbod
d14fea4bdc
Remove default clause in minor switch statements
...
Bending to clang warnings...
https://bugs.chromium.org/p/chromium/issues/detail?id=593057
2016-03-08 12:16:41 -08:00
Behdad Esfahbod
ce8ae99701
Merge pull request #231 from KonstantinRitt/post123buildfix
...
Fix build with HB_DISABLE_DEPRECATED
2016-03-04 17:20:35 -08:00
Behdad Esfahbod
731a430cd3
Fix requiredFeature stage handling logic
...
Originally the way Jonathan had written this was correct in
"continue"ing:
35e28c7a73 (diff-ead86a33a5cc9ad7f6e6381031a0baddR199)
When I rewrote his patch, I messed it up:
da13293798 (diff-ead86a33a5cc9ad7f6e6381031a0baddR209)
the intended behavior was NOT to set found=TRUE and NOT to continue.
This was resulting in feature_index[table_index] being left unset.
Oops!
2016-03-02 13:32:42 -08:00
Behdad Esfahbod
68b6296d33
Add F2DOT14 type
2016-03-01 16:41:53 +09:00
Behdad Esfahbod
082b79fe9f
Use FWORD and UFWORD when it makes sense
...
I had forgotten about those types.
2016-03-01 16:41:26 +09:00
Kal Conley
5f995db103
Fix missing ICU #include
...
Fix compile error in hb-icu.cc when ICU configured with
U_NO_DEFAULT_INCLUDE_UTF_HEADERS=1
2016-02-26 00:36:17 +01:00
Kal Conley
b424b6c372
Add --with-icu=builtin configure option
2016-02-26 00:35:15 +01:00
Konstantin Ritt
71248a843f
Fix build with HB_DISABLE_DEPRECATED
...
When HB_DISABLE_DEPRECATED is defined, no code from hb-deprecated.h
should be used, even from within HB itself.
2016-02-25 18:55:28 +04:00
Behdad Esfahbod
0c7fb7419c
Speed up buffer variable allocation sanity check
...
This makes defining HB_NDEBUG much less relevant, to the
point of irrelevance. Sorry about all the fuss in previous
release!
2016-02-25 14:40:09 +09:00
Behdad Esfahbod
91dd115652
Add HB_NDEBUG
...
API changes:
- If NDEBUG is defined, define HB_NDEBUG
- Disable costlier sanity checks if HB_NDEBUG is defined.
In 1.2.3 introduced some code to disable costly sanity checks if
NDEBUG is defined. NDEBUG, however, disables all assert()s as
well. With HB_NDEBUG, one can disable costlier checks but keep
assert()s.
I'll probably add a way to define HB_NDEBUG automatically in
release tarballs. But for now, production systems that do NOT
define NDEBUG, are encouraged to define HB_NDEBUG for our build.
2016-02-25 13:56:47 +09:00
Behdad Esfahbod
988165021f
Disable internal buffer variable bookkeeping in NDEBUG builds
...
Saves some sweet time and binary size!
2016-02-25 12:23:02 +09:00
Behdad Esfahbod
94dd0bb7e7
Add blacklist signature for Times New Roman (Bold) Italic on OS X
2016-02-25 11:31:03 +09:00
Behdad Esfahbod
e23cf902e9
Blacklist GDEF table of timesi.ttf and timesbi.ttf on Win 7
...
See discussion:
https://lists.freedesktop.org/archives/harfbuzz/2016-February/005489.html
2016-02-25 11:11:15 +09:00
Behdad Esfahbod
c335fd7986
In trampoline implementation of get_glyph(), don't destroy user data twice!
2016-02-25 09:16:05 +09:00
Behdad Esfahbod
23335deaad
[ot-font] Accelerate cmap format4 get_glyph
2016-02-24 20:27:13 +09:00
Behdad Esfahbod
e0f16a715b
[ot-font] Towards accelerating get_glyph()
2016-02-24 19:52:36 +09:00
Behdad Esfahbod
5473ebfb84
[ot-font] Remove level of indirection in get_glyph_variant
2016-02-24 19:32:43 +09:00
Behdad Esfahbod
8b5bc141cd
Add get_nominal_glyph() and get_variation_glyph() instead of get_glyph()
...
New API:
- hb_font_get_nominal_glyph_func_t
- hb_font_get_variation_glyph_func_t
- hb_font_funcs_set_nominal_glyph_func()
- hb_font_funcs_set_variation_glyph_func()
- hb_font_get_nominal_glyph()
- hb_font_get_variation_glyph()
Deprecated API:
- hb_font_get_glyph_func_t
- hb_font_funcs_set_glyph_func()
Clients that implement their own font-funcs are encouraged to replace
their get_glyph() implementation with a get_nominal_glyph() and
get_variation_glyph() pair. The variation version can assume that
variation_selector argument is not zero.
2016-02-24 19:05:23 +09:00
Behdad Esfahbod
ebd7431f82
Partially revert 86c68c7a2c
...
That commit moved the advance adjustment for mark positioning to
be applied immediately, instead of doing late before. This breaks
if mark advances are zeroed late, like in Arabic. Also, easier to
hit it in RTL scripts since a single mark with non-zero advance is
enough to hit the bug, whereas in LTR, at least two marks are needed.
This reopens https://github.com/behdad/harfbuzz/issues/211
The cursive+mark interaction is broken again. To be fixed in a
different way.
2016-02-24 15:53:40 +09:00
Behdad Esfahbod
815bdd7700
In cluster-level=0, group ZWJ/ZWNJ with previous cluster
...
This better emulates Unicode grapheme clusters.
Note that Uniscribe does NOT do this, but should be harmless with most clients,
and improve fallback with clients that use HarfBuzz cluster as unit of fallback.
Fixes https://github.com/behdad/harfbuzz/issues/217
2016-02-22 18:22:44 +09:00
Behdad Esfahbod
89137e325a
Minor
2016-02-22 16:00:59 +09:00
Behdad Esfahbod
15063b12f7
[coretext] Move CTFont construction to face_data
2016-02-22 15:56:29 +09:00
Behdad Esfahbod
ba3d49d9a5
[coretext] Move code around
2016-02-22 15:50:12 +09:00
Behdad Esfahbod
90194efb84
[coretext] Move code around
2016-02-22 15:42:53 +09:00
Behdad Esfahbod
9a13ed453e
Make FixedVersion a template
2016-02-22 15:38:44 +09:00
Behdad Esfahbod
238b943e85
[coretext] Fix leak!
2016-02-22 15:31:22 +09:00
Behdad Esfahbod
e561122856
[coretext] Move code around
2016-02-22 15:28:37 +09:00
Behdad Esfahbod
04c6443153
[coretext] Ignore PPEM in font size selection
2016-02-22 15:12:27 +09:00
Behdad Esfahbod
62c2711121
[coretext] Limit grapheme-cluster forming to cluster-level=0
2016-02-22 15:07:20 +09:00
Behdad Esfahbod
061105ec44
[coretext] Fix shaping with varying font size
...
Fixes https://github.com/libass/libass/issues/212
2016-02-22 14:59:39 +09:00
Behdad Esfahbod
b87e36f6f1
Avoid buffer->move_to() in case of buffer error
...
Fixes https://github.com/behdad/harfbuzz/issues/223
Right now we cannot test this because it has to be tested using hb-fuzzer.
We should move all fuzzing tests from test/shaping/tests/fuzzed.tests to
test/fuzzing/ and have its own test runner. At that point, should add
test from this issue as well.
2016-02-19 14:52:31 +07:00
Behdad Esfahbod
568a0c60e8
Remove pointless overflow check in pointer math
...
Fixes https://github.com/behdad/harfbuzz/issues/227
2016-02-18 19:31:51 +07:00
Behdad Esfahbod
aae2847099
Emoji skin tone modifiers need to be treated as combining marks
...
Fixes https://github.com/behdad/harfbuzz/issues/169
2016-02-18 17:06:25 +07:00
Behdad Esfahbod
da41e48f0a
[USE] Zero mark advances by GDEF early
...
This is what Microsoft's implementation does. Marks that need advance
need to add it back using 'dist' or other feature in GPOS. Update tests to
match.
2016-02-16 17:16:33 +07:00
Behdad Esfahbod
86c68c7a2c
[GPOS] Fix interaction of mark attachments and cursive chaining
...
Fixes https://github.com/behdad/harfbuzz/issues/211
What happens in that bug is that a mark is attached to base first,
then a second mark is cursive-chained to the first mark. This only
"works" because it's in the Indic shaper where mark advances are
not zeroed.
Before, we didn't allow cursive to run on marks at all. Fix that.
We also where updating mark major offsets at the end of GPOS, such
that changes in advance of base will not change the mark attachment
position. That was superior to the alternative (which is what Uniscribe
does BTW), but made it hard to apply cursive to the mark after it
was positioned. We could track major-direction offset changes and
apply that to cursive in the post process, but that's a much trickier
thing to do than the fix here, which is to immediately apply the
major-direction advance-width offsets... Ie.:
https://github.com/behdad/harfbuzz/issues/211#issuecomment-183194739
If this breaks any fonts, the font should be fixed to do mark attachment
after all the advances are set up first (kerning, etc).
Finally, this, still doesn't make us match Uniscribe, for I explained
in that bug. Looks like Uniscribe applies minor-direction cursive
adjustment immediate as well. We don't, and we like it our way, at
least for now. Eg. the sequence in the test case does this:
- The first subscript attaches with mark-to-base, moving in x only,
- The second subscript attaches with cursive attachment to first subscript
moving in x only,
- A final context rule moves the first subscript up by 104 units.
The way we do, the final shift-up, also shifts up the second subscript
mark because it's cursively-attached. Uniscribe doesn't. We get:
[ttaorya=0+1307|casubscriptorya=0@-242,104+-231|casubscriptnarroworya=0@20,104+507]
while Uniscribe gets:
[ttaorya=0+1307|casubscriptorya=0@-242,104+-211|casubscriptnarroworya=0+487]
note the different y-offset of the last glyph. In our view, after cursive,
things move together, period.
2016-02-16 16:07:20 +07:00
Behdad Esfahbod
80c8855cfe
Minor
2016-02-12 12:50:17 +07:00
Behdad Esfahbod
6ab920224c
[GPOS] Minor
...
No effect.
2016-02-11 16:57:52 +07:00
Behdad Esfahbod
cbc3a76c5a
[GPOS] Merge fixing of offsets for cursive and mark attachments
...
Part of fixing https://github.com/behdad/harfbuzz/issues/211
2016-02-11 16:48:13 +07:00
Behdad Esfahbod
7d8d58ac81
[GPOS] Divide position_finish() into two phases, for advances and offsets
...
Right now the position_finish_advances() is empty. To be used for
spacing attachments proposal later.
2016-02-11 16:34:28 +07:00
Behdad Esfahbod
8474231567
[ot] Minor shuffling code around
2016-02-11 16:27:41 +07:00
Behdad Esfahbod
b0b11614e9
[GPOS] Add harmless recursion in fix_mark_attachment()
...
Will do nothing. Just useful for merging two functions.
2016-02-11 15:28:55 +07:00
Behdad Esfahbod
686567baab
[GPOS] Merge attach_chain() and cursive_chain()
...
Differentiate, using new attach_type().
2016-02-11 15:25:28 +07:00
Behdad Esfahbod
806ad8dc65
[GPOS] Minor shuffling
2016-02-11 14:53:11 +07:00
Behdad Esfahbod
0f6278d1fb
[GPOS] Negate sign of attach_lookback(), and rename it to attach_chain()
...
No behavior change. Preparing to unify how cursive and mark attachments
work.
2016-02-11 14:49:10 +07:00
Behdad Esfahbod
660c9d3fc2
Remove font-dependent ASCII-only perf hack
...
Is confusing. I already hit it myself. Remove. We can optimize
ASCII based on Unicode properties. But should not do based on
assumptions on the font.
2016-02-11 12:14:27 +07:00
Behdad Esfahbod
eaadcbbc53
Remove now-unused mark zeroing BY_UNICODE
2016-02-10 18:29:54 +07:00
Behdad Esfahbod
b3582a8ee8
Change default mark advance zeroing behavior from Unicode to GDEF
...
See thread at:
https://lists.freedesktop.org/archives/harfbuzz/2016-February/005462.html
2016-02-10 18:10:15 +07:00
Chun-wei Fan
c679285455
build: Build the DirectWrite sources if requested
...
This adds to the autotools build system so that the (experimental)
DirectWrite support for HarfBuzz is built (and dist'ed).
2016-02-03 20:14:42 +08:00
Chun-wei Fan
35ded3af74
build: Move source listings into separate Makefile snippets
...
This moves all the source listings in src/Makefile.am,
src/hb-ucdn/Makefile.am and util/Makefile.am into separate Makefile
snippets, so that they may be shared between different Makefile-based
build systems, such as NMake for Visual Studio.
2016-02-03 18:14:29 +08:00
Behdad Esfahbod
b894a85ad1
Fix more hangs in case of buffer allocation errors
...
Hopefully
fixes https://github.com/behdad/harfbuzz/issues/214
2016-02-02 16:39:19 +08:00
Behdad Esfahbod
9a6a33ccbe
Merge pull request #216 from mhosken/master
...
Refactor graphite2 to make ovleraps into negative width spaces
2016-01-18 12:47:18 +01:00
Martin Hosken
146fe252c3
Refactor graphite2 to make ovleraps into negative width spaces
2016-01-16 17:24:00 -06:00
Behdad Esfahbod
d05b783322
Fix compiler warning
...
Fixes https://github.com/behdad/harfbuzz/issues/212
2016-01-12 16:17:21 +00:00
Behdad Esfahbod
d163dc18e6
Minor
2016-01-12 13:05:01 +00:00
Behdad Esfahbod
3e704521f6
[OT] Get list of lookup subtables once and loop through them
...
This speeds up shaping the Amiri font by over 15%.
This was primarily needed for my work on OpenType GX, since
we will be collecting only sublookups that are "active" for
current font instance; but it's a nice boost in general as
well.
We might, in the future, collect subtables in the lookup_accel.
That would also allow us to do a per-subtbale set-digest, which
should speed things up some more, specially for ContextChainFormat3
lookups... Amiri, for example, contains one lookup with 53
subtables!
2016-01-11 17:38:41 +00:00
Behdad Esfahbod
97624d9244
[docs] Minor fixes.
2016-01-11 12:58:45 +00:00
Behdad Esfahbod
a39ff95fce
[coretext] Speed up CoreText font fallback
...
Fixes https://code.google.com/p/chromium/issues/detail?id=547912
2016-01-11 12:28:37 +00:00
Behdad Esfahbod
25671466d2
Add 9 reserved entries to hb_font_extents_t
...
Might add italic-angle, underline/strikethrough-position/thickness
in the future. Do this before new struct goes into a release.
2016-01-07 19:13:47 +00:00
Behdad Esfahbod
e6d5e4c310
[uniscribe] Fix negative advance
...
This happens with at least one test font I have.
2016-01-06 12:29:50 +00:00
Behdad Esfahbod
53c47c8582
Increase sanitize edit count from 8 to 32
...
See previous commit.
2016-01-05 13:26:20 +00:00
Behdad Esfahbod
da2fcfdc51
Don't count fixing-up FeatureParams offset as error
...
The font Garamond Premier Pro Caption (and possibly many other
Adobe fonts), have many FeatureParamsSize tables with the old
wrong offset. We handle fixing those up, but they were still
contributing to edit_count, and when I reduced HB_SANITIZE_MAX_EDIT
from 100 to 8 in 14c2de3218
, these
fonts were now getting GPOS dropped and hence kerning disabled.
Fix, by not counting edits made towareds offset fix-up. I'll
also increase edit count again, in the next commit.
2016-01-05 13:23:45 +00:00
Behdad Esfahbod
d0adc80965
Check magicNumber in head table during sanitize
2016-01-02 13:25:36 +00:00
Khaled Hosny
9ab9f974d4
[docs] More buffers documentation
2016-01-01 20:38:21 +04:00
Behdad Esfahbod
bfdf684f79
Merge pull request #205 from khaledhosny/more-docs
...
More docs
2015-12-30 22:20:14 +01:00
Nico Weber
a7f0e25daf
Remove unused HB_SHAPER_DATA_ENSURE_DECLARE lines.
...
The coretext_aat shaper delegates to the regular coretext_..._ensure() functions, so coretext_aat_..._ensure() functions defined by these macros are unused. The compiler warns about them, which in turn can confuse people to think that the coretext_aat_..._ensure() functions weren't called by accident.
2015-12-30 16:05:52 -05:00
Khaled Hosny
9cffe329f1
[docs] Typo
2015-12-30 22:50:08 +04:00
Behdad Esfahbod
b758e5ea22
Merge pull request #203 from nico/patch-1
...
Remove unused `retry:` label.
2015-12-30 16:44:19 +01:00
Khaled Hosny
fb192c263e
[docs] A bit more buffers documentation
2015-12-30 17:59:01 +04:00
Khaled Hosny
8ab797c5b8
[docs] A bit more buffers documentation
2015-12-30 17:59:01 +04:00
Khaled Hosny
f18d2226b6
[docs] Some documentation on buffers
...
Some of it (create, reference, destroy) are adapted from Cairo docs.
2015-12-30 17:59:01 +04:00
Khaled Hosny
d7bf9d05c5
[docs] Fix comment syntax
...
To lower the number of gtk-doc warnings.
2015-12-30 17:58:53 +04:00
Nico Weber
8b1224f0ee
Remove unused `retry:` label.
...
Fixes a -Wunused-label warning when building harfbuzz with clang -Wall.
2015-12-28 21:31:28 -05:00
Behdad Esfahbod
fc38e6034c
[layout] Collect coverage glyphs in PairPos
...
Apparently class=0 is used for ClassDef1. See:
https://github.com/adobe-type-tools/afdko/issues/90
2015-12-23 14:50:53 +01:00
Behdad Esfahbod
8718dae818
[python] Hook up sample debugger
2015-12-18 19:53:40 +00:00
Behdad Esfahbod
0475ef2f97
[buffer] Add debugging, aka, message, API
...
Currently just announces lookup applications. Message-API *will* change.
hb-shape / hb-view are updated to print-out messages to stder if --debug
is specified.
2015-12-18 19:29:06 +00:00
Behdad Esfahbod
9ea0aa43ac
Don't deserialize positions if buffer has no positions
2015-12-18 17:30:57 +00:00
Behdad Esfahbod
862b1644e9
[use] Only set syllable-based topographical features if not Arabic-joining
2015-12-18 13:54:06 +00:00
Behdad Esfahbod
45b7ec3652
[indic] Followup fix for Malayalam context matching
...
We regeressed Malayalam in 508cc3d3cf
This brings down the failures to 198 (from 750).
BENGALI: 353725 out of 354188 tests passed. 463 failed (0.130722%)
DEVANAGARI: 707307 out of 707394 tests passed. 87 failed (0.0122987%)
GUJARATI: 366349 out of 366457 tests passed. 108 failed (0.0294714%)
GURMUKHI: 60732 out of 60747 tests passed. 15 failed (0.0246926%)
KANNADA: 951190 out of 951913 tests passed. 723 failed (0.0759523%)
KHMER: 299070 out of 299124 tests passed. 54 failed (0.0180527%)
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: 1091753 out of 1091754 tests passed. 1 failed (9.15957e-05%)
TELUGU: 970555 out of 970573 tests passed. 18 failed (0.00185457%)
MYANMAR: 1123865 out of 1123883 tests passed. 18 failed (0.00160159%)
2015-12-18 13:47:16 +00:00
Behdad Esfahbod
2813e3049a
[indic] Update data tables to Unicode 8.0
...
Test stats remain unchanged, except for Malayalam, which we investigate:
BENGALI: 353725 out of 354188 tests passed. 463 failed (0.130722%)
DEVANAGARI: 707307 out of 707394 tests passed. 87 failed (0.0122987%)
GUJARATI: 366349 out of 366457 tests passed. 108 failed (0.0294714%)
GURMUKHI: 60732 out of 60747 tests passed. 15 failed (0.0246926%)
KANNADA: 951190 out of 951913 tests passed. 723 failed (0.0759523%)
KHMER: 299070 out of 299124 tests passed. 54 failed (0.0180527%)
MALAYALAM: 1047584 out of 1048334 tests passed. 750 failed (0.0715421%)
ORIYA: 42320 out of 42329 tests passed. 9 failed (0.021262%)
SINHALA: 271662 out of 271847 tests passed. 185 failed (0.068053%)
TAMIL: 1091753 out of 1091754 tests passed. 1 failed (9.15957e-05%)
TELUGU: 970555 out of 970573 tests passed. 18 failed (0.00185457%)
Myanmar, compared to Windows 10 mmrtext.ttf:
MYANMAR: 1123865 out of 1123883 tests passed. 18 failed (0.00160159%)
2015-12-18 11:05:11 +00:00
Behdad Esfahbod
fc06cff40f
Remove HB_OT_SHAPE_ZERO_WIDTH_MARKS_DEFAULT
...
The DEFAULT naming wasn't helpful, so just remove it.
2015-12-17 17:47:35 +00:00
Behdad Esfahbod
508cc3d3cf
[indic] Allow context when matching for Malayalam new-spec
...
Test sequence:
U+0995,U+09CD,U+09B0
With Nirmala shipped on Windows 10, this failed to form the below form.
Works now.
Reported by Sairus.
2015-12-17 17:31:17 +00:00
Behdad Esfahbod
eaf1e93ef1
[uniscribe] Handle E_NOT_SUFFICIENT_BUFFER as well as E_OUTOFMEMORY
...
On Windows 10 we are seeing that other error message...
Test sequence: U+0995,U+-9CD,U+09B0
With Nirmala shipped on Windows 10, this failed to form the below form.
Works now.
Reported by Sairus.
2015-12-17 17:28:35 +00:00
Behdad Esfahbod
100fbeaf19
Fix ligature component of a mark happening after a ligature within a ligature!
...
Say, if we are ligating "A B_C m D", then previously 'm' was being
attached to 'B' in the combined A_B_C_D ligature. Now we attach it
to 'C'. No test for this though :(.
2015-12-17 15:23:09 +00:00
Behdad Esfahbod
2f02fc79a5
Improve ligature-component handling
...
We use three bits for lig_id these days, so we finally got a report of
two separate ligatures with the same lig_id happening adjacent to each
other, and then the component-handling code was breaking things.
Protect against that by ignoring same-lig-id but lig-comp=0 glyphs after
a new ligature.
Fixes https://github.com/behdad/harfbuzz/issues/198
2015-12-17 15:21:14 +00:00
Behdad Esfahbod
2ab0de9fbd
[use] Fix halant detection
...
Before, we were just checking the use_category(). This detects as
halant a ligature that had the halant as first glyph (as seen in
NotoSansBalinese.) Change that to use the is_ligated() glyph prop
bit. The font is forming this ligature in ccmp, which is before
the rphf / pref tests. So we need to make sure the "ligated" bit
survives those tests. Since those only check the "substituted" bit,
we now only clear that bit for them and "ligated" survives.
Fixes https://github.com/behdad/harfbuzz/issues/180
2015-12-17 11:59:15 +00:00
Behdad Esfahbod
86bcbd65b0
[arabic] Use glyph advance width in apply_stch() instead of extents
...
That seems to be what Windows is doing, and makes more sense.
2015-12-17 11:04:33 +00:00
Behdad Esfahbod
f11c11a1f1
Fix Since: tags for new API
...
e1d4d0f1db (commitcomment-15006653)
2015-12-16 17:08:36 +01:00
Steven R. Loomis
a13b023dbf
AIX fixes
...
- use '-w' instead of '\<...\>' for check-header-guards
grep manpage says these are the same
- put '-q' first in the grep options
- move VAR into hb-private.hh
- hb-font-private.hh - use [VAR] instead of [] for variable array
2015-12-12 17:44:44 -08:00
Behdad Esfahbod
49e72634af
Limit use of AIX intrinsics to IBM's compiler
2015-12-10 17:44:19 +01:00
Behdad Esfahbod
e1d4d0f1db
Merge branch 'font-extents'
...
Fixes https://github.com/behdad/harfbuzz/pull/165
2015-12-10 16:56:07 +01:00
Behdad Esfahbod
31fa389294
[ft] Use ftface->size->metrics for font extent info
2015-12-10 16:38:29 +01:00
Behdad Esfahbod
3ad16048fd
[ot-font] Respect OS/2 fsSelection USE_TYPO_METRICS bit
2015-12-10 16:37:49 +01:00
Behdad Esfahbod
70b33edae7
Add atomic ops for AIX
...
Patch from Volker Simonis.
2015-12-10 15:54:42 +01:00
Behdad Esfahbod
98460779ba
Remove final pause from Arabic shaper
...
Back in the old days, we used to apply 'calt' and 'cswh' in Arabic shaper,
with a pause in between. Then we disabled the 'cswh' because Microsoft
disabled it, but forgot to remove the unnecessary pause. Do that now.
This has the benefit that it fixes shaping with monbaiti from Windows 10.
In that version of that font, the lookups from 'calt' are duplicated in
'rclt', and Mongolian was changed to go through Universal Shaping Engine.
We still use the Arabic shaper for Mongolian. With a pause after 'calt',
we were applying the duplicate lookups from 'calt' and 'rclt' twice. It
happened to be the case that these lookups were NOT idempotent. So we
were getting wrong shaping. See thread "Windows 10 monbaiti.ttf upgrade
(5.01 -> 5.51) caused loss of diacritical marks when shaped with harfbuz"
on the mailing list. This fixes that.
2015-12-07 21:38:47 +01:00
Behdad Esfahbod
dee0fbf9e2
Merge pull request #192 from behdad/jfkthame-stch
...
[issue 191] Make apply_stch() give a more precise fit
2015-12-07 10:44:08 +01:00
Behdad Esfahbod
255df68012
Fix undefined behavior in cmp function
...
Fixes https://bugs.freedesktop.org/show_bug.cgi?id=93274
2015-12-07 10:34:47 +01:00
Behdad Esfahbod
fcf9e61bad
Fix sorting order of ot_languages array
...
Looks like the original sort was wrongly done.
Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=93275
2015-12-07 10:30:43 +01:00
Behdad Esfahbod
70952ddb5a
Add test to make sure ot-languages array is sorted
...
Currently fails. Part of
https://bugs.freedesktop.org/show_bug.cgi?id=93275
2015-12-07 10:28:46 +01:00
Behdad Esfahbod
8c37556f73
Merge pull request #134 from ebraminio/dwrite
...
Add working but less prefect DirectWrite backend
2015-12-07 09:34:58 +01:00
jfkthame
a7ffe35358
Make apply_stch() give a more precise fit
...
This aims to make Syriac Abbr Mark sizing more accurate when repeating segments are used, by adding an extra repeat and tightening up the spacing slightly rather than leaving a shortfall corresponding to a partial repeat-width.
2015-12-05 17:47:37 +00:00
Behdad Esfahbod
8e5f902656
src/test.cc: wrong field printed
...
Fixes https://github.com/behdad/harfbuzz/issues/188
Fixes https://bugs.freedesktop.org/show_bug.cgi?id=93182
2015-11-30 16:53:21 -08:00
Simon Cozens
6f2e6de1fa
Get font ascender and descender metrics from OS/2 table.
2015-11-27 16:03:54 -05:00
Simon Cozens
097c998a0c
Parse the OS/2 table.
2015-11-26 19:58:13 -05:00
Behdad Esfahbod
35d18585fc
Fix a few docs blocks
2015-11-26 19:30:37 -05:00
Behdad Esfahbod
0e38c918b6
[introspection] Make scanner happy with HB_EXTERN
2015-11-26 19:26:26 -05:00
Behdad Esfahbod
ea512f7108
Use C-style casts instead of compare to 0, to convert hb_bool_t to bool
2015-11-26 19:22:22 -05:00
Behdad Esfahbod
67a36a725e
Fix vertical GPOS
...
This was brorken earlier, though, it's really hard to notice it.
Unlike the glyph_h_origin(), an unset glyph_v_origin() does NOT
mean that the vertical origin is at 0,0.
Related to https://github.com/behdad/harfbuzz/issues/187
2015-11-26 18:49:54 -05:00
Behdad Esfahbod
c41c145c73
Make nil glyph_h_origin() function return true
...
Fixes https://github.com/behdad/harfbuzz/issues/187
Funcs implementations that have a non-zero horizontal origin must
implement the glyph_h_origin() callback, nothing new here.
Other implementations (all I know of!) can simply not set
glyph_h_origin() now. I did that for hb-ot and hb-ft in
44f8275080
, though that broke the
fallback shaper because the default was returning false...
2015-11-26 18:43:15 -05:00
Behdad Esfahbod
766963adba
Merge pull request #114 from ThePhD/vc++-fixes
...
Fix all VC++ warnings and errors
2015-11-24 15:38:43 -06:00
Behdad Esfahbod
b344af80ca
Merge pull request #177 from fanc999/exporting
...
Enable use of compiler directives to export symbols
2015-11-24 15:30:27 -06:00
Martin Hosken
1979f6fedc
Fix y_scale problems in hb-gr
2015-11-23 10:04:13 +07:00
Chun-wei Fan
835bbdc7c9
Public headers: Decorate public symbols with HB_EXTERN
...
This prepares the headers for exporting symbols using visibility
attributes or __declspec(dllexport), so that we do not need to maintain
symbols listing files, as this is what was and is done in GLib and GTK+.
2015-11-23 11:03:11 +08:00
ThePhD
f798b8e2d6
c-style cast
2015-11-21 16:57:26 -05:00
Behdad Esfahbod
a699181365
Merge pull request #176 from behdad/missing-braces
...
Add braces for subobject initializer in _hb_font_funcs_nil
2015-11-20 13:28:42 -08:00
Behdad Esfahbod
1dc32ea4d2
Whitespace
2015-11-20 13:24:19 -08:00
Behdad Esfahbod
f94c0ecbb1
Define HB_MARK_AS_FLAG_T as a macro instead of using templates
...
The generic template operator overloading was causing more problems than it
solved. Eg:
https://github.com/behdad/harfbuzz/pull/163
https://github.com/behdad/harfbuzz/issues/175
So, just use macros.
Fixes https://github.com/behdad/harfbuzz/issues/175
Fixes https://github.com/behdad/harfbuzz/pull/178
2015-11-20 13:21:29 -08:00
jfkthame
f19c6db18e
Add braces for subobject initializer in _hb_font_funcs_nil
...
To avoid triggering -Wmissing-braces; see https://bugzilla.mozilla.org/show_bug.cgi?id=1226175#c8
2015-11-20 08:43:49 +00:00
Behdad Esfahbod
9cc1ed4fa6
Do not allow recursiving to same position and same lookup
...
This is just to make it harder to be extremely slow. There definitely
are ways still, just harder. Oh well... how do we tame this problem
without solving halting problem?!
Fixes https://github.com/behdad/harfbuzz/issues/174
2015-11-19 12:39:09 -08:00
Behdad Esfahbod
13188cba7f
Revert "Fix hang in OOM situations"
...
This reverts commit f0599db761
.
Commit abadc1717d
provides a better
fix for this.
2015-11-19 11:59:47 -08:00
Behdad Esfahbod
18e1c6b6ef
Revert "Make sure we make progress in OOM situations"
...
This reverts commit 68b507a3c3
.
Commit abadc1717d
provides a better
fix for this.
2015-11-19 11:50:58 -08:00
Behdad Esfahbod
63fe05c8b1
Fix make distcheck
2015-11-18 23:52:51 -08:00
Behdad Esfahbod
37b40cd8a1
Fix another move_to assertion failure
...
If buf->idx is at end, don't set end past it...
Fixes https://github.com/behdad/harfbuzz/issues/173
2015-11-18 23:04:45 -08:00
Behdad Esfahbod
abadc1717d
Try to better handle OOM situations
...
Fixes assert fail in https://github.com/behdad/harfbuzz/issues/161
with libharfbuzz-fuzzing.
2015-11-18 17:52:08 -08:00
Behdad Esfahbod
ff16ef3379
Enable building a bounded version of the library for fuzzing
...
test/fuzzing/hb-fuzzer links against libharfbuzz-fuzzing.so now.
2015-11-18 16:27:32 -08:00
Behdad Esfahbod
e0082ae60d
Move things around
2015-11-17 18:42:13 -08:00
Chun-wei Fan
167c327177
Fix build on MSVC >= 2012
...
Use the DEFINE_ENUM_FLAG_OPERATORS macro in winnt.h on Visual Studio,
which defines the bitwise operators for the enumerations that we want to
mark as hb_mark_as_flags_t, which will take care of the situation on newer
Visual Studio (>= 2012), where the build breaks with C2057 errors as the
underlying types of the enumerations is not clear to the compiler when we
do a bitwise op within the declaration of the enumerations themselves.
Also disable the C4200 (nonstandard extension used : zero-sized array in
struct/union) and C4800 ('type' : forcing value to bool 'true' or 'false'
(performance warning)) warnings as the C4200 is the intended scenario and
C4800 is harmless but is so far an unavoidable side effect of using
DEFINE_ENUM_FLAG_OPERATORS.
2015-11-17 12:19:22 +08:00
Chun-wei Fan
4d27bb8746
hb-ot-shape-complex-arabic.cc: Fix build on Visual Studio
...
Visual Studio does not like declaring a enum variable within a for
statement, so fix the build by declaring the enum before doing the for
loop.
2015-11-16 23:04:36 +08:00
Behdad Esfahbod
d5f0d7c9fb
Merge pull request #167 from KonstantinRitt/unicode_cp_opt
...
Micro optimizations to UTF-16 and UTF-32 codecs
2015-11-07 07:50:58 -08:00
Behdad Esfahbod
04ff23e73d
[arabic] Improve stretch length calculation
...
Err on the side of being too short, than too wide. Reduces chance
of overlaps with neighboring glyphs.
2015-11-06 16:29:44 -08:00
Behdad Esfahbod
59821ab8b4
[arabic] Don't stretch over cased letters
...
Addresses
6e6f82b6f3 (commitcomment-14248516)
2015-11-06 16:27:44 -08:00
Behdad Esfahbod
5337db29af
Revert "Don't process lookups if buffer is in error"
...
This reverts commit f92bd86cc8
.
We don't want to be like cairo, where as soon as there's an error,
nothing works anymore. So, lets process lookups as long as there's
no new memory needed. That's also a model that hides fewer bugs.
2015-11-06 16:18:09 -08:00
Konstantin Ritt
529a933128
Micro optimization to hb_utf16_t and hb_utf32_t ::prev()
...
Implement reverse lookup instead of re-using next()
2015-11-07 02:00:04 +04:00
Konstantin Ritt
44ae9be7a2
Nano optimization to hb_utf16_t and hb_utf32_t ::next()
2015-11-07 01:58:38 +04:00
Behdad Esfahbod
f1c4adbcd3
Fix typo
2015-11-06 09:46:05 -08:00
Behdad Esfahbod
68b507a3c3
Make sure we make progress in OOM situations
2015-11-06 00:09:26 -08:00
Behdad Esfahbod
f0599db761
Fix hang in OOM situations
...
Fixes https://github.com/behdad/harfbuzz/issues/161
2015-11-05 23:55:51 -08:00
Behdad Esfahbod
f92bd86cc8
Don't process lookups if buffer is in error
2015-11-05 23:52:29 -08:00
Behdad Esfahbod
4301703bdd
Limit buffer max size growth
...
https://github.com/behdad/harfbuzz/issues/161
2015-11-05 23:44:59 -08:00
Behdad Esfahbod
6e6f82b6f3
Implement SYRIAC ABBREVIATION MARK with 'stch' feature
...
The feature is enabled for any character in the Arabic shaper.
We should experiment with using it for Arabic subtending marks.
Though, that has a directionality problem as well, since those
are used with digits...
Fixes https://github.com/behdad/harfbuzz/issues/141
2015-11-05 17:46:34 -08:00
Behdad Esfahbod
c743ec5886
[ft] Fix extents with negative scales
...
Fixes https://github.com/behdad/harfbuzz/issues/162
2015-11-05 17:38:27 -08:00
Behdad Esfahbod
73fec3992a
Reserve a few scratch-flags bits for complex shapers
2015-11-05 15:22:18 -08:00
Behdad Esfahbod
136863371c
Add new shaper method postprocess_glyphs()
...
Unused currently. To be used for Syriac stretch implementation.
https://github.com/behdad/harfbuzz/issues/141
2015-11-05 13:24:15 -08:00
Behdad Esfahbod
e95eb23a4e
Don't try zeroing marks by GDEF if there are no non-ASCII
...
This one is a hack, but should be ok.
2015-11-04 22:59:28 -08:00
Behdad Esfahbod
7fa54ed75a
Don't try zeroing mark attachments by Unicode if there's no non-ASCII
2015-11-04 22:59:24 -08:00
Behdad Esfahbod
550bd14d2b
Actually commit changes for previous commit
2015-11-04 22:58:58 -08:00
Behdad Esfahbod
ff31b3c1b8
Skip GPOS cursive / attachment adjustmnent if none happened
...
I'm starting to really like how free these new scratch_flags are.
2015-11-04 22:47:30 -08:00
Behdad Esfahbod
0f407325f6
Minor
2015-11-04 22:28:44 -08:00
Behdad Esfahbod
497a6c2071
Skip forming clusters if text is all ASCII
2015-11-04 22:24:19 -08:00
Behdad Esfahbod
28de104f15
Move variable-sized struct member to end
...
Hopefully makes clang build happy
2015-11-04 22:03:09 -08:00
Behdad Esfahbod
5bc28b5f68
Optimize positioning for when h_origin is nil
2015-11-04 21:53:16 -08:00
Behdad Esfahbod
762770c964
Add font->has_...() to check for individual nil font funcs
...
Hopefully this wouldn't break any compiler. There was some magic
moments to getting this to compile...
2015-11-04 21:49:19 -08:00
Behdad Esfahbod
88e9a9bcae
Minor reshaping of hb_font_funcs_t implementation
...
In anticipation of further changes. No functional changes.
2015-11-04 21:16:26 -08:00
Behdad Esfahbod
a6a7715bac
Comments
2015-11-04 20:51:21 -08:00
Behdad Esfahbod
6c48ec830f
[ot] Remove font funcs that do nothing
2015-11-04 20:47:42 -08:00
Behdad Esfahbod
75ea2daa1d
[ot] Port ot font funcs to allocated object
2015-11-04 20:43:59 -08:00
Behdad Esfahbod
44f8275080
[ft] Remove font funcs that do nothing
2015-11-04 20:43:43 -08:00
Behdad Esfahbod
7918c261ef
[ft] Port ft font funcs to allocated object
2015-11-04 20:37:49 -08:00
Behdad Esfahbod
da29b43794
Separate nil font-funcs from parent-peeking font-funcs
...
API change: all fonts created with hb_font_create() now inherit from
(ie have parent) hb_font_get_empty().
2015-11-04 20:22:44 -08:00
Behdad Esfahbod
bee901b38e
Optimize positioning direction calculations
...
It makes the binary smaller AND faster. Yumm!
2015-11-04 19:28:17 -08:00
Behdad Esfahbod
e3e4bb011a
Don't do fractions if buffer is ASCII-only
2015-11-04 18:58:02 -08:00
Behdad Esfahbod
6986208ba3
Optimize runs without Default_Ignorable's
...
Now that we have a buffer-wide scratch flags facility, use it to
optimize away a few passes.
2015-11-04 18:46:41 -08:00
Behdad Esfahbod
14c2de3218
Limit max edits during sanitize to 8
...
Used to be 100. If a tabe needs more than one or two edits, it's
probably completely bogus...
Might help with speeding up fuzzing for
https://github.com/behdad/harfbuzz/issues/157
2015-11-04 18:00:57 -08:00
Behdad Esfahbod
9cbc39aef9
Minor
2015-11-04 18:00:53 -08:00
Behdad Esfahbod
52e6c4e158
If font doesn't support U+2011, fall back to U+2010
...
Test passes now.
2015-11-04 17:45:56 -08:00
Behdad Esfahbod
75483aafa6
Untangle if/else waterfall
2015-11-04 17:43:36 -08:00
Behdad Esfahbod
49ef630936
Adjust the width of various spaces if font does not cover them
...
See discussion here:
81ef4f407d
There's no way to disable this fallback, but I don't think it would
be needed. Let's hope for the best!
Fixes https://github.com/behdad/harfbuzz/issues/153
2015-11-04 17:27:07 -08:00
Behdad Esfahbod
aa7044de0c
Generalize flags types
2015-11-04 16:25:57 -08:00
Behdad Esfahbod
7793aad946
Normalize various spaces to space if font doesn't support
...
This resurrects the space fallback feature, after I disabled
the compatibility decomposition. Now I can release HarfBuzz
again without breaking Pango!
It also remembers which space character it was, such that later
on we can approximate the width of this particular space
character. That part is not implemented yet.
We normalize all GC=Zs chars except for U+1680 OGHA SPACE MARK,
which is better left alone.
2015-11-04 15:51:41 -08:00
Behdad Esfahbod
8565839480
Protect against possible invalid-memory access after OOM
2015-11-04 14:46:52 -08:00
Behdad Esfahbod
4cc80bed25
Fix typo!
...
Ouch! Fortunately that function was unused.
2015-11-04 14:46:10 -08:00
Behdad Esfahbod
9ac4b9656d
Add Unicode space category
...
Unused so far.
2015-11-04 14:19:25 -08:00
Behdad Esfahbod
8249ec3f86
Make top-byte of unicode_props available to be used differently per-GC
2015-11-04 13:26:17 -08:00
Behdad Esfahbod
cc5d3a3388
Towards using top-byte of unicode-props for more things
2015-11-04 13:22:33 -08:00
Behdad Esfahbod
2f38dde5a1
Add _hb_glyph_info_is_unicode_mark()
...
Unused right now.
2015-11-04 13:17:33 -08:00
Behdad Esfahbod
90d75f93bb
Tighten ccc-setting a bit and document it
2015-11-03 12:58:12 -08:00
Behdad Esfahbod
df698f3299
[ot-font] Fix hmtx table length checking, *again*
...
Exactly the same problem that I fixed in
63ef0b41dc
I rewrote the table checking yesterday in
67f8821fb2
and introduced the exact same issue again. :(
Good thing we have ongoing fuzzing going now. Was discovered
immediately by libFuzzer. Thanks kcc!
https://github.com/behdad/harfbuzz/issues/139#issuecomment-153449473
Fixes https://github.com/behdad/harfbuzz/issues/156
2015-11-03 12:15:12 -08:00
Behdad Esfahbod
ed2024ef93
[perf] Micro-optimize
2015-11-02 18:03:38 -08:00
Behdad Esfahbod
76a5310a83
Remove irrelevant comment
...
I tried moving the is_default_ignorable() function to an INTERNAL
function. That made the binary size grow by 5k AND things got a
tad bit slower!
2015-11-02 17:52:45 -08:00
Behdad Esfahbod
8259669fbd
Minor
2015-11-02 17:44:05 -08:00
Behdad Esfahbod
9382c471ea
Combine unicode_props0/1 into a uint16
...
Slightly faster. In prep for more changes.
2015-11-02 17:36:51 -08:00
Behdad Esfahbod
7127718545
[perf] Only call combining_class() for marks
...
Saves some time. Also preparing for reusing the ccc byte for other stuff.
2015-11-02 17:27:48 -08:00
Behdad Esfahbod
5ba450407b
Make max context-length and max nesting level configurable
...
...at compile time.
2015-11-02 15:43:39 -08:00
Behdad Esfahbod
67f8821fb2
[ot] Make bad-hmtx handling match FreeType
...
Also route fuzzing-related tests through hb-ot-font, to reduce dependency
on FreeType behavior for badly-broken fonts. Fixes failing test with
FreeType master.
2015-11-02 15:37:29 -08:00
Behdad Esfahbod
672ca3b4e6
Use templates for making sure expression is constant
2015-10-26 14:05:05 -07:00
Behdad Esfahbod
5c8174eda3
Update comments for removal of compat decompositions
2015-10-21 18:51:40 -02:00
Behdad Esfahbod
f679970040
Disable compatibility decomposition usage during normalization
...
Fixes https://github.com/behdad/harfbuzz/issues/152
2015-10-21 17:20:55 -02:00
Behdad Esfahbod
ce889189c1
Fix two more -Wshadow warnings
...
https://bugzilla.mozilla.org/show_bug.cgi?id=1215894
2015-10-21 11:23:12 -02:00
Behdad Esfahbod
4a6b1eedbb
Fix one more -Wshadow warning
...
https://bugzilla.mozilla.org/show_bug.cgi?id=1215894
2015-10-21 11:20:55 -02:00
Behdad Esfahbod
6f932bc8f9
Fix a few more -Wshadow-local warnings
...
https://bugzilla.mozilla.org/show_bug.cgi?id=1215894
2015-10-21 11:16:49 -02:00
Behdad Esfahbod
b90cb366d7
Fix one -Wshadow-compatible-local warning
...
From https://bugzilla.mozilla.org/show_bug.cgi?id=1215894
2015-10-21 11:13:21 -02:00
Behdad Esfahbod
50e5750bd8
Avoid unnecessary cast to 64-bit
...
Fixes https://github.com/behdad/harfbuzz/issues/146
Or I think it should.
2015-10-21 11:10:40 -02:00
Behdad Esfahbod
305d2fbf5a
Add HB_FALLTHROUGH
...
Borrowed from https://bugzilla.mozilla.org/show_bug.cgi?id=1215411
2015-10-21 11:04:28 -02:00
Ebrahim Byagowi
f35b3e931d
Add a prototype of DirectWrite as a shaping backend
2015-10-20 22:20:47 +03:30
Behdad Esfahbod
ca97ea7aa2
[ft] Revert change-of-behavior of hb_ft_font_create() introduced in 1.0.5
...
The default FreeType load flags where changed from FT_LOAD_NO_HINTING
to FT_LOAD_DEFAULT in 2a9627c564
.
This is crashing HarfBuzz-enabled FreeType as I suppose it causes
infinite recursion between HB and FT autohinter...
Revert the behavior change.
Fixes https://github.com/behdad/harfbuzz/issues/143
2015-10-15 20:20:22 -03:00
Behdad Esfahbod
63ef0b41dc
[ot-font] Fix hmtx wrong table length check
...
Discovered by libFuzzer. Ouch!
https://github.com/behdad/harfbuzz/issues/139#issuecomment-148289957
2015-10-15 12:54:28 -03:00
Behdad Esfahbod
613e630617
Reduce max nesting level from 8 to 6
...
We probably should implement better system to catch cyclic lookups.
But for now, this speeds up worst case behavior with broken fonts
considerably without compromising legitimate usecases.
https://github.com/behdad/harfbuzz/issues/139#issuecomment-147788447
2015-10-13 23:33:28 -03:00
Behdad Esfahbod
ed13e2ce50
[ot-font] Fix leak
...
https://github.com/behdad/harfbuzz/issues/139#issuecomment-147616887
2015-10-13 10:32:56 -03:00
Behdad Esfahbod
f966649747
Fix another memory access issue discovered by libFuzzer
...
Fixes https://github.com/behdad/harfbuzz/issues/139#issuecomment-146984679
2015-10-13 00:30:50 -04:00
Behdad Esfahbod
cc6ea308d4
Extern "C" custom-allocator declerations
2015-10-12 17:21:52 -04:00
Behdad Esfahbod
50f489a0a0
Typo
2015-10-11 20:59:29 -04:00
Behdad Esfahbod
ee9b0b6cb5
Fix another sanitize bug
...
Also discovered by "libFuzzer".
2015-10-09 14:23:15 -04:00