Ebrahim Byagowi
35fa3d3260
[ot-color] Apply Behdad comment
2018-10-28 18:33:10 -07:00
Ebrahim Byagowi
307d61867a
[ot-color] Make PNGHeader reading actually work
2018-10-28 18:33:10 -07:00
Ebrahim Byagowi
632e9af862
[ot-color] Implement PNGHeader and test it, it doesn't work however
2018-10-28 18:33:10 -07:00
Ebrahim Byagowi
38706a0746
[ot-color] Preparation for setting PNG width/height in extents
2018-10-28 18:33:10 -07:00
Behdad Esfahbod
d6d6f3bc22
[docs] Add comment
2018-10-28 18:33:10 -07:00
Ebrahim Byagowi
3d4c1f6a41
[ot-color] Apply Behdad reviews
2018-10-28 18:33:10 -07:00
Ebrahim Byagowi
8ef0d2ef92
[ot-color] Apply Behdad comment
2018-10-28 18:33:10 -07:00
Ebrahim Byagowi
dbd419bede
[ot-color] Add public API for CBDT/sbix/SVG color Emojis
2018-10-28 18:33:10 -07:00
Behdad Esfahbod
6ce49a921a
[name] Change hb_name_id_t back to unsigned int
...
d941f66c75 (commitcomment-31076011)
2018-10-28 08:26:30 -07:00
Behdad Esfahbod
a4f4f5ba5f
[docs] Fix titles here as well
2018-10-28 08:23:36 -07:00
Behdad Esfahbod
213b6dd335
[name] Make sure hb_name_id_t is int-sized
...
d941f66c75 (commitcomment-31068905)
2018-10-27 18:36:24 -07:00
Behdad Esfahbod
1d40d72f29
[docs] Hook up hb-var
2018-10-27 05:01:01 -07:00
Behdad Esfahbod
80d9a427cf
[docs] Document remaining sections
2018-10-27 04:58:32 -07:00
Behdad Esfahbod
cf5fa57f00
[docs] Change section titles again
...
I think I like the uniform "hb-*" more.
2018-10-27 04:51:42 -07:00
Behdad Esfahbod
04981ee05d
[docs] More
2018-10-27 04:47:41 -07:00
Behdad Esfahbod
5dd86aa33b
[docs] Rename section titles to object names
...
More useful.
2018-10-27 04:47:41 -07:00
Behdad Esfahbod
524fb70216
[docs] More
2018-10-27 04:47:41 -07:00
Behdad Esfahbod
46072b7cb5
[ot] Fold hb-ot-tag.h into hb-ot-layout.h
2018-10-27 04:47:41 -07:00
Behdad Esfahbod
00cf4e5eb6
[docs] Fill in some sections
2018-10-27 04:47:41 -07:00
Behdad Esfahbod
55a19d73b4
Move HB_EXTERN
2018-10-27 04:47:41 -07:00
Ebrahim Byagowi
524e854c15
Merge pull request #1318 from ebraminio/png
...
Add a non-hooked _png _svg get emoji blob
2018-10-27 15:04:43 +03:30
Ebrahim Byagowi
8180c37df0
[ot-color] Remove _png and _svg public APIs
2018-10-27 14:54:08 +03:30
Ebrahim Byagowi
9aa6279a2d
[ot-color/png] Try to get image blob from sbix first options.aat is set
2018-10-27 14:24:58 +03:30
Ebrahim Byagowi
b42661ee91
[ot-color] Add some documentation
2018-10-27 14:15:38 +03:30
Behdad Esfahbod
4ee3c8272c
[docs] Fix hb_name_id_t
...
Yep, was not recognized without this patch!
2018-10-27 03:18:45 -07:00
Ebrahim Byagowi
9435fb24da
[ot-color/png] Implement CBDT part
2018-10-27 13:47:11 +03:30
Behdad Esfahbod
d941f66c75
[name] Make hb_name_id_t be the enum
...
This is like hb_script_t.
We had this exposed as unsigned int since 2.0.0 release in two APIs,
as well as hb_ot_layout_get_size_params() from earlier.
But since no one uses those (right?!), let's just fix this now.
2018-10-27 03:06:14 -07:00
Behdad Esfahbod
40496a54a0
[name] Move HB_NAME_ID_INVALID into the enum
...
Don't know how to document anonymous enum members.
2018-10-27 03:06:14 -07:00
Behdad Esfahbod
a8a55b9f89
[name] Move around
2018-10-27 03:06:14 -07:00
Behdad Esfahbod
3b7e5f1313
[name] Rename hb_ot_name_get_names() to hb_ot_name_list_names()
...
And swap return value positions, so can be annotated for gobject-introspectin.
2018-10-27 03:06:14 -07:00
Behdad Esfahbod
4025ad8043
Document new API
2018-10-27 03:06:14 -07:00
Ebrahim Byagowi
5e2a52f71a
[sbix] Remove dump method from sbix accelerator
2018-10-27 12:44:33 +03:30
Ebrahim Byagowi
0353ac6cde
Fix test-name-table on older bots
2018-10-27 12:24:53 +03:30
Ebrahim Byagowi
dc11a38107
[sbix] Set num_glyphs on accelerator
...
dump-emoji was broken without it
2018-10-27 12:15:25 +03:30
Ebrahim Byagowi
6a38fd68a8
[ot-color/png] sbix runtime memory check
2018-10-27 11:17:27 +03:30
Behdad Esfahbod
ca645accb9
Comment
2018-10-27 00:39:31 -07:00
Ebrahim Byagowi
265ad408ca
[ot-color/png] Implement sbix part
2018-10-27 10:43:46 +03:30
Behdad Esfahbod
7f5941e162
Remove stale comment
...
Ugliness was fixed in 30eab97a00
But yeah, my smell detector was working. Ugliness was buggy.
2018-10-27 00:06:48 -07:00
Behdad Esfahbod
e7400c0275
[docs] Hook up new symbols
2018-10-26 22:24:40 -07:00
Behdad Esfahbod
6aa019c4af
[morx] Fix merge_cluster to end at last ligature component
...
Don't assume current position was a component in the ligature.
2018-10-26 22:02:17 -07:00
Behdad Esfahbod
00ae4be6bf
[morx] Fix bailing out ligation at end-of-text
...
Check was after a move_to, which wouldn't work.
Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=11147
2018-10-26 21:59:20 -07:00
Behdad Esfahbod
30eab97a00
Fix invalid memory read
...
Buffer might be relocated inside replace_glyphs().
Fixes https://bugs.chromium.org/p/chromium/issues/detail?id=895117
2018-10-26 21:54:40 -07:00
Behdad Esfahbod
79b2fa62ca
[indic] Fix infinite loop
...
Fixes https://bugs.chromium.org/p/chromium/issues/detail?id=863044
2018-10-26 21:22:26 -07:00
Behdad Esfahbod
39bd07aed5
Fix bunch of unused parameter warnings
...
Show up with gcc -O0.
There's a few more but those are functions that need to be filled in.
Maybe this is a lost battle...
2018-10-26 21:22:26 -07:00
Behdad Esfahbod
b2e1ec374c
[subset] Fix warning
2018-10-26 21:22:26 -07:00
Behdad Esfahbod
337ea0b717
[fuzzing] Remove HB_NDEBUG
...
Not sure why it ever was added.
2018-10-26 21:22:26 -07:00
Behdad Esfahbod
c965eeadbc
[name] Default to "en" if language is not specified
2018-10-26 21:22:26 -07:00
Behdad Esfahbod
3fd6e5dbef
[name] Add pre-defined nameIDs
2018-10-26 21:22:26 -07:00
Behdad Esfahbod
20d0171d20
[name] Fill out most missing language codes
2018-10-26 21:22:26 -07:00
Behdad Esfahbod
622b014faf
[name] Skip enumerating names with unknown language
2018-10-26 21:22:26 -07:00
Behdad Esfahbod
2c39f359e4
[utf] Remove unused typedef
2018-10-26 21:22:26 -07:00
Behdad Esfahbod
ce81c74298
[utf] Fix ASCII
2018-10-26 21:22:26 -07:00
Behdad Esfahbod
327546e633
[name] Hook up ltag table
2018-10-26 21:22:26 -07:00
Behdad Esfahbod
dc9a5f88b4
[name] Do record sanitization at run-time
2018-10-26 21:22:26 -07:00
Behdad Esfahbod
a53d301b1c
[name] Minor
2018-10-26 21:22:26 -07:00
Behdad Esfahbod
c442fd9a10
[name] Add src/test-name-table tool to show all font names
2018-10-26 21:22:26 -07:00
Behdad Esfahbod
7007bd9dff
[name] Rebuild language list, include missing entries
2018-10-26 21:22:26 -07:00
Behdad Esfahbod
68f172101c
[name] Fix cmp for invalid language
2018-10-26 21:22:26 -07:00
Behdad Esfahbod
888a65615c
[name] Fix nul-termination bug
2018-10-26 21:22:26 -07:00
Behdad Esfahbod
9b532e2ed4
[name] Add language mapping
2018-10-26 21:22:26 -07:00
Behdad Esfahbod
e2f9b65775
[name] Start adding language support
2018-10-26 21:22:26 -07:00
Behdad Esfahbod
6db6bbe64b
[name] Remove unused cmp function
2018-10-26 21:22:26 -07:00
Behdad Esfahbod
4668a05006
[name] Hook things up
...
Accept Mac Latin name entries as ASCII as well.
2018-10-26 21:22:26 -07:00
Behdad Esfahbod
69f5da0629
[name] More
...
It assumes all names are encoded in UTF16-BE. Other than that, and not
listing languages correctly, it's *supposed* to work.
2018-10-26 21:22:26 -07:00
Behdad Esfahbod
64334aff8c
[name] Fix check
2018-10-26 21:22:26 -07:00
Behdad Esfahbod
5531bd068e
[name] Flesh out UTF-X to UTF-X conversion routines
2018-10-26 21:22:26 -07:00
Behdad Esfahbod
84811a06a2
[name] Fix for rebase changes to hb_array_t
2018-10-26 21:22:26 -07:00
Behdad Esfahbod
1046b1938b
[name] Some more
2018-10-26 21:22:26 -07:00
Behdad Esfahbod
b4d4d1ea78
[name] Return full string length from API
2018-10-26 21:22:26 -07:00
Behdad Esfahbod
8d304ef7f9
[utf] Add UTF16-BE and UTF32-BE
2018-10-26 21:22:26 -07:00
Behdad Esfahbod
a826a8730f
[name] Hide internal details from public API
2018-10-26 21:22:26 -07:00
Behdad Esfahbod
e7c595a9f0
[name] More
2018-10-26 21:22:26 -07:00
Behdad Esfahbod
75cd8c86bd
[name] Add hb_ot_name_get_utf()
2018-10-26 21:22:26 -07:00
Behdad Esfahbod
c783d36324
[name] Pre-allocate array
2018-10-26 21:22:26 -07:00
Behdad Esfahbod
c2aa409537
[name] Start implementing hb_ot_name_get_utf16()
2018-10-26 21:22:26 -07:00
Behdad Esfahbod
740cde8991
[name] Implement hb_bytes_t get_name()
2018-10-26 21:22:26 -07:00
Behdad Esfahbod
c3425f2401
[name] Add hb-ot-name.cc for realz
2018-10-26 21:22:26 -07:00
Behdad Esfahbod
90420ed8cb
[name] Implement hb_ot_name_get_names()
2018-10-26 21:22:26 -07:00
Behdad Esfahbod
9a6c87c17d
[name] Finish accelerator sorting
2018-10-26 21:22:26 -07:00
Behdad Esfahbod
2157e56b34
[name] Start implementing public API infrastructure
2018-10-26 21:22:26 -07:00
Behdad Esfahbod
0bf93ec0fb
[name] Add public API declarations
2018-10-26 21:22:26 -07:00
Behdad Esfahbod
982c2f4a65
[indic/khmer/myanmar/use] Clarify clear_syllable
...
No logic change.
2018-10-26 15:40:45 -07:00
Ebrahim Byagowi
30f18039b3
[svg] Rename _svg_create_blob to _glyph_reference_blob_svg
2018-10-26 09:34:34 +03:30
Ebrahim Byagowi
5cb1ce8681
[svg] Collapse SVGDocumentIndex into SVG
2018-10-26 09:31:01 +03:30
Ebrahim Byagowi
4ceabb8c21
[svg] Hide start_glyph and end_glyph from API
2018-10-26 09:16:44 +03:30
Ebrahim Byagowi
c7a4e3dfb5
[svg] Add public API
...
* hb_ot_color_has_svg
* hb_ot_color_glyph_svg_create_blob
2018-10-26 09:16:44 +03:30
Behdad Esfahbod
e98af6d1ed
[layout] Try to speed up collect_lookups some more
...
Barely made a dent :(.
2018-10-25 22:25:29 -07:00
Behdad Esfahbod
eb44bfc864
[layout] Memoize collect_features
...
Fixes https://github.com/harfbuzz/harfbuzz/pull/1317
Fixes https://oss-fuzz.com/v2/testcase-detail/6543700493598720
2018-10-25 22:15:11 -07:00
Behdad Esfahbod
84098b1639
[layout] Remove unintentionally added code
2018-10-25 21:33:12 -07:00
Behdad Esfahbod
941600a9e0
[layout] Add hb_collect_features_context_t
...
Towards https://github.com/harfbuzz/harfbuzz/pull/1317
2018-10-25 21:26:56 -07:00
Behdad Esfahbod
c237cdfcc7
[lookup] Fold another function inline
2018-10-25 21:17:30 -07:00
Behdad Esfahbod
fe5520ddea
[layout] More prep work to memoize collect_features() work
2018-10-25 21:14:32 -07:00
Behdad Esfahbod
e8e67503ff
[lookup] More prep work for memoizing collect_features
...
https://github.com/harfbuzz/harfbuzz/pull/1317
2018-10-25 20:48:20 -07:00
Behdad Esfahbod
96828b97a8
[layout] Minor
...
We were returning the accelerator's lookup count. Returns table's.
They are the same except for OOM cases. Just shorter code.
2018-10-25 20:34:29 -07:00
Behdad Esfahbod
73449cd213
[layout] Fold one function inline
...
Preparation for fixing https://github.com/harfbuzz/harfbuzz/pull/1317
2018-10-25 20:32:05 -07:00
Behdad Esfahbod
ba5ca6a762
[morx] Use deleted-glyph, instead of actual deletion, in Ligation
...
Closer to what CoreText does.
Fixes https://github.com/harfbuzz/harfbuzz/issues/1302
2018-10-25 17:46:07 -07:00
Behdad Esfahbod
5c272e3613
[morx] Remove deleted-glyph at the end of processing
2018-10-25 17:39:54 -07:00
Behdad Esfahbod
1bb8ed86d6
[aat] Minor
2018-10-25 17:33:48 -07:00
Behdad Esfahbod
102af615f1
[aat] Start adding support for DELETED-GLYPH
...
https://github.com/harfbuzz/harfbuzz/issues/1302
2018-10-25 17:29:32 -07:00
Behdad Esfahbod
955aa56b11
[vector] Make it act more like pointer
...
Add pointer cast operator and plus operator.
2018-10-25 16:50:38 -07:00
Behdad Esfahbod
8d55e2adef
[set] Minor
2018-10-25 16:37:53 -07:00
Behdad Esfahbod
64c32edfe1
[set] Make array access more explicit
...
Follow up on 94e421abbf
2018-10-25 16:35:36 -07:00
Behdad Esfahbod
21ede867df
Fix possible overflow in bsearch impls
...
From bungeman.
Fixes https://github.com/harfbuzz/harfbuzz/pull/1314
2018-10-25 13:19:58 -07:00
Ben Wagner
94e421abbf
Remove some use of Crap in hb-set.
...
When hb_set_t::page_for_insert needs to insert at the end of the page_map
it ends up evaluating '&page_map[i + 1]' which has hb_vector return an
lvalue of a Crap so that nothing can be moved to its address. This turns
into issues with ThreadSanitizer on Crap when two threads modify different
hb_set_t instances. This can be avoided by using '&page_map[i] + 1'
instead.
2018-10-25 11:42:20 -07:00
Behdad Esfahbod
ae9e8f292b
[vowel-constraints] Reset continuation on all dottedcircles
...
One of the was missed before. Not intentional.
2018-10-24 16:55:20 -07:00
Behdad Esfahbod
401cdf0792
[ot-font] Fix sign of ascent/descent
...
Some fonts, like msmincho, have positive number as descent
in vhea table. That's wrong. Just enforce sign on ascent/descent
when reading both horizontal and vertical metrics.
Fixes https://github.com/harfbuzz/harfbuzz/issues/1248
2018-10-23 17:00:49 -07:00
Behdad Esfahbod
ba502dea1e
[morx] Fix cluster-merging when ligating
...
Only merge when actual ligature happened.
Fixes https://github.com/harfbuzz/harfbuzz/issues/1305
2018-10-23 16:50:31 -07:00
Garret Rieger
aa5af8d041
Fix size calculation in DEFINE_SIZE_ARRAY_SIZED.
2018-10-23 16:04:21 -07:00
Behdad Esfahbod
f33ad6d692
[aat] Fix up previous commit and add files
2018-10-23 14:31:51 -07:00
Behdad Esfahbod
ffe3478448
[aat] Allow enabling/disabling features
...
Only works at entire-buffer range, not sub-ranges.
Test with:
$ hb-shape Zapfino.dfont Zapfino
[Z_a_p_f_i_n_o=0+2333]
$ hb-shape Zapfino.dfont Zapfino --features=-dlig
[Z=0+416|a=1@-21,0+264|p_f=2+433|i=4+181|n=5+261|o=6+250]
$ hb-shape Zapfino.dfont Zapfino --features=+dlig
[Z_a_p_f_i_n_o=0+2333]
Fixes https://github.com/harfbuzz/harfbuzz/issues/1303
2018-10-23 14:14:03 -07:00
Behdad Esfahbod
8be0e5fd45
[ot-map] Minor
2018-10-23 13:39:50 -07:00
Behdad Esfahbod
e8fccbc36b
Minor
2018-10-23 13:25:03 -07:00
Behdad Esfahbod
76324d95ca
Shift code around
2018-10-23 13:09:30 -07:00
Behdad Esfahbod
cf92d6579e
[trak] Allow disabling tracking for ranges of text
...
Fixes https://github.com/harfbuzz/harfbuzz/issues/1303
2018-10-23 03:10:56 -07:00
Behdad Esfahbod
8869436cb8
When parsing feature ranges, accept ';' instead of ':'
2018-10-23 03:07:48 -07:00
Ebrahim Byagowi
22ecefd88e
Make tracking optout possible using 'trak' ot feature
...
So '--features=-trak' or 'font-feature-settings: 'trak' 0;' can prevent
applying of tracking if used.
2018-10-23 02:57:55 -07:00
Behdad Esfahbod
6d40eb8372
Touch up on previous commit
...
https://github.com/harfbuzz/harfbuzz/pull/1273
2018-10-23 02:51:42 -07:00
David Corbett
205737acdc
[use] Prohibit visually ambiguous vowel sequences
2018-10-23 02:25:08 -07:00
Behdad Esfahbod
48ed598a35
[VORG] Hook up to hb-ot-font's v_origin
...
Fixes https://github.com/harfbuzz/harfbuzz/issues/544
Test added with NotoSansCJK, eg. with U+FF38.
2018-10-23 02:21:27 -07:00
Behdad Esfahbod
097ecfd4a9
[VORG] Add get_y_origin()
...
Unhooked.
2018-10-23 02:09:42 -07:00
Behdad Esfahbod
6fb24d5e3e
[VORG] Add VORG table
...
Cherry-picked from cff-subset branch.
2018-10-23 01:59:43 -07:00
Behdad Esfahbod
531f9822b2
[morx] Add a few debug messages to Ligature chain
2018-10-23 01:32:08 -07:00
Behdad Esfahbod
0e5bcdef7f
[morx] Clear stack upon underflow when acting ligatures
2018-10-23 00:39:44 -07:00
Behdad Esfahbod
792071de40
[morx] Leave ligature on stack after ligating
...
Test with Apple Color Emoji.ttf of ~66MB and following sequence:
./hb-shape Apple\ Color\ Emoji-old.ttf --font-funcs=ot -u U+1F468,200d,U+1F469,200d,U+1F467,200d,1f466
Should form full family if matching works correctly. It first makes
family of three, then makes family of four out of that and the last
two characters.
Fixes https://github.com/harfbuzz/harfbuzz/issues/1292
2018-10-22 23:38:34 -07:00
Behdad Esfahbod
8c78ced95b
Unbreak builds
2018-10-22 21:49:42 -07:00
Behdad Esfahbod
8d689f8a7b
Add hb_array<>() specialization for UnsizedArrayOf
...
Related https://github.com/harfbuzz/harfbuzz/issues/1301
2018-10-22 21:33:18 -07:00
Behdad Esfahbod
abfbba1911
Add hb_array<>()
...
Simplifies transient object creation.
Fixes https://github.com/harfbuzz/harfbuzz/issues/1301
2018-10-22 21:27:45 -07:00
Behdad Esfahbod
17ffbc070f
[color] Use Index for colorIdx
...
Doesn't matter, but matches the description.
2018-10-22 21:22:25 -07:00
Behdad Esfahbod
07386ea410
Remove const and references when binding Null()
...
Fixes https://github.com/harfbuzz/harfbuzz/issues/1299
Removes anomaly I was seeing in cpal table trying to use implicit Null(NameID).
2018-10-22 21:21:17 -07:00
Behdad Esfahbod
b18acab7bc
[color] Add HB_COLOR
...
Normally I would have added to_string / from_string like other types
have. But since we don't use hb_color_t much, I'm not going to do that.
Although, if we did, we could use it in hb-view to parse colors...
2018-10-22 18:20:57 -07:00
Behdad Esfahbod
228f96c9d0
[color] Finish reviewing / revamping CPAL
...
Now to hb_color_t.
2018-10-22 16:55:12 -07:00
Behdad Esfahbod
683fad0627
[color] Minor
2018-10-22 16:35:03 -07:00
Behdad Esfahbod
14474d2104
[color] Rely on CPALV1Tail Null object
2018-10-22 16:31:13 -07:00
Behdad Esfahbod
d7865107ea
Remove const from hb_array_t details
...
Will come in through <T> if desired.
2018-10-22 16:24:16 -07:00
Behdad Esfahbod
f3336580dd
[color] Use hb_array_t in CPAL
...
Doesn't work though, ouch :(. Need to figure out if it's unreasonable
to expect Null(T) inside hb_array_t<T> to see the later specialization
of Null for NameID.
2018-10-22 16:24:16 -07:00
Behdad Esfahbod
5ae18855d1
[color] Check for null CPAL arrays
...
We cannot use a nullable offset here though.
2018-10-22 16:24:16 -07:00
Behdad Esfahbod
69ab72e4aa
[color] More CPAL rename
2018-10-22 16:24:16 -07:00
Behdad Esfahbod
0befb06c46
[color] More CPAL rename
2018-10-22 16:24:16 -07:00
Behdad Esfahbod
3600d20603
[color] Rename vars in CPAL
2018-10-22 16:24:16 -07:00
Ebrahim Byagowi
0babf761c9
Adopt dump-emoji with latest unreleased APIs changes ( #1297 )
2018-10-23 01:33:45 +03:30
Behdad Esfahbod
7997144b5f
[color] Revamp palette API
2018-10-22 14:22:31 -07:00
Behdad Esfahbod
3bf91bd269
[color] Rewrite colr access
...
COLR table has one function: return layers for a glyph, and we expose exactly
that, so should just wire it through. Also use sub_array() for verifiable
safety.
Also, BaseGlyphRecord's null object is enough. We don't need to special-case
the not-found.
2018-10-22 14:21:23 -07:00
Behdad Esfahbod
1de17bdb80
[colr] Add hb_ot_color_layer_t
...
We never return parallel arrays from functions. That's inconvenient
and hard to bind.
2018-10-22 14:21:23 -07:00
Behdad Esfahbod
3b3668acc8
[color] Rename / reorder a bit
...
Implement has_data() for realz.
2018-10-22 14:21:23 -07:00
Behdad Esfahbod
9085a72deb
[cpal] Touch up palette flags
2018-10-22 13:03:29 -07:00
Behdad Esfahbod
ee11fae9d0
[color] Rename "gid" to "glyph"
...
We don't expose "gid" in API.
2018-10-22 13:03:29 -07:00
Behdad Esfahbod
228fa71bf9
[colr] Move sanitize
2018-10-22 13:03:29 -07:00
Ebrahim Byagowi
d440c8d3fb
Add chromacheck Emoji test fonts and minor preparations ( #1294 )
2018-10-22 22:07:59 +03:30
Behdad Esfahbod
b92b9d7e52
[colr] Move compare function into a static
...
Not sure if MSVC would be unhappy about this.
2018-10-22 10:17:31 +02:00
Behdad Esfahbod
b6b171732a
[colr] Minor
2018-10-22 10:17:31 +02:00
Behdad Esfahbod
a6ade3471e
[colr] Move sanitize() to right place
...
Sanitize always comes just before data member definitions, so
it's easy to cross-check.
2018-10-22 10:17:31 +02:00
Behdad Esfahbod
24adc15757
[colr] Touch up a bit
...
When a struct is plain old data with no references, etc, it's okay
to mark its members public.
2018-10-22 10:17:31 +02:00
Khaled Hosny
cc6e77ca98
[color] Fix documentation a bit
2018-10-22 10:17:31 +02:00
Ebrahim Byagowi
37ba2413c1
Minor
2018-10-22 10:17:31 +02:00
Ebrahim Byagowi
44f79b4bf8
Remove _palette_entry_count as can be done with _palette_colors
2018-10-22 10:17:31 +02:00
Ebrahim Byagowi
6795dcfc08
[test] Test hb_ot_color_has_{colr,cpal}_data
2018-10-22 10:17:31 +02:00
Ebrahim Byagowi
b8ee3a0ec8
[CPAL] Add palette entry and enable palette flag API
2018-10-22 10:17:31 +02:00
Ebrahim Byagowi
d4261b4bb6
Add API test for hb_ot_color_get_color_layers
2018-10-22 10:17:31 +02:00
Ebrahim Byagowi
456978d408
Address COLR/CPAL reviews and revive cpal_v1 tests
2018-10-22 10:17:31 +02:00
Ebrahim Byagowi
687f679b80
[color] Fix alpha channel value and adjust spaces
2018-10-22 10:17:31 +02:00
Ebrahim Byagowi
00e94ce24e
[dump-emoji] Formatting
2018-10-22 10:17:31 +02:00
Ebrahim Byagowi
e8a6f5b803
Add three macros for separating color channels
2018-10-22 10:17:31 +02:00
Khaled Hosny
d4e928b142
[color] Minimal API for COLR/CPAL
2018-10-22 10:17:31 +02:00
Behdad Esfahbod
1e39833ba8
[docs] Minor
2018-10-20 16:57:36 -07:00
Behdad Esfahbod
a5ad8c658d
[docs] More fixes
2018-10-20 16:52:55 -07:00
Behdad Esfahbod
314b1af74f
[docs] Fix warning
...
Fixes https://github.com/harfbuzz/harfbuzz/issues/1260
2018-10-20 16:49:16 -07:00
Behdad Esfahbod
b713c13977
[kerx] Implement tuple-kerning in Format0
2018-10-20 14:56:28 -07:00
Behdad Esfahbod
0a3b7a0fb0
2.0.2
2018-10-20 13:14:07 -07:00
Behdad Esfahbod
68b7050768
[kerx] Fix sanitize of KerxSubtableFormat2::array read
...
Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=11033
2018-10-20 12:20:57 -07:00
Behdad Esfahbod
00fdbca4f6
[aat] Fix LookupFormat10 sanitize
...
Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=11060
2018-10-20 12:20:57 -07:00
Ebrahim Byagowi
1e55e21dea
Merge pull request #1283 from khaledhosny/cygwin
...
Cygwin fixes and CI build
2018-10-20 07:45:46 +03:30
Behdad Esfahbod
7c2c8ac301
2.0.1
2018-10-19 19:39:58 -07:00
Bruce Mitchener
5a24ea15e0
Make more 'coords' params const.
2018-10-19 19:15:42 -07:00
Behdad Esfahbod
08b7172969
[font] Fix parallel funcs passing to eachover in infinite-loop
...
Fixes test just added.
2018-10-19 19:12:33 -07:00
Behdad Esfahbod
29d877518f
[kerx] Implement variation-kerning tables (without the variation part)
...
SFSNDisplay uses these. We just apply the default kern without
variations right now. But at least makes the default kern work.
2018-10-19 16:06:54 -07:00
Behdad Esfahbod
f7c0b4319c
[aat] Implement LookupFormat10
2018-10-19 15:23:49 -07:00
Khaled Hosny
30cbe6158d
Use O_BINARY instead of _O_BINARY
...
Cygwin does not seem to have the later
2018-10-19 22:46:40 +02:00
Behdad Esfahbod
79b6356155
[trak] Fix extrapolation at end side
2018-10-19 11:00:20 -07:00
Behdad Esfahbod
2352cc3539
[kerx] Whitespace
2018-10-19 10:17:02 -07:00
Ebrahim Byagowi
114f66dda6
Fix hb_map_is_empty logic
...
This needs reviewing
2018-10-19 20:23:36 +03:30
Ebrahim Byagowi
9df2fb1611
Add API tests for hb_map_t
2018-10-19 20:23:36 +03:30
Ebrahim Byagowi
c6eb5e852c
Don't report deprecated symbols as unused symbols
2018-10-19 20:23:36 +03:30
Bruce Mitchener
4594730f64
Remove redundant return at end of void-returning function.
2018-10-19 18:17:18 +02:00
Bruce Mitchener
8d1e479d1d
Use bool literals instead of 0/1.
2018-10-19 18:05:46 +02:00
Bruce Mitchener
257d0e5aa3
Fix typos.
2018-10-19 19:24:05 +03:30
Behdad Esfahbod
3d9a0306eb
2.0.0
2018-10-18 05:58:17 -07:00
Ebrahim Byagowi
03e144135b
[ubsan] Use unsigned int instead enum where needed ( #1270 )
...
Actually the check is right,
On -myanmar.hh, on that particular switch, OT_C is indic_category_t
but OT_D is myanmar_category_t so we are mixing the types in one variable.
And on -arabic.cc, step can goes one number higher than step_t enum in the
loop so we are actually using it as an unsinged int.
2018-10-18 11:06:37 +03:30
Behdad Esfahbod
f1ced9be37
More warning fix
...
Okay, let's see if the gods are happy now...
2018-10-17 23:06:53 -07:00
Behdad Esfahbod
40606abd0c
Fix build
2018-10-17 23:06:37 -07:00
Behdad Esfahbod
c406aca193
Fix warning
2018-10-17 22:58:43 -07:00
Behdad Esfahbod
270a37c324
Kick bots
2018-10-17 22:42:47 -07:00
Behdad Esfahbod
6da8ef3f9f
Fix some wierdness...
2018-10-17 22:37:34 -07:00
Behdad Esfahbod
83780308b4
[aat] Fix sanitize slowdown
...
Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=11034
2018-10-17 22:34:16 -07:00
Behdad Esfahbod
9e8a9b846e
[aat] Another try at fixing Lookup null objects...
...
Ugly as hell, and don't even understand why some bits are needed.
But the logic is sound.
2018-10-17 21:45:27 -07:00
Behdad Esfahbod
9d42d70269
[trak] Fix calc
...
We were getting the first track record always. Ie. this line:
if (trackTable[i].get_track_value () == 0.f)
{
- trackTableEntry = &trackTable[0];
+ trackTableEntry = &trackTable[i];
break;
}
The rest is cleanup.
Fixes https://github.com/harfbuzz/harfbuzz/issues/1263 for the most part.
2018-10-17 17:55:47 -07:00
Behdad Esfahbod
2e7c716511
[buffer] Add an assert
...
See if it helps debugging https://bugs.chromium.org/p/chromium/issues/detail?id=895117
2018-10-16 18:35:03 -07:00
Behdad Esfahbod
25fe7e7e10
[aat] Comment
2018-10-16 18:22:54 -07:00
HinTak
26092bb3d1
"allow-none" annotation for "out" parameters
...
Fixes the following warnings:
hb-ot-tag.cc:330: Warning: HarfBuzz: invalid "allow-none" annotation: only valid for pointer types and out parameters
hb-ot-tag.cc:334: Warning: HarfBuzz: invalid "allow-none" annotation: only valid for pointer types and out parameters
2018-10-16 17:36:10 -07:00
HinTak
49bdb54427
typo in gobject annotation - "in/out" should be "inout"
...
"in/out" should be "inout"
2018-10-16 16:41:12 -07:00
Behdad Esfahbod
36f38ea703
[gpos] Protect mark attachment against out-of-bounds
...
Not sure how can happen, but does...
2018-10-16 16:24:03 -07:00
Behdad Esfahbod
12cbe195ae
[aat] Another non-null offset
2018-10-16 16:13:53 -07:00
Behdad Esfahbod
87205ef935
[aat] Make sure Lookup offset is never nulled
...
It has unbounded size...
Fixes https://oss-fuzz.com/v2/testcase-detail/5718889451749376
2018-10-16 15:41:00 -07:00
Behdad Esfahbod
2137582c96
[morx] Reword ligation
...
Still fails MORX-41. Am talking to Sascha to better understand what CoreText
is doing.
2018-10-16 14:46:07 -07:00
Behdad Esfahbod
c53a25c657
[morx] Comment
2018-10-16 13:57:35 -07:00
Behdad Esfahbod
5eb7e7f646
Revert "[vector] Simplify Sort" and "More of the same"
...
This reverts commit de0b9a4664
.
This reverts commit 921f0e6ec7
.
Annnnd, revert. MSVC doesn't like it.
2018-10-16 13:33:14 -07:00
Behdad Esfahbod
661340c475
[kern] Scale kern pairs before applying
...
Fixes https://github.com/harfbuzz/harfbuzz/issues/1255
Fixes https://github.com/harfbuzz/harfbuzz/issues/1252
2018-10-16 13:24:29 -07:00
Behdad Esfahbod
de0b9a4664
[vector] More of the same
2018-10-16 13:01:27 -07:00
Behdad Esfahbod
921f0e6ec7
[vector] Simplify sort
...
Hopefully this fits fine with SFINAE with all our compilers.
2018-10-16 13:01:27 -07:00
Ebrahim Byagowi
42b75dc3a7
[kerx] Minor, remove debug bit
2018-10-16 10:58:09 +03:30
Behdad Esfahbod
11703afce6
[kerx] Fix Format6 sanitize
...
Fixes https://oss-fuzz.com/v2/testcase-detail/5650286710882304
2018-10-15 21:17:08 -07:00
Behdad Esfahbod
4c27da7638
[CBDT] Fix more offsetting
...
Fixes https://oss-fuzz.com/v2/testcase-detail/5750379279548416
2018-10-15 19:46:45 -07:00
Behdad Esfahbod
0f85edb778
[morx] Another end-of-text corner case
...
Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=10990
2018-10-15 11:15:54 -07:00
Behdad Esfahbod
55d5ea666c
[kerx] Merge clusters in Ligature
2018-10-15 11:05:10 -07:00
Behdad Esfahbod
bb35725cd7
[kerx/morx] More end-of-text protection
2018-10-15 11:05:10 -07:00
Ebrahim Byagowi
8f3048a1f8
[dump-emoji] minor
2018-10-15 12:16:47 +03:30
Ebrahim Byagowi
27e095a613
[dump-emoji] better explaination of the usage
2018-10-15 01:41:49 -07:00
Behdad Esfahbod
8dc6296818
[ot-font] Implement TrueType v_origin
...
Fixes https://github.com/harfbuzz/harfbuzz/issues/537
2018-10-15 01:09:05 -07:00
Behdad Esfahbod
6e07076fd0
[blob] Fix UBSan error
2018-10-14 22:22:45 -07:00
Behdad Esfahbod
fc812faaa9
[CBDT] Fix more offsetting issues
...
Fixes https://github.com/harfbuzz/harfbuzz/issues/960
dump-emoji still segfaults. Needs debugging.
2018-10-14 21:32:25 -07:00
Behdad Esfahbod
6aee3bb87c
[CBDT] Fix offset handling
...
Fixes https://github.com/harfbuzz/harfbuzz/issues/960
2018-10-14 21:08:42 -07:00
Behdad Esfahbod
da744c6b3e
[CBDT] More UnsizedArrayOf cleanup
2018-10-14 20:51:45 -07:00
Behdad Esfahbod
2995b4465b
[CBDT] Simplify sanitize
2018-10-14 20:37:57 -07:00
Behdad Esfahbod
1c76c8f6ff
[morx] Handle end-of-text conditions in Insertion
...
Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=10955
2018-10-14 19:39:31 -07:00
Behdad Esfahbod
60c1397673
[buffer] Fix output_glyph at end of buffer
...
Part of https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=10955
2018-10-14 19:38:14 -07:00
Behdad Esfahbod
7efa38257b
[aat] More protection against buffer fail
2018-10-14 19:30:44 -07:00
Behdad Esfahbod
e1add2a275
[hmtx] Whitespace
2018-10-14 16:26:03 -07:00
Behdad Esfahbod
62376a7d98
Ignore signed-integer-overflow while kerning
...
Fixes https://github.com/harfbuzz/harfbuzz/issues/1247
2018-10-14 15:20:50 -07:00
Behdad Esfahbod
40f2b9355c
[kerx] Fix Format1 sanitize
...
Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=10948
2018-10-14 14:56:32 -07:00
Behdad Esfahbod
44af1f93ee
[aat] Whitespace
2018-10-14 14:52:17 -07:00
Behdad Esfahbod
56b8dd17f6
[aat] Finish off massaging table
2018-10-13 19:03:33 -04:00
Behdad Esfahbod
e0c5e0d91b
[aat] WIP remove feature mapping here from hb-coretext
...
Need to map enum values to numerics since we don't have CoreText headers.
2018-10-13 18:46:52 -04:00
Behdad Esfahbod
cb05774913
[coretext] Prepare AAT feature mapping to be moved
2018-10-13 17:03:32 -04:00
Behdad Esfahbod
de6e414c56
[kerx] Sanitize more
2018-10-13 13:48:22 -04:00
Behdad Esfahbod
71f76f2f39
[kerx] Fix-up previous commit
...
A "&" was missing. Go back to using pointers that are less error-prone.
2018-10-13 13:36:27 -04:00
Behdad Esfahbod
6d4b054234
[kerx] Use sanitizer instead of handcoded runtime sanitization
2018-10-13 12:20:33 -04:00
Behdad Esfahbod
5733113662
[kerx] Wire up context down to get_kerning
2018-10-13 12:16:12 -04:00
Behdad Esfahbod
c4502833b7
[kerx] Use sanitizer.get_num_glyphs() instead of face->get_num_glyphs()
2018-10-13 12:09:59 -04:00
Behdad Esfahbod
fc45e698f2
[kerx] Protext against overflows
2018-10-13 12:09:59 -04:00
Behdad Esfahbod
ed2ee78136
[hangul] Fix use-after-free issue
...
out_info might have moved since we copied it's position into local
info var.
Fixes https://bugs.chromium.org/p/chromium/issues/detail?id=894937
2018-10-13 12:09:59 -04:00
Ebrahim Byagowi
63109432cf
Cosmetic and minor changes
2018-10-13 07:23:33 -04:00
Behdad Esfahbod
c0a6814b49
Touch up new API
...
New API:
+hb_ot_layout_feature_get_name_ids()
+hb_ot_layout_feature_get_characters()
2018-10-12 16:06:39 -04:00
Behdad Esfahbod
477bc9aafe
Add hb-ot-name.h
...
Actual name-fetching API to come later.
New API:
hb_name_id_t
HB_NAME_ID_INVALID
2018-10-12 16:06:39 -04:00
Ebrahim Byagowi
dc49bd8d81
Add two APIs for getting stylistic set labels
...
* hb_ot_layout_feature_get_characters
* hb_ot_layout_feature_get_name_ids
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-10-12 16:06:39 -04:00
Behdad Esfahbod
e9f9c0d81c
[sanitize] Reorder condition to silence bogus gcc warning
...
Was givin a dozen of:
../../src/hb-machinery.hh: In member function ‘bool AAT::ankr::sanitize(hb_sanitize_context_t*) const’:
../../src/hb-machinery.hh:307:23: warning: missed loop optimization, the loop counter may overflow [-Wunsafe-loop-optimizations]
bool ok = --this->max_ops > 0 &&
~~~~~~~~~~~~~~~~~~~~~~
this->start <= p &&
~~~~~~~~~~~~~~~~~~~
p <= this->end &&
~~~~~~~~~~~~~~~^~
(unsigned int) (this->end - p) >= len;
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
I believe those are bogus, but this silences them and does not introduce
logic issues I believe.
2018-10-12 16:06:39 -04:00
Behdad Esfahbod
1a6b5ac6c3
Add HB_DEPRECATED_FOR and mark relevant symbols
2018-10-12 16:06:39 -04:00
Behdad Esfahbod
c9413d7bb5
[graphite] Add HB_DEPRECATED annotation
2018-10-12 16:06:39 -04:00
Behdad Esfahbod
68c86af187
Always compile deprecated symbols
...
We haven't been keeping this updated. So, while we don't expose the
symbols in the headers if HB_DISABLE_DEPRECATED is defined, we still
always build them.
2018-10-12 16:06:39 -04:00
David Corbett
c55100000b
Add missing colons to GObject annotations
2018-10-11 22:47:35 -04:00
David Corbett
1e816d62ef
Fix Indic script tags in Graphite
2018-10-11 20:51:08 -04:00
Behdad Esfahbod
bf8469be9a
Attach CursivePositioning backwards, not forward
...
This is how Uniscribe does it. So, adjust. This is only relevant
to fonts that apply cursive positioning from a contextual lookup.
Fixes https://github.com/harfbuzz/harfbuzz/issues/1181
2018-10-11 20:45:40 -04:00