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
Michiharu Ariza
51fba41cc9
Merge branch 'master' into cff-subset
2018-10-18 13:08:42 -07:00
Michiharu Ariza
8679d02b4b
implement flex ops for glyph extents/subset
...
also removed unused CSInterpEnv::move_[xy]_with_arg
fixed bug a width being left over on argStack with CFF1
2018-10-18 13:04:21 -07:00
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
Michiharu Ariza
1f34388e8b
Merge branch 'master' into cff-subset
2018-10-17 09:34:48 -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
Michiharu Ariza
9ade3e7bb8
Merge branch 'master' into cff-subset
2018-10-15 14:03:23 -07:00
Michiharu Ariza
6420ffe00f
fixed type casting bug
2018-10-15 14:03:18 -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
Michiharu Ariza
db0d83ddc7
Merge branch 'master' into cff-subset
2018-10-13 17:25:38 -07:00
Michiharu Ariza
9228db06f4
added CFF1 Expert Encoding subset test & bug fixes
2018-10-13 17:25:09 -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
Michiharu Ariza
b64ef69b9e
from encode_int removed assert hit by fuzzer
...
clamp the value instead
2018-10-12 14:14:21 -07: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
Michiharu Ariza
fc0153a1d4
Merge branch 'master' into cff-subset
2018-10-12 12:16:50 -07:00
Michiharu Ariza
7d99a6cef8
overhauled error handling in CFF interpreter
...
minimized "if (error) return false" idiom
2018-10-12 02:16:07 -07: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
Behdad Esfahbod
bdb53ca24a
[myanmar] Implement Zawgyi shaper
...
Enabled if script tag 'Qaag' is passed to HarfBuzz. Disables mark
advance-zeroing and fallback mark-positioning.
Fixes https://github.com/harfbuzz/harfbuzz/issues/1162
2018-10-11 20:20:29 -04:00
Behdad Esfahbod
00c5c4a79d
[myanmar] Shuffle
2018-10-11 20:15:31 -04:00
Behdad Esfahbod
ec8f493bf9
[graphite] Remove assert
2018-10-11 20:15:00 -04:00
Behdad Esfahbod
5646dcbd11
Minor
2018-10-11 19:39:07 -04:00
Behdad Esfahbod
654365dc89
Pass indic3 tags to USE shaper
...
Fixes https://github.com/harfbuzz/harfbuzz/issues/539
2018-10-11 17:51:21 -04:00
David Corbett
28d091d045
Parse Indic3 tags
2018-10-11 17:44:13 -04:00
Behdad Esfahbod
2c824d3644
[aat] Fix two wrongs that made a right before!
...
Unfortunately our static asserts (DEFINE_SIZE_STATIC) don't actually
fail when used in templates, thanks to SFINAE. Le sighs.
Probably fixes https://oss-fuzz.com/v2/testcase-detail/5740171484463104
2018-10-11 16:43:05 -04:00
Behdad Esfahbod
e940530c97
[aat] Fix mul overflow
...
Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=10897
2018-10-11 15:56:17 -04:00
Behdad Esfahbod
0744a02cb1
[arabic] Update to latest UTR#53
...
From Lorna Evans: "That was a new character added to Unicode 11.0"
2018-10-11 15:14:18 -04:00
Behdad Esfahbod
4f9e36e8cf
[graphite] Remove deprecated symbol use
2018-10-11 14:32:59 -04:00
Behdad Esfahbod
da591f2a9d
Whitespace
2018-10-11 14:30:15 -04:00
Behdad Esfahbod
4d205f0462
[graphite] Fix deva/dev2 resolution
...
See https://github.com/harfbuzz/harfbuzz/pull/730#issuecomment-428277800
2018-10-11 14:25:48 -04:00
Behdad Esfahbod
8061664ad1
Add doc stubs for recently added API
...
Thanks to David Corbett who revamped our script and language processing
and implemented full BCP 47 support.
https://github.com/harfbuzz/harfbuzz/pull/730
New API:
+hb_ot_layout_table_select_script()
+hb_ot_layout_script_select_language()
+HB_OT_MAX_TAGS_PER_SCRIPT
+HB_OT_MAX_TAGS_PER_LANGUAGE
+hb_ot_tags_from_script_and_language()
+hb_ot_tags_to_script_and_language()
Deprecated API:
-hb_ot_layout_table_choose_script()
-hb_ot_layout_script_find_language()
-hb_ot_tags_from_script()
-hb_ot_tag_from_language()
2018-10-11 14:17:17 -04:00
Behdad Esfahbod
cf975ac653
Remove use of deprecated function
2018-10-11 14:07:44 -04:00
David Corbett
66790d64c7
Increase HB_OT_MAX_TAGS_PER_SCRIPT to 3
...
No script has 3 tags yet, but the plan is for the Indic scripts to each
get a third tag someday.
2018-10-11 13:54:28 -04:00
David Corbett
bca7a16938
Update language system tag registry to OT 1.8.3
2018-10-11 13:54:28 -04:00
David Corbett
7f1fbfe2e3
Add hb_ot_tags_to_script_and_language
2018-10-11 13:54:28 -04:00
David Corbett
3f8877473f
Switch on the first char of a complex language tag
...
This results in a tenfold speed-up for the common case of tags that are
not complex, in the sense of `hb_ot_tags_from_complex_language`.
2018-10-11 13:54:28 -04:00
David Corbett
a754d44195
Map Quechua languages to closest ones with tags
...
OpenType only officially maps four ISO 639 codes to Quechua languages,
but prior versions of HarfBuzz also mapped qu to 'QUZ '. Because qu is a
macrolanguage, the mapping now applies to all individual Quechua
languages. OpenType calls 'QUZ ' "Quechua", but it really corresponds to
Cusco Quechua, so the individual Quechua languages should not all
necessarily be mapped to it.
2018-10-11 13:54:28 -04:00
David Corbett
7c7cb2a989
Match extlang subtags
...
If the second subtag of a BCP 47 tag is three letters long, it denotes
an extended language. The tag converter ignores the language subtag and
uses the extended language instead.
There are some grandfathered exceptions, which are handled earlier.
2018-10-11 13:54:28 -04:00
David Corbett
2f1f961cc0
Autogenerate the BCP 47 to OpenType mappings
...
The new script, gen-tag-table.py, generates `ot_languages` automatically
from the [OpenType language system tag registry][ot] and the [IANA
Language Subtag Registry][bcp47] with some manual modifications. If an
OpenType tag maps to a BCP 47 macrolanguage, all the macrolanguage's
individual languages are mapped to the same OpenType tag, except for
individual languages with their own OpenType mappings. Deprecated
BCP 47 tags are canonicalized.
[ot]: https://docs.microsoft.com/en-us/typography/opentype/spec/languagetags
[bcp47]: https://www.iana.org/assignments/language-subtag-registry/language-subtag-registry
Some OpenType tags correspond to multiple ISO 639 codes. The mapping
from ISO 639 codes lists OpenType tags in priority order, such that more
specific or more likely tags appear first.
Some OpenType tags have no corresponding ISO 639 code in the registry so
their mappings use BCP 47 subtags besides the language. For example, any
BCP 47 tag with a fonipa variant subtag is mapped to 'IPPH', and 'IPPH'
is mapped back to und-fonipa.
Other OpenType tags have no corresponding ISO 639 code because it is not
clear what they are for. HarfBuzz just ignores these tags.
One such ignored tag is 'ZHP ' (Chinese Phonetic). It probably means
zh-Latn. However, it is used in Microsoft JhengHei and Microsoft YaHei
with the script tag 'hani', implying that it is not a romanization
scheme after all. It would be simple enough to add this mapping to
gen-tag-table.py once a definitive mapping is determined.
The manual modifications are mainly either obvious mappings that the
OpenType registry omits or mappings for compatibility with previous
versions of HarfBuzz. Some of the old mappings were discarded, though,
for homophonous language names. For example, OpenType maps 'KUI ' to
kxu; previous versions of HarfBuzz also mapped it to kvd, because kvd
and kxu both happen to be called "Kui".
gen-tag-table.py also generates a function to convert multi-subtag tags
like el-polyton and zh-HK to OpenType tags, replacing `ot_languages_zh`
and the hard-coded list of special cases in `hb_ot_tags_from_language`.
It also generates a function to convert OpenType tags to BCP 47,
replacing the hard-coded list of special cases in
`hb_ot_tag_to_language`.
2018-10-11 13:54:28 -04:00
David Corbett
2c7d4db7af
Deprecate obsolete functions
...
`hb_ot_tags` replaces `hb_ot_tags_from_script` and
`hb_ot_tag_from_language`.
`hb_ot_layout_table_select_script` replaces
`hb_ot_layout_table_choose_script`.
`hb_ot_layout_script_select_language` replaces
`hb_ot_layout_script_find_language`.
2018-10-11 13:54:28 -04:00
David Corbett
91067716f5
Refactor the selection of script and language tags
...
The old hb-ot-tag.cc functions, `hb_ot_tags_from_script` and
`hb_ot_tag_from_language`, are now wrappers around a new function:
`hb_ot_tags`. It converts a script and a language to arrays of script
tags and language tags. This will make it easier to add new script tags
to scripts, like 'dev3'. It also allows for language fallback chains;
nothing produces more than one language yet though.
Where the old functions return the default tags 'DFLT' and 'dflt',
`hb_ot_tags` returns an empty array. The caller is responsible for
using the default tag in that case.
The new function also adds a new private use subtag syntax for script
overrides: "x-hbscabcd" requests a script tag of 'abcd'.
The old hb-ot-layout.cc functions,`hb_ot_layout_table_choose_script` and
`hb_ot_layout_script_find_language` are now wrappers around the new
functions `hb_ot_layout_table_select_script` and
`hb_ot_layout_script_select_language`. They are essentially the same as
the old ones plus a tag count parameter.
Closes #495 .
2018-10-11 13:54:28 -04:00
David Corbett
a03f5f4dfb
Replace "ISO 639" with "BCP 47"
...
`hb_language_from_string` accepts not only ISO 639 but also BCP 47. Not
all ISO 639 codes are valid BCP 47 tags but the function does not accept
overlong language subtags anyway.
2018-10-11 13:54:28 -04:00
Michiharu Ariza
ce6639cd27
Merge branch 'master' into cff-subset
2018-10-11 10:53:48 -07:00
Behdad Esfahbod
0b9d60e1a1
[aat] Apply kerx if GPOS kern was not applied
...
Ned tells me this is what Apple does.
2018-10-11 13:26:58 -04:00
Behdad Esfahbod
b59a428af0
Minor
2018-10-11 13:24:17 -04:00
Behdad Esfahbod
04f72e8990
[trak] Implement extrapolation
...
This concludes trak, as well as AAT shaping support!
2018-10-11 11:25:07 -04:00
Behdad Esfahbod
d6a12dba6d
[trak] Fix, and hook up
...
Works beautifully! Test coming.
2018-10-11 11:10:06 -04:00
Behdad Esfahbod
3d7dea6dfd
[trak] Handle nSizes=0 and 1
2018-10-11 10:32:08 -04:00
Behdad Esfahbod
451f3de521
[trak] Fix counting
2018-10-11 10:30:32 -04:00
Behdad Esfahbod
a5be380cae
[trak] More
2018-10-11 10:29:02 -04:00
Behdad Esfahbod
d06c4a867f
[trak] Only adjust around first glyph
...
Assumes graphemes only have one base glyph.
2018-10-11 10:22:01 -04:00
Behdad Esfahbod
071a2cbcdd
[trak] Clean up
2018-10-11 10:18:46 -04:00
Behdad Esfahbod
fbbd926dba
[kerx] Implement Format4 action_type=1 contour-point-based attachment
...
Untested.
This concludes kerx table support!
2018-10-11 01:22:29 -04:00
Behdad Esfahbod
b6bc0d4ff6
[kerx] Implement Format4 action_type=2 coordinate-based attachment
...
Untested.
2018-10-11 01:17:57 -04:00
Behdad Esfahbod
1622ba5943
[kerx] Implement Format4 'ankr'-based mark attachment
...
Tested with Kannada MN:
$ HB_OPTIONS=aat ./hb-shape Kannada\ MN.ttc -u 0CCD,0C95,0CD6
[kn_ka.vattu=0+230|kn_ai_length_mark=1@326,0+607]
2018-10-11 01:17:33 -04:00
Behdad Esfahbod
7bb4da7d95
[aat] Wire up 'ankr' table to apply context
2018-10-11 00:52:07 -04:00
Behdad Esfahbod
28f0367aab
[kerx] Flesh out Format4
...
Doesn't apply actions yet.
2018-10-11 00:46:12 -04:00
Behdad Esfahbod
947962a287
[ankr] Implement table access
2018-10-10 23:07:03 -04:00
Behdad Esfahbod
7281cb3eeb
[ankr] Start fixing
2018-10-10 22:56:52 -04:00
Behdad Esfahbod
34caadc5c7
Ugh. Re-enable accidentally disabled GPOS
2018-10-10 22:17:07 -04:00
Behdad Esfahbod
f7c45bc33e
[kerx] Allow granularly disabling kerning
2018-10-10 22:15:13 -04:00
Behdad Esfahbod
2b72c4b63d
[kerx] Comment
2018-10-10 21:53:14 -04:00
Behdad Esfahbod
9f450f07b0
[kerx] Make Format1 work
...
Tested using Kannada MN:
$ HB_OPTIONS=aat ./hb-shape Kannada\ MN.ttc -u 0C95,0CCd,C95,CCD
[kn_ka.virama=0+1299|kn_ka.vattu=0+115|_blank=0@-115,0+385]
$ HB_OPTIONS=aat ./hb-shape Kannada\ MN.ttc -u 0C95,0CCd,C95,CCD --features=-kern
[kn_ka.virama=0+1799|kn_ka.vattu=0+230|_blank=0+0]
I don't see the GPOS table in the font do the same. ¯\_(ツ)_/¯
2018-10-10 21:46:58 -04:00
Michiharu Ariza
b5aa5dbb11
Merge branch 'master' into cff-subset
2018-10-10 18:36:35 -07:00
Michiharu Ariza
af61c3b10f
added vsindex test & fixed process_vsindex
2018-10-10 18:35:12 -07:00
Behdad Esfahbod
504cb68fc9
Disable mark advance zeroing as well as mark fallback positioning if doing kerx
2018-10-10 21:29:46 -04:00
Behdad Esfahbod
8496753796
[kerx] Implement Format1
...
Untested.
2018-10-10 21:18:37 -04:00
Behdad Esfahbod
c9165f5450
[kerx] More UnsizedArrayOf<>
2018-10-10 20:43:21 -04:00
Behdad Esfahbod
ca54eba484
[kerx] Fix bound-checking error introduced a couple commits past
2018-10-10 20:41:16 -04:00
Behdad Esfahbod
339036dd97
[kerx] Start fleshing out Format1
2018-10-10 20:37:22 -04:00
Behdad Esfahbod
ab1f30bd05
[kerx] Implement Format6
...
Untested. The only Apple font shipping with this format is San Francisco fonts
that use this for their kerx variation tables, which we don't support.
2018-10-10 20:10:20 -04:00
Behdad Esfahbod
c9a2ce9e05
[kerx] Move bounds-checking to subtable length itself
2018-10-10 20:00:44 -04:00
Behdad Esfahbod
22955b23cd
[kerx] Start fleshing out Format6
2018-10-10 19:58:20 -04:00
Behdad Esfahbod
f6aaad9b4f
[kerx] When rejecting variable kerning, also check for tupleCount
2018-10-10 19:20:06 -04:00
Behdad Esfahbod
7ed5366d3c
[kerx] No-op
...
Tested that Format0 works with Kannada MN font:
$ make -j5 lib -s && HB_OPTIONS=aat ./hb-shape Kannada\ MN.ttc -u 0C95,0CC2
[kn_ka=0+1000|kn_matra_uu=0@-30,0+1345]
$ make -j5 lib -s && HB_OPTIONS=aat ./hb-shape Kannada\ MN.ttc -u 0C95,0CC2 --features=-kern
[kn_ka=0+1030|kn_matra_uu=0+1375]
Note that GPOS does the same with 'dist' feature, and applies the whole difference to the
same glyph:
$ make -j5 lib -s && ./hb-shape Kannada\ MN.ttc -u 0C95,0CC2
[kn_ka=0+970|kn_matra_uu=0+1375]
$ make -j5 lib -s && ./hb-shape Kannada\ MN.ttc -u 0C95,0CC2 --features=-dist
[kn_ka=0+1030|kn_matra_uu=0+1375]
2018-10-10 19:12:27 -04:00
Behdad Esfahbod
7fa69e92ca
Comment
2018-10-10 19:02:32 -04:00
Behdad Esfahbod
7e6e5bf614
Fix option string matching
2018-10-10 18:59:07 -04:00
Behdad Esfahbod
5d34164d98
[kern/kerx] Fix offset base
...
Disable kern Format2.
Fix kerx Format2. Manually tested this with Tamil MN font and it works:
$ HB_OPTIONS=aat ./hb-shape Tamil\ MN.ttc -u 0B94,0B95
[tgv_au=0+3435|tgc_ka=1@-75,0+1517]
HB_OPTIONS=aat ./hb-shape Tamil\ MN.ttc -u 0B94,0B95 --features=-kern
[tgv_au=0+3510|tgc_ka=1+1592]
2018-10-10 18:23:09 -04:00
Behdad Esfahbod
60f86d32d7
[kerx] Don't loop over kerning subtables if kerning disabled
2018-10-10 18:10:05 -04:00
Behdad Esfahbod
38a7a8a89e
Allow HB_OPTIONS=aat to prefer AAT tables over OT
...
Fixes https://github.com/harfbuzz/harfbuzz/issues/322
2018-10-10 17:44:46 -04:00
Behdad Esfahbod
44f09afd5b
[kerx] Skip variation subtables
2018-10-10 17:32:32 -04:00
Behdad Esfahbod
1e8fdd285f
Remove HAVE_OT
...
We never tested compiling without it. Just kill it. We always build
our own shaper.
2018-10-10 16:32:35 -04:00
Behdad Esfahbod
7727e73756
[kerx] Actually hook up, and fix crash
2018-10-10 13:24:51 -04:00
Behdad Esfahbod
b3390990f5
Add per-subtable set-digests
...
This speeds up Roboto shaping by ~10%. I was hoping for more.
Still, good defense against lookups with many subtables.
2018-10-10 12:13:25 -04:00
Behdad Esfahbod
e78549edfb
Move apply down into subtables accel
2018-10-10 11:54:48 -04:00
Behdad Esfahbod
78c09bf213
Move subtable array into lookup accel
2018-10-10 11:50:46 -04:00
Behdad Esfahbod
97e5913d5a
Move more code
2018-10-10 11:41:05 -04:00
Behdad Esfahbod
c8f2d9334c
Move code
...
In preparation to move add per-subtable set digests...
2018-10-10 11:36:28 -04:00
Behdad Esfahbod
a03850a356
Fix GPOS/kern interaction
...
Oops. Was checking for kern feature in GSUB, not GPOS.
2018-10-10 10:57:28 -04:00
Behdad Esfahbod
d1be805e78
More rewriting plan compile
...
Hopefully more clear.
2018-10-10 10:49:45 -04:00
Behdad Esfahbod
961ab46b24
More reshuffle plan compile
2018-10-10 10:42:10 -04:00
Behdad Esfahbod
2091b509e3
[kerx] Hook up to shaper
2018-10-10 10:41:08 -04:00
Behdad Esfahbod
8d00c39bfc
[kern] Minor
2018-10-10 10:19:07 -04:00
Behdad Esfahbod
e655fd38cf
Apply TT or fallback kerning when GPOS does not have kern feature
...
Previously we only did if there was no GPOS whatsoever. This applies
to Arial, Times New Roman, etc in Win7. Was not kerning before. It
is now.
2018-10-10 10:19:07 -04:00
Behdad Esfahbod
754cf440bf
Minor
2018-10-10 10:19:07 -04:00
Michiharu Ariza
c06a5dff0b
Merge branch 'master' into cff-subset
2018-10-09 22:00:10 -07:00
Michiharu Ariza
83c5298f33
added cff1_legacyops.otf as test-ot-extents-cff test case
...
fixed roll operator bugs uncovered by the test
2018-10-09 21:59:36 -07:00
Behdad Esfahbod
0537a40193
[kerx] Comment
2018-10-09 23:37:00 -04:00
Behdad Esfahbod
362d324119
[aat] Rename
2018-10-09 23:27:00 -04:00
Behdad Esfahbod
54c9ecb92d
[morx] Use subtable range for embedded sanitizer here as well
2018-10-09 23:18:19 -04:00
Behdad Esfahbod
d35315cc02
[aat] Fixup recent commit
...
For 329f240108
max_ops is signed.
2018-10-09 23:17:32 -04:00
Behdad Esfahbod
948f59a13a
[kerx] Use subtable range for runtime checks
2018-10-09 23:07:47 -04:00
Behdad Esfahbod
329f240108
[aat] Set embedded sanitizer max ops really high
...
Since we consume it legitimately during shaping.
2018-10-09 23:03:20 -04:00
Behdad Esfahbod
ad76307486
[kerx] Comment
2018-10-09 22:57:00 -04:00
Behdad Esfahbod
db9600bbe1
[kerx] Remove junk
2018-10-09 22:55:47 -04:00
Behdad Esfahbod
27db859416
[kern/kerx] Adjust bounds check
2018-10-09 22:55:17 -04:00
Behdad Esfahbod
c66f7f8c5d
[kerx] Implement Format2 apply()
...
Still, not hooked.
2018-10-09 22:49:33 -04:00
Behdad Esfahbod
4b461785bd
Fix check
2018-10-09 22:46:30 -04:00
Behdad Esfahbod
4df8eb200d
[kern] Use kern subtable length for sanitizing in the accelerator
2018-10-09 22:46:12 -04:00
Behdad Esfahbod
8bff1d2994
[kern] Minor
2018-10-09 22:39:31 -04:00
Behdad Esfahbod
53e5594500
[kerx] Implement Format0 apply()
...
Not hooked up to be called yet.
2018-10-09 22:35:22 -04:00
Behdad Esfahbod
60318f8715
Minor
2018-10-09 22:25:53 -04:00
Behdad Esfahbod
210f899aca
[kern] Sanitize 4 bytes, not 2
2018-10-09 21:58:04 -04:00
Behdad Esfahbod
be2f148da4
[ft] Use mutex to lock access to FT_Face
...
Makes our FT-backed hb_font_t safe to use from multiple threads. Still,
the underlying FT_Face should NOT be used from other threads by client
or other libraries.
Maybe I add a lock()/unlock() public API ala PangoFT2 and cairo-ft.
Maybe not.
2018-10-09 16:24:50 -04:00
Behdad Esfahbod
d18c3c5861
[ft] Remove (probably) stale comment
2018-10-09 16:09:53 -04:00
Behdad Esfahbod
7003b601af
Minor
2018-10-09 15:55:26 -04:00
Behdad Esfahbod
07899435b8
Install ot-funcs on newly created funcs
...
**Finally**! Casual users can stop caring about font-funcs completely now,
like they haven't been needing to care re unicode-funcs for a few years.
2018-10-09 15:39:51 -04:00
Behdad Esfahbod
5515355367
[ot-font] Don't pre-load cmap table
...
Now that we have get_h_advances() and get_nominal_glyphs() implemented, the
overhead of doing a proper atomic load would be once per run, NOT once per
glyph. So, no need to pre-load the tables to avoid that overhead.
As such, hb_ot_font_set_funcs() has become really cheap. Can *finally* make
it be default font functions on all newly created fonts!
2018-10-09 15:12:09 -04:00
Behdad Esfahbod
ec84460e46
[ot/ft] Implement get_nominal_glyphs() callback
...
Some more measurable speedup. The recent commits' speedups are as follows:
Testing with Roboto, ****when disabling kern and liga****:
Before:
FT --features=-kern,-liga
user↦ 0m0.521s
OT --features=-liga,-kern
user↦ 0m0.568s
After:
FT --features=-liga,-kern
user↦ 0m0.428s
OT --features=-liga,-kern
user↦ 0m0.470s
So, 17% speedup.
Note that FT callbacks are faster than OT these days since we added an advance
cache to FT. I don't think the difference is enough to justify adding a cache
to OT.
When not disabling kern, the thing is three times slower, so the speedups
are three times less impressive... Still, 5% not bad for a codebase that I
otherwise thought is optimized out.
Note that, because of this and other optimiztions in our main shaper,
disabling kern and liga, the OT shaper is now *faster* than the fallback
shaper. So, that's my recommendation to clients that need the absolute
fastest...
2018-10-09 15:07:04 -04:00
Behdad Esfahbod
e883f52732
Call get_nominal_glyphs() for runs of simple clusters at a time
...
Even without FT or OT font funcs implementing get_nominal_glyphs(), there's measurable
speedup.
2018-10-09 14:50:57 -04:00
Behdad Esfahbod
8008bca83b
Whitespace
2018-10-09 14:43:03 -04:00
Behdad Esfahbod
30c114ffec
Avoid sort and recompose stages if all clusters simple
...
Even has measurable speedup...
2018-10-09 14:37:08 -04:00
Behdad Esfahbod
24382debe8
Rewrite main normalizer loop to isolate runs of simple clusters
2018-10-09 14:33:24 -04:00
Behdad Esfahbod
b5371f18ef
Inline decompose_cluster
...
Towards separating the common case into its own loop.
2018-10-09 14:12:59 -04:00
Michiharu Ariza
f5f505b512
Merge branch 'master' into cff-subset
2018-10-09 10:10:35 -07:00
Behdad Esfahbod
b314c4e9ab
[font] Add get_nominal_glyphs() callback (note the plural)
...
Unused as of now. To be wired up to normalizer, which would remove
overhead and allow hb-ot-font initialization to become a no-op, so
we can enable it by default.
2018-10-09 09:43:44 -04:00
Behdad Esfahbod
ca6a317012
Minor
2018-10-09 09:43:44 -04:00
Chun-wei Fan
8e4ad1d7a0
builds: Fix and clean up MSVC DLL builds
...
Instead of passing a CFLAG/CXXFLAG to define HB_EXTERN, define it
directly in src/hb.hh as __declspec(dllexport) extern when we are
building HarfBuzz as DLLs on Visual Studio. Define HB_INTERNAL
as nothing without defining HB_NO_VISIBILITY when building HarfBuzz as
DLLs to avoid linker errors on Visual Studio builds.
Also "install" harfbuzz-subset.dll into $(PREFIX)\bin as the
hb-subset utility will depend on that DLL at runtime, when HarfBuzz is
built as DLLs. Since it consists of private APIs that are subject to
change, we do not install its headers nor .lib file.
2018-10-09 09:43:36 -04:00
Behdad Esfahbod
e640f3a6b1
Another old bot fix
2018-10-09 08:28:07 -04:00
Behdad Esfahbod
e4f27f368f
Try fixing older bots
2018-10-09 08:20:10 -04:00
Behdad Esfahbod
bee93e2697
Add const to get_*_advances API
...
Ouch!
2018-10-09 08:02:25 -04:00
Behdad Esfahbod
cc126f2817
Minor
2018-10-09 01:10:15 -04:00
Behdad Esfahbod
b2fbe55b82
[icu] Unbreak
2018-10-09 01:07:36 -04:00
Behdad Esfahbod
a52bc039c3
Properly remove deprecated stuff
2018-10-09 00:56:33 -04:00
Michiharu Ariza
8b349040e9
Merge branch 'master' into cff-subset
2018-10-08 21:46:23 -07:00
Behdad Esfahbod
fc50916589
Remove deprecated decompose_compatibility stuff
2018-10-09 00:39:42 -04:00
Behdad Esfahbod
eed737f672
Remove deprecated eastasian_width
2018-10-09 00:37:10 -04:00
Behdad Esfahbod
47030b1855
[ft/ot] Remove implementation of deprecated kerning funcs
2018-10-09 00:30:45 -04:00
Behdad Esfahbod
977c8a8e5c
[kern] Minor
2018-10-09 00:22:08 -04:00
Behdad Esfahbod
ed5cfa42c7
[kern] Minor
2018-10-09 00:20:35 -04:00
Behdad Esfahbod
d219f899f4
Deprecate font kern API
2018-10-09 00:01:09 -04:00
Behdad Esfahbod
a51958819f
Apply TrueType/OpenType kern table when GPOS kern feature is not available
...
Fixes https://github.com/harfbuzz/harfbuzz/issues/250
2018-10-08 23:57:45 -04:00
Behdad Esfahbod
09ad2613c8
Separate fallback kern vs mark positioning
2018-10-08 23:30:24 -04:00
Behdad Esfahbod
3c23ff9b7c
[kern] Add kerning driver to TT kern table
2018-10-08 23:26:26 -04:00
Behdad Esfahbod
683c3a9533
[kern] Abstract away kerning machine
2018-10-08 23:09:48 -04:00
Behdad Esfahbod
fb4f438381
Add HB_DEPRECATED
...
Fixes https://github.com/harfbuzz/harfbuzz/issues/1232
2018-10-08 22:44:16 -04:00
Behdad Esfahbod
80e3102b8a
[kerx] Process coverage flags
2018-10-08 22:41:08 -04:00
Behdad Esfahbod
26d7305da7
Deprecate decompose_compatibility stuff
2018-10-08 22:31:35 -04:00
Behdad Esfahbod
42b51eee54
Deprecate eastasian_width stuff
2018-10-08 22:26:39 -04:00
Michiharu Ariza
df964a0931
fixed test-subset-cff2
2018-10-08 15:38:05 -07:00
Michiharu Ariza
a90fd8b9fe
Merge branch 'master' into cff-subset
2018-10-08 15:07:58 -07:00
Michiharu Ariza
b51418f596
added CFF2 get_extents
...
added source hb-ot-cff2-table.cc
augmented VariationData to return scalars
misc bug fixes, renaming, cleanup
2018-10-08 15:05:36 -07:00
Behdad Esfahbod
286a45641f
Minor
2018-10-08 16:41:08 -04:00
Behdad Esfahbod
c0d3bf1baf
Minor
2018-10-08 16:32:44 -04:00
Behdad Esfahbod
1a5a3325a2
[kerx] Minor
2018-10-07 23:08:39 -04:00
Behdad Esfahbod
d62b4011cc
[kern] Shout less
2018-10-07 22:58:06 -04:00
Behdad Esfahbod
c6bb3a588f
[kerx] Clean up Format2
2018-10-07 22:52:53 -04:00
Behdad Esfahbod
8aa83d97f9
[kern/kerx] Fix Format2 offsetting
...
"The values in the right class table are stored pre-multiplied by the
number of bytes in a single kerning value, and the values in the left
class table are stored pre-multiplied by the number of bytes in one
row. This eliminates needing to multiply the row and column values
together to determine the location of the kerning value. The array can
be indexed by doing the right- and left-hand class mappings, adding the
class values to the address of the array, and fetching the kerning
value to which the new address points."
2018-10-07 22:45:15 -04:00
Behdad Esfahbod
ed2a404272
[kerx] Clean up Format0
2018-10-07 22:37:20 -04:00
Behdad Esfahbod
4c3b19d52e
Support HBUINT32 BinSearchArrayOf
2018-10-07 22:30:42 -04:00
Behdad Esfahbod
456a68c506
Move code
2018-10-07 22:28:45 -04:00
Behdad Esfahbod
3515c8b187
[aat] Rename
2018-10-07 22:27:00 -04:00
Behdad Esfahbod
e42cd58c99
Rename invisible_codepoint to invisible_glyph in API
...
Deleted recently added API:
hb_buffer_set_invisible_codepoint()
hb_buffer_get_invisible_codepoint()
hb-shape / hb-view --invisible-codepoint
New API:
hb_buffer_set_invisible_glyph()
hb_buffer_get_invisible_glyph()
hb-shape / hb-view --invisible-glyph
Fixes https://github.com/harfbuzz/harfbuzz/issues/1216
2018-10-07 20:47:30 -04:00
Behdad Esfahbod
2a5cb37fdb
Revert "[morx] Fix MORX-35"
...
This reverts commit f62f6e90ad
.
2018-10-07 20:37:15 -04:00
Behdad Esfahbod
14ebf8af0c
[buffer] Improve shift_forward()
...
"Improve" is a strong word in this case though, I understand.
2018-10-07 20:35:06 -04:00
Behdad Esfahbod
f62f6e90ad
[morx] Fix MORX-35
...
Fixes https://github.com/harfbuzz/harfbuzz/issues/1224
2018-10-07 18:52:48 -04:00
Behdad Esfahbod
94368855c6
Remove some code
...
We use scratch-flags to short-circuit this function. No need for previous
early loop.
2018-10-07 18:52:48 -04:00
Behdad Esfahbod
fdce1e1543
[kerx] Clean up kerx and KerxTable structures
2018-10-07 14:01:33 -04:00
Behdad Esfahbod
71b65eb27d
Add API for setting invisible-codepoint
...
Fixes https://github.com/harfbuzz/harfbuzz/issues/1216
New API:
hb_buffer_set_invisible_codepoint()
hb_buffer_get_invisible_codepoint()
hb-shape / hb-view --invisible-codepoint
2018-10-07 18:43:26 +02:00
Behdad Esfahbod
13da3be0b3
[ot-font] Load hmtx/vmtx lazily
...
Since we have get_*_advanes() API now, the overhead is once per shape,
not once per glyph.
Only cmap is warmed-up at set_funcs() time now.
2018-10-07 18:25:41 +02:00
Behdad Esfahbod
856db4c918
Minor
2018-10-07 18:21:15 +02:00
Behdad Esfahbod
b2e398c077
[coretext] Fix OS X check
...
Fixes https://github.com/harfbuzz/harfbuzz/issues/1230
2018-10-07 16:31:33 +02:00
Michiharu Ariza
55942ad5c1
Merge branch 'master' into cff-subset
2018-10-06 14:49:44 -07:00
Behdad Esfahbod
7ee50af836
[morx] Fix memory access issues with unsafe_to_break
2018-10-06 21:31:44 +02:00
Behdad Esfahbod
0816a54978
[uniscribe/coretext] Fix for previous change
2018-10-06 02:40:57 +02:00
Behdad Esfahbod
341206eb60
[vector] Make hb_vector_t relocatable / nestable
...
Ugly, but...
Fixes https://github.com/harfbuzz/harfbuzz/issues/1227
2018-10-05 18:39:48 +02:00
Behdad Esfahbod
5469d80707
Add hb_vector_t::fini_deep ()
2018-10-05 18:21:08 +02:00
Behdad Esfahbod
4831e615d1
[morx] Fix memory access issue
...
If buffer was enlarged, info was being outdated.
Fixes https://github.com/harfbuzz/harfbuzz/issues/1225
2018-10-05 18:14:13 +02:00
Behdad Esfahbod
a62f37d6fa
Change vendor features from Harf/Buzz to HARF/BUZZ
...
a01194aaf4 (commitcomment-30772041)
"The tag space of tags consisting of four uppercase letters (A-Z) with no punctuation,
spaces, or numbers, is reserved as a vendor space. Font vendors may use such tags to
identify private features."
2018-10-05 02:49:29 +02:00
Michiharu Ariza
e7a045e4db
fixed leak exposed by test-ot-extents-cff
2018-10-04 14:16:07 -07:00
Michiharu Ariza
0222d57c35
tweaked previous warning fixes
2018-10-04 09:37:57 -07:00
Behdad Esfahbod
a01194aaf4
Enable two OpenType features, 'Harf' and 'Buzz'
...
One early, before script-specific features, one late, after. Allows font
developers to detect us and behave differently if needed.
2018-10-04 13:00:37 +02:00
Behdad Esfahbod
14ff3cbe0f
Apply morx if there's no GSUB!
2018-10-04 11:34:21 +02:00
Behdad Esfahbod
3417037eb1
[aat] Add +hb_aat_layout_has_substitution
2018-10-04 11:17:19 +02:00
Sascha Brawer
7810bb1a59
[morx] Only insert glyphs at mark when a mark has been set before
...
This reverts commit f4072e8cb8
.
https://github.com/harfbuzz/harfbuzz/issues/1195
2018-10-04 10:29:23 +02:00
Michiharu Ariza
3ef358909e
fixed warnings
2018-10-03 18:08:25 -07:00
Michiharu Ariza
8be5a9186b
Merge branch 'master' into cff-subset
2018-10-03 17:06:18 -07:00
Ebrahim Byagowi
5de2d9cdbd
Minor, fix double-promotion warnings ( #1221 )
2018-10-04 02:14:18 +03:30
mhosken
e4e74c2751
Update Graphite API to latest ( #1215 )
2018-10-03 23:03:26 +03:30
Behdad Esfahbod
b710ea4fde
Clean Fitzpatrick hack
2018-10-03 21:17:59 +02:00
Behdad Esfahbod
95e5f1ae69
Unbreak Fitzpatrick
...
Fixes https://github.com/harfbuzz/harfbuzz/issues/1159
2018-10-03 21:11:40 +02:00
Behdad Esfahbod
03fb6dd4c7
Rewrite grapheme-formation in terms of new work
...
Also, don't attach ZWNJ to previous cluster. Closer to Unicode graphemes.
2018-10-03 21:11:40 +02:00
Behdad Esfahbod
68106b1d9b
Minor
2018-10-03 21:11:40 +02:00
Behdad Esfahbod
06922acbc4
Fix distcheck
2018-10-03 20:19:42 +02:00
Behdad Esfahbod
4eea2e279b
[thai] Set continuation on decomposed nikhahit
2018-10-03 20:19:42 +02:00
Behdad Esfahbod
8edc91022c
[indic] Reset continuation on inserted dottedcircle
2018-10-03 20:19:42 +02:00
Behdad Esfahbod
2a6f15213e
[buffer] Inline some more
2018-10-03 20:19:42 +02:00
Behdad Esfahbod
6f39c22029
Add code
2018-10-03 20:19:42 +02:00
Behdad Esfahbod
19d50aa262
[indic] Simplify dottedcircle
2018-10-03 20:19:42 +02:00
Behdad Esfahbod
3b78318510
[emoji] Mark emoji contination sequences as continuation
...
This adds a new grapheme bit. Not used yet.
Part of https://github.com/harfbuzz/harfbuzz/issues/1159
2018-10-03 20:19:42 +02:00
Behdad Esfahbod
123326e20a
Dotted-circle all marks, not just non-spacing, at text beginning
2018-10-03 20:19:42 +02:00
Behdad Esfahbod
674560cf24
Fix build
2018-10-03 19:10:28 +02:00
Behdad Esfahbod
45e55f7080
[indic] Fix clang everything
2018-10-03 18:45:27 +02:00
Behdad Esfahbod
4df02e3240
Minor
2018-10-03 18:45:27 +02:00
Behdad Esfahbod
1e8f195b96
[emoji] Add emoji Extended_Pictographic table and function
...
Part of https://github.com/harfbuzz/harfbuzz/issues/1159
.
2018-10-03 18:45:27 +02:00
Behdad Esfahbod
1dc601b04a
[os2] Minor rename/shuffle
2018-10-03 18:45:27 +02:00
Behdad Esfahbod
df32eaae42
[indic] Disallow vowel mark combinations that spoof other vowel marks
...
Fixes https://github.com/harfbuzz/harfbuzz/issues/1019
New numbers:
BENGALI: 353725 out of 354188 tests passed. 463 failed (0.130722%)
DEVANAGARI: 707261 out of 707394 tests passed. 133 failed (0.0188014%)
GUJARATI: 366353 out of 366457 tests passed. 104 failed (0.0283799%)
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%)
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%)
Devanagari regressed because Uniscribe doesn't enforce the full set.
Tests added with the *-vowel-letters.txt files in tree and Noto fonts.
2018-10-03 15:53:28 +02:00
Behdad Esfahbod
1b8d5e9991
[thai] Minor
2018-10-03 15:31:33 +02:00
Behdad Esfahbod
0dd9101fd0
Minor
2018-10-03 15:31:33 +02:00
Behdad Esfahbod
9c4ffd10c4
Minor
2018-10-03 15:31:33 +02:00
HinTak
bd1be8738f
Missing colon for gobject annotation
...
There should be a colon separating "(transfer full)" and the rest. Warned by g-ir-scanner.
2018-10-03 15:31:26 +02:00
Behdad Esfahbod
75114e01d2
[use] Add Halant_Or_Vowel_Modifier category
...
Fixes https://github.com/harfbuzz/harfbuzz/issues/1102
2018-10-03 12:30:23 +02:00
Michiharu Ariza
d7b384ad0d
silence warning ^3
2018-10-02 21:08:36 -07:00
Michiharu Ariza
e9cc71ac86
silence warning ^2
2018-10-02 20:44:30 -07:00
Michiharu Ariza
51d5bf4ca2
silence warnings
2018-10-02 14:38:06 -07:00
Michiharu Ariza
35b64dfb57
silence & fix new warnings
2018-10-02 14:13:36 -07:00
Michiharu Ariza
eed7e6bbc8
redefine OpCodes as define instead of enum
...
in order to eradicate duplicate enum warnings
2018-10-02 13:45:14 -07:00
Michiharu Ariza
9cdd70b344
Merge branch 'master' into cff-subset
2018-10-02 13:43:21 -07:00
Ebrahim Byagowi
6353cc1f83
[circleci] Fix some of warnings from clang-everything bot ( #1211 )
...
* -Wshift-sign-overflow
* -Wmissing-prototypes
2018-10-02 21:39:19 +03:30
Behdad Esfahbod
fef7af1e22
[tibetan] Remove unused Tibetan shaper
2018-10-02 18:46:13 +02:00
Behdad Esfahbod
32a438166f
[tibetan] Route Tibetan through USE
...
Fixes https://github.com/harfbuzz/harfbuzz/pull/933
https://github.com/harfbuzz/harfbuzz/issues/1012
Tibetan failures go from 0 to 2:
TIBETAN: 208467 out of 208469 tests passed. 2 failed (0.000959375%)
2018-10-02 18:44:57 +02:00
Behdad Esfahbod
77792187be
[khmer] Remove unused khmer_position()
2018-10-02 18:20:16 +02:00
Behdad Esfahbod
5101abd42f
[indic/use] Factor common expressions in ragel machine
...
No machine change.
2018-10-02 17:49:06 +02:00
Behdad Esfahbod
6f457f8370
[indic] Minor flip grammar around
...
No behavior change.
2018-10-02 17:46:27 +02:00
Behdad Esfahbod
40d5d19d5b
[ragel] Use ts/te (token-start / token-end) instead of manual tracking
2018-10-02 17:04:05 +02:00
Behdad Esfahbod
9efddb9de8
Treat a base+mark... ligature as base, not ligature
...
Fixes https://github.com/harfbuzz/harfbuzz/issues/746
2018-10-02 16:05:26 +02:00
Behdad Esfahbod
3cca978723
Move code around
2018-10-02 15:02:35 +02:00
Behdad Esfahbod
0a371fee4d
Minor
2018-10-02 14:48:39 +02:00
Behdad Esfahbod
94d15528f8
Minor
2018-10-02 14:45:09 +02:00
Behdad Esfahbod
729f634728
Disable joiner-skipping when looking back for base to attach mark to
...
Fixes https://github.com/harfbuzz/harfbuzz/issues/1189
2018-10-02 14:41:31 +02:00
Behdad Esfahbod
c36f3f5bef
[arabic] Use manual-zwj instead of flipping joiners
2018-10-02 14:36:47 +02:00
Behdad Esfahbod
48c513fec9
Minor
2018-10-02 14:19:34 +02:00
Behdad Esfahbod
cca757ae56
Minor
2018-10-02 14:10:26 +02:00
Behdad Esfahbod
96eca87f89
Move things
2018-10-02 13:24:40 +02:00
Behdad Esfahbod
588a4ac8bc
Rename
2018-10-02 13:16:43 +02:00
Behdad Esfahbod
10b6c7c638
Minor include cleanup
2018-10-02 13:11:18 +02:00
Behdad Esfahbod
1d1734e985
Shuffle code around
2018-10-02 13:04:05 +02:00
Khaled Hosny
d27e5ec3a2
Skip BOM in the Python sample file
...
Fixes https://github.com/harfbuzz/harfbuzz/issues/1208
2018-10-02 08:25:29 +02:00
HinTak
f9ea3dc4c6
Missing "out" indicator ( #1209 )
...
Missing "out" indicator. Affect gobject introspection.
2018-10-02 09:13:06 +03:30
Ebrahim Byagowi
f72b748371
[circleci] Fix "msan" and "everything" bots ( #1205 )
2018-10-02 00:16:08 +03:30
Behdad Esfahbod
8bf4027d23
[indic] Remove Consonant_Medial from grammar and code
...
The only Indic CM is U+0A75 GURMUKHI SIGN YAKASH, which Uniscribe doesn't treat
specially, and font designers design for that. So, do the same.
2018-10-01 20:05:00 +02:00
Behdad Esfahbod
5143654716
[khmer] Rewrite grammar completely
...
Based on experimenting with Uniscribe to extract grammar and categories.
Failures down from 44 to 35:
KHMER: 299089 out of 299124 tests passed. 35 failed (0.0117008%)
We still don't enforce the one-matra rule pre-decomposition, but enforce
an order and one-matra-per-position post-decomposition.
https://github.com/harfbuzz/harfbuzz/issues/667
2018-10-01 19:23:47 +02:00
Michiharu Ariza
3dd43f0234
Merge branch 'master' into cff-subset
2018-10-01 10:22:06 -07:00
Behdad Esfahbod
aaaa65baa7
[khmer] Remove unused code
2018-10-01 16:59:48 +02:00
Behdad Esfahbod
81afdbe803
[use] Disable automatic ZWJ for 'akhn' feature
...
Fixes https://github.com/harfbuzz/harfbuzz/issues/746
2018-10-01 15:27:35 +02:00
Behdad Esfahbod
ceef311dca
[use] Change categories for Left_And_* matras
...
These are only relevant to Sinhala, because they decompose in other
cases. The USE spec categorizes them all as VPst. No idea why we
weren't following that before.
2018-10-01 13:04:49 +02:00
Behdad Esfahbod
3426a36157
Unbreak bots
2018-10-01 12:55:57 +02:00
Behdad Esfahbod
98ac01d3b3
[morx] Break out if buffer gets into error
...
Was getting stuck not making progress somehow.
2018-10-01 12:10:00 +02:00
Behdad Esfahbod
df827a6ab8
[cache] Fix cache coherency corner-case
...
If key_bits+value_bits-cache_bits==32 then -1 is ambiguous...
2018-10-01 11:39:29 +02:00
Ebrahim Byagowi
0fa1edbd3b
[circleci] Couple of fixes ( #1200 )
...
* Raise error on warnings on -everything
* Enable fontconfig to two bots
* Fix msan bot now that all of its real complain are gone
2018-10-01 09:40:29 +03:30
Behdad Esfahbod
ad1c190ecf
Correct fix for glib-mkenum warning
2018-09-30 18:26:45 +02:00
Behdad Esfahbod
1dd1e56bf4
Revert "Fix glib-mkenum warning"
...
This reverts commit 247756a7d8
.
Was wrong. Right fix coming.
2018-09-30 18:25:58 +02:00
Behdad Esfahbod
3f08750fa6
Move _POSIX_SOURCE to hb.hh
2018-09-30 18:23:34 +02:00
Behdad Esfahbod
90dd255e57
Change _HB_SCRIPT_MAX_VALUE from 0xFFFFFFFF to 0x7FFFFFFF
...
Fixes https://github.com/harfbuzz/harfbuzz/issues/504
2018-09-30 18:19:54 +02:00
Behdad Esfahbod
5c65ed800d
Fix bug introduced in 9b0b40b3c1
...
Also discovered by msan bot.
2018-09-30 17:49:33 +02:00
Behdad Esfahbod
247756a7d8
Fix glib-mkenum warning
...
GEN hb-gobject-enums.h
WARNING: Failed to parse "/*< private >*/" in ../../src/hb-buffer.h
2018-09-30 17:49:33 +02:00
Behdad Esfahbod
b1e07e1e6c
[indic/khmer] Remove use of global constructors
...
Alternative woul have been to resurrect F_COMBINE that I removed in
70136a78cb
But this does it for now. I'm not sure why check-static-inits.sh didn't
catch this before. Clang -Weverything bot did:
CXX libharfbuzz_la-hb-ot-shape-complex-indic.lo
hb-ot-shape-complex-indic.cc:99:1: warning: declaration requires a global constructor [-Wglobal-constructors]
indic_features[] =
^
1 warning generated.
CXX libharfbuzz_la-hb-ot-shape-complex-khmer.lo
hb-ot-shape-complex-khmer.cc:36:1: warning: declaration requires a global constructor [-Wglobal-constructors]
khmer_features[] =
^
1 warning generated.
2018-09-30 06:08:11 -04:00
Behdad Esfahbod
00cd00e641
Tweak HB_TAG and HB_UNTAG
...
uint32_t was getting promoted to signed int, which is not what we wanted...
Wow, clang has become good at generating warnings...
../../src/hb-common.h:349:29: warning: signed shift result (0xFF000000) sets the sign bit of the shift expression's type ('int') and becomes negative [-Wshift-sign-overflow]
_HB_SCRIPT_MAX_VALUE = HB_TAG_MAX, /*< skip >*/
^~~~~~~~~~
../../src/hb-common.h:93:20: note: expanded from macro 'HB_TAG_MAX'
define HB_TAG_MAX HB_TAG(0xff,0xff,0xff,0xff)
^~~~~~~~~~~~~~~~~~~~~~~~~~~
../../src/hb-common.h:89:57: note: expanded from macro 'HB_TAG'
define HB_TAG(c1,c2,c3,c4) ((hb_tag_t)((((uint8_t)(c1))<<24)|(((uint8_t)(c2))<<16)|(((uint8_t)(c3))<<8)|((uint8_t)(c4))))
~~~~~~~~~~~~~~~^ ~~
../../src/hb-common.h:349:3: warning: ISO C restricts enumerator values to range of 'int' (4294967295 is too large) [-Wpedantic]
_HB_SCRIPT_MAX_VALUE = HB_TAG_MAX, /*< skip >*/
^ ~~~~~~~~~~
2018-09-30 06:08:11 -04:00
Behdad Esfahbod
8a31e40629
[font] Make *_advance() fallback to *_advances
...
And remove redundant implementations.
2018-09-30 06:08:11 -04:00
Behdad Esfahbod
bd07d2878f
Use buffer scratch_flags to remember if we had any joiners
2018-09-30 06:08:11 -04:00
Behdad Esfahbod
ba0f0f156f
Document setlocale() threadsafety issue
...
"Fixes" //github.com/harfbuzz/harfbuzz/issues/1191
2018-09-30 06:08:11 -04:00
Behdad Esfahbod
9b0b40b3c1
Fix fallback kerning to check for current glyph's mask
2018-09-28 20:53:23 -04:00
Behdad Esfahbod
f4072e8cb8
[morx] Remove mark_set from Insertion
...
text-rendering-tests test MORX-32 shows that for Insertion, an unset mark is treated
as mark set at 0. This is unlike the Reordering lookup where un unset mark performs
nothing.
Fixes MORX-32.
2018-09-28 10:14:23 -04:00
Behdad Esfahbod
0d18ec5467
[morx] unsafe-to-break in Insertion
...
Makes MORX-29, MORX-30, MORX-31 pass.
2018-09-28 10:01:59 -04:00
Behdad Esfahbod
b435df3a5b
More atomic tuneup
2018-09-28 09:13:14 -04:00
Behdad Esfahbod
d2542cd28c
More atomic fixup
2018-09-27 17:23:24 -04:00
Behdad Esfahbod
3ee96984f4
Fixup atomics from recent change
2018-09-27 17:20:26 -04:00
Behdad Esfahbod
305468708d
[cache] Use atomic writes in clear()
...
To help TSan.
2018-09-27 16:54:23 -04:00
Volker Krause
9e9a36ee65
Fix infinite loop when walking up the directory hierarchy ( #1183 )
...
A single find_package(harfbuzz) line in user code resulted in this loop
getting stuck when _harfbuzz_libdir_iter became "/".
2018-09-27 18:03:49 +03:30
Michiharu Ariza
ab16b24cc9
tweaked get_fd fix
2018-09-26 18:51:36 -07:00
Michiharu Ariza
dac70f252a
Added CFF1 J font subset to api test
...
Also fixed FDSelect3_4::get_fd
Fixed test_subset_cff1_strip_hints (wrong font names!)
2018-09-26 16:30:26 -07:00
Behdad Esfahbod
662f7d7e8b
[arabic] Do the joiner-flipping only for rlig feature
...
See comment.
2018-09-26 18:54:09 -04:00
Behdad Esfahbod
7f30629cdd
[ft] Make TSan happy
2018-09-26 16:40:59 -04:00
Behdad Esfahbod
ec743fce2a
Add more atomic intrinsics
2018-09-26 16:40:59 -04:00
Behdad Esfahbod
90a0f9fa0c
Make TSan happy with make_immutable()
2018-09-26 15:03:07 -04:00
Behdad Esfahbod
824111d484
Fix iOS build
...
Fixes https://github.com/harfbuzz/harfbuzz/pull/1179
2018-09-25 12:47:48 -04:00
Michiharu Ariza
ae7f0e83d4
fixed memory leaks
...
in CFF1 & CFF2 accelerators, VORG subsetter
2018-09-24 22:49:44 -07:00
Behdad Esfahbod
6c0e7eb6a6
Minor
2018-09-24 19:07:23 -04:00
Behdad Esfahbod
d748dc7664
More iter inits
2018-09-24 18:30:50 -04:00
Behdad Esfahbod
d9867497d0
Minor
2018-09-24 18:11:59 -04:00
Behdad Esfahbod
70136a78cb
Remove F_COMBINE
...
Now I wonder if any bots will be unhappy we calling | in static const initializations...
Or would that cost runtime init? Our tests don't detect any..
2018-09-24 18:04:17 -04:00
Behdad Esfahbod
f048ead84a
Some more
2018-09-24 18:04:17 -04:00
Behdad Esfahbod
1676f608c8
Minor refactoring
2018-09-24 18:04:17 -04:00
Behdad Esfahbod
4839807340
[check-static-inits.sh] Allow some if ubsan is in effect
2018-09-24 13:11:34 -04:00
Michiharu Ariza
0604bf2b38
Merge branch 'master' into cff-subset
2018-09-24 10:09:25 -07:00
Behdad Esfahbod
e45ba31dc7
[check-symbols.sh] Allow weak objects "V"
...
ubsan generates these.
2018-09-24 13:04:48 -04:00
Behdad Esfahbod
2d93148a0f
Ignore weak symbols in check-symbols.sh
...
Some clang versions leave a std::round(float) weak symbol around...
2018-09-24 11:52:22 -04:00
Behdad Esfahbod
55bae6825e
[docs] A few improvements
...
If we wrote just this much every day...
2018-09-24 10:43:06 -04:00
Behdad Esfahbod
57fa2c23de
Readjust Hebrew composition again
2018-09-24 09:57:52 -04:00
Behdad Esfahbod
7f335390f3
Revert change that would decompose text if GPOS mark feature is available
...
https://github.com/harfbuzz/harfbuzz/issues/653#issuecomment-423905920
2018-09-24 09:56:18 -04:00
Behdad Esfahbod
a6f4b2f7cd
Fix normalization
...
62d1e0852a (commitcomment-30613091)
2018-09-24 09:54:37 -04:00
Behdad Esfahbod
3583fb03b1
Simplify ZWJ-skipping a bit
...
Towards disabling ZWJ-skipping in certain GPOS contexts.
Part of https://github.com/flutter/flutter/issues/16886
2018-09-23 22:33:38 -04:00
Behdad Esfahbod
9516cbd3df
Reinit skippy iters when auto_zwj / auto_zwnj change
...
Ouch. How did we not hit this bug before...
2018-09-23 22:00:34 -04:00
Behdad Esfahbod
62d1e0852a
Prefer decomposed form if font has GPOS mark feature
...
Fixes https://github.com/harfbuzz/harfbuzz/issues/653
2018-09-23 21:32:18 -04:00
Behdad Esfahbod
d7f21777e6
[ot-font] Fix leak
...
Fixes https://github.com/harfbuzz/harfbuzz/issues/1171
I'm glad we have leak-detector bots now.
2018-09-23 19:12:52 -04:00
Matt Oliver
24dd6c1a9d
src/hb-blob.cc: Fix mmap functionality with UWP.
2018-09-23 07:23:58 -07:00
Michiharu Ariza
76e54d2bd8
fixed subroutinized CFF2 flattening
...
and some code cleanup
2018-09-21 12:16:36 -07:00
Michiharu Ariza
f212c050ad
Added VORG struct and its subsetter
...
new file: hb-ot-vorg-table.hh
2018-09-20 09:45:43 -07:00
Behdad Esfahbod
5fd8bce945
[morx] Fix mark_set check
2018-09-19 22:34:09 -04:00
Michiharu Ariza
1377adc8a8
Added SourceHanSans-Regular for CFF subset test
...
Disabled FDSelect serialization to format 0 for compatibility with fonttools
2018-09-19 17:00:10 -07:00
Behdad Esfahbod
0739b28169
[aat] Minor
2018-09-19 17:32:21 -04:00
Behdad Esfahbod
7671cb9b04
[coretext] Minor
2018-09-19 17:10:26 -04:00
Behdad Esfahbod
dc8ed45292
[morx] Implement forward/backward processing
...
We reverse too many times. Can be optimized. But I doubt many fonts
use reverse lookups, so doesn't matter.
Other than not applying user features, this completes morx table
implementation.
2018-09-19 16:47:25 -04:00
Behdad Esfahbod
3bccd62196
[morx] Implement horiz-only/vert-only subtables
2018-09-19 16:24:34 -04:00
Behdad Esfahbod
041a08de3d
[morx] Improve buffer position in Insertion w DontAdvance and wo
...
Just speculation. Needs tests to determine which is correct behavior.
2018-09-19 16:02:56 -04:00
Michiharu Ariza
ebeccf3e63
fixed char widths & standard Encoding in subset CFF
...
also merged flush_n_args to flush_args into one
takes start index of the arguments on stack instead of count
2018-09-18 17:24:30 -07:00
Michiharu Ariza
e75e7224c9
include curve control points in extents
...
this makes results consistent with FT
also optimized handling of path end points
2018-09-17 15:34:39 -07:00
Michiharu Ariza
98b94f8ba5
fix static_assert failure in OffsetTo<TopDict>
2018-09-17 13:56:39 -07:00
Michiharu Ariza
d050ab8d3e
Merge branch 'master' into cff-subset
2018-09-17 13:07:29 -07:00
Michiharu Ariza
f0a4e0c2ca
fix build attempt ^3
2018-09-17 12:11:56 -07:00
Michiharu Ariza
f0d74971ae
fix attempt ^2: unuse INT32_MAX/MIN
2018-09-17 12:02:12 -07:00
Michiharu Ariza
4d963a2711
fix build attempt
2018-09-17 11:28:33 -07:00
Behdad Esfahbod
388ab91642
[morx] Implement InsertionChain
2018-09-17 20:28:32 +02:00
Michiharu Ariza
c0c85b852d
implemented get_glyph_extents with CFF1
...
Implemented path operators in a new struct PathProc hooked up to CSOpSet
Added current point to CSInterpEnv
2018-09-17 11:14:56 -07:00
David Corbett
d8d1e7df00
Don't enforce a native direction for Old Hungarian
2018-09-17 18:53:25 +02:00
Behdad Esfahbod
606bf57430
Revert forcing use of single-parameter static_assert()
...
Some clang versions define static_assert as a macro apparently, so we cannot
redefine it...
This reverts commit 94bfea0ce6
.
This reverts commit 4e62627831
.
2018-09-16 19:34:39 +02:00
Behdad Esfahbod
cbcaba6ffd
One more bot fix
2018-09-16 19:25:19 +02:00
Behdad Esfahbod
89dd4b9597
Fix bots
...
"Unused private member" warning turned error. ugh.
2018-09-16 18:11:46 +02:00
Behdad Esfahbod
4e62627831
Enforce single-param static_assert() only
...
So we don't accidentally break it again.
2018-09-16 18:09:36 +02:00
Behdad Esfahbod
f1a86e1e6f
Remove unused try
2018-09-16 18:01:32 +02:00
Behdad Esfahbod
ebd50b3c83
Fix static_assert
2018-09-16 17:57:12 +02:00
Behdad Esfahbod
10642b3fbf
Disallow null-enabled offsets to unsized structures...
...
...like UnsizedArrayOf<>.
This fixes a class of crasher bugs, mostly with color and AAT tables. We
cannot use nullable offsets to varsized data that does not declare min_size,
because it's nost safe to use our fixed-size null pool for types that have
their size external. So, use non_null'able offsets for these.
A further enhancement would be to make use of min_size in Null<> itself.
Will try that after.
2018-09-15 19:43:33 +02:00
Behdad Esfahbod
9ff76c6025
[morx] Respect default feature settings
...
Does NOT apply user-selected features. But at least now enables
correct subtables.
2018-09-15 18:31:14 +02:00
Behdad Esfahbod
2f97da6e2d
[aat] Change version field
2018-09-15 14:51:50 +02:00
Behdad Esfahbod
29c2bd1795
[morx] Add stub for InsertionChain
2018-09-15 14:47:18 +02:00
Behdad Esfahbod
f8ccb545c4
[dfont] Disable null-processsing for offsets
...
An offset to unsized arrayis not safe to be redirected to our fixed-sized
null pool. Plus, we want to reject, not repair, bad-looking dfonts.
2018-09-14 18:59:53 +02:00
Behdad Esfahbod
01b9148d9a
[unicode] Move Fitzpatrick hack from ot-layout into unicode.hh
2018-09-14 14:23:09 +02:00
Behdad Esfahbod
6ebbf514ac
Minor
2018-09-14 12:15:53 +02:00
Behdad Esfahbod
957dbed388
Fix builds
2018-09-14 12:14:42 +02:00
Behdad Esfahbod
4653e6cf3c
[aat] Add enums for pre-defined state and classes
...
Not sure how I didn't add before...
2018-09-14 11:31:33 +02:00
Behdad Esfahbod
67449c3933
Don't dereference offset before check_struct()
2018-09-14 10:58:00 +02:00
Michiharu Ariza
f2c4720ae6
Merge branch 'master' into cff-subset
2018-09-13 12:44:00 -07:00
Behdad Esfahbod
ca746f261e
[dfont] Also check dataLen range in sanitize
...
Just to disagree with myself re being done with this code...
2018-09-13 20:35:21 +02:00
Behdad Esfahbod
3789c557ca
[dfont] Solve the mystery +2 offset thing!
...
Previously, ResourceForkHeader was defined as 30 bytes, having the typeCountM1 as last member.
There was a mysterious offset-by-2 in the code, derived from FontTools and JDK code this was
ported from.
In testing, I observed that typeListZ offset is actually 28. Suggesting that the typeCountM1
does NOT actually belong to ResourceForkHeader, but belongs to the array itself. Adjusting for
that resolves the mystery +2 offset hack, so everything is clean and good now.
This, concludes my dfont hacking. The code looks great now, and I'm happy to leave it.
Fuzzers might disagree though, we will see!
2018-09-13 20:32:13 +02:00
Behdad Esfahbod
effc7ced72
Rename HeadlessArrayOf::len to lenP1
...
So it doesn't accidentally match our templates, etc.
2018-09-13 20:21:54 +02:00
Michiharu Ariza
1234a81368
add head table to CFF/CFF2
2018-09-13 10:55:56 -07:00
Behdad Esfahbod
180a88a96c
[dfont] Some more
2018-09-13 19:26:44 +02:00
Behdad Esfahbod
0ab0f1e5ac
[dfont] Push methods further down
2018-09-13 19:13:01 +02:00
Behdad Esfahbod
8c9bdcc1fe
[dfont] Minor
2018-09-13 19:08:22 +02:00
Behdad Esfahbod
4479d3a2ed
[dfon]t Sanitize OpenTypeFontFace
2018-09-13 19:06:50 +02:00
Behdad Esfahbod
3fba41906f
[dfont] Minor
2018-09-13 18:49:16 +02:00
Behdad Esfahbod
bf852f0e62
[dfont] Make test pass
...
Offset 0 is not null in this context.
2018-09-13 18:47:53 +02:00
Behdad Esfahbod
29faebe911
Allow Offset<>'s that have no 0==null
2018-09-13 18:47:25 +02:00
Behdad Esfahbod
82f4d776c2
[dfont] Minor
2018-09-13 18:27:20 +02:00
Behdad Esfahbod
07e0ca930c
[bytes] Rename content to arrayZ
2018-09-13 17:39:51 +02:00
Behdad Esfahbod
dbb764dceb
[dfont] Clean up sanitize()
...
I don't think I broke anything. Fuzzers will let me know..
2018-09-13 17:21:00 +02:00
Behdad Esfahbod
361fc26861
Fix OffsetTo::sanitize() after reshuffling
2018-09-13 16:47:33 +02:00
Behdad Esfahbod
4c6b0fb5f6
OffsetTo::sanitize() Add version with three user_data
2018-09-13 16:39:30 +02:00
Behdad Esfahbod
a73bea69c5
OffsetTo::sanitize() more shuffling
2018-09-13 16:31:31 +02:00
Behdad Esfahbod
b482e5231c
OffsetTo::sanitize() reshuffling
2018-09-13 16:29:49 +02:00
Michiharu Ariza
3cae9c7515
fixed hb_plan_subset_cff_fdselect
...
FDSelect3/4 sentinel size wasn't taken into account
2018-09-12 17:23:08 -07:00
Michiharu Ariza
0f159a38a6
fixed serialize_fdselect_3_4
2018-09-12 16:08:54 -07:00
Michiharu Ariza
1608481d88
fixed bugs in Charset serialization
...
also some code cleanup
2018-09-12 13:22:19 -07:00
Michiharu Ariza
f45ac6296a
fixed name mixup in Remap::reset
...
it was causing inconsistent Strings Index subset results
2018-09-11 22:41:50 -07:00
Michiharu Ariza
497e7fb264
misc bug fixes
...
Added OpCode_FontMatrix to TopDictOpSet (yet to parse values)
fixed a wrong assert in encode_int
2018-09-11 16:47:55 -07:00
Michiharu Ariza
5b453f77f8
fixed off-by-one error with offSize
2018-09-11 16:20:39 -07:00
Michiharu Ariza
1499029a96
fixed a bug
2018-09-11 13:56:52 -07:00
Michiharu Ariza
0bd5912a08
make parse_bcd locale free
2018-09-11 13:24:27 -07:00
Michiharu Ariza
bb38d0f663
Implement parse_bcd
2018-09-11 10:43:15 -07:00
Michiharu Ariza
45e564a519
Merge branch 'master' into cff-subset
2018-09-11 09:46:37 -07:00
Behdad Esfahbod
bd75fd45cd
[dfont] Some renaming, plus add link to reference doc
2018-09-11 18:32:25 +02:00
Behdad Esfahbod
4134ec1307
[dfont] Sanitize only sfnt resources as OpenTypeFontFile
2018-09-11 17:56:03 +02:00
Behdad Esfahbod
6b5e4d07ad
[dfont] Minor
2018-09-11 17:26:24 +02:00
Behdad Esfahbod
d5c509272f
[dfont] Fix test expecatation and minor touch up
...
I have no way to authoritatively know, but looks like test font only has one
face. So, adjust test expectation instead.
2018-09-11 17:18:21 +02:00
Behdad Esfahbod
9479ffefbf
[dfont] Re-enable and fix offset handling
...
Fixes https://github.com/harfbuzz/harfbuzz/pull/1085
2018-09-11 16:41:26 +02:00
Behdad Esfahbod
a1814e2bec
Whitespace
2018-09-11 14:45:23 +02:00
Behdad Esfahbod
383060cc33
[ft] Invalidate advance cache if font size changed
2018-09-11 14:41:19 +02:00
Behdad Esfahbod
54998befc4
[ft] Cache advances
...
I decided to always use the cache, instead of my previous sketch direction
that was to only allocate and use cache if fast advances are not available.
The cache is a mere 1kb, so just use it...
TODO: Invalidate cache on font size change.
Fixes https://github.com/harfbuzz/harfbuzz/issues/651
Fixes https://github.com/harfbuzz/harfbuzz/pull/1082
2018-09-11 14:36:14 +02:00
Behdad Esfahbod
047a84c5dd
[ft] Towards caching slow get_h_advance results
...
Related to https://github.com/harfbuzz/harfbuzz/pull/1082
2018-09-11 14:05:16 +02:00
Behdad Esfahbod
237f215378
[ft] Add advances() callback
2018-09-11 13:05:47 +02:00
Behdad Esfahbod
cbea7d49ab
[ot-font] Rename
2018-09-11 12:57:41 +02:00
Behdad Esfahbod
d8a67dac2a
[ot-font] Add advances() callbacks
2018-09-11 12:55:54 +02:00
Behdad Esfahbod
0ea42e117b
[cache] Minor
2018-09-11 12:22:42 +02:00
Behdad Esfahbod
0f520adaac
Revert "Remove unused hb_cache_t"
...
This reverts commit 473b17af4d
.
Updates to recent changes.
2018-09-11 12:07:39 +02:00
Behdad Esfahbod
cfdea88475
[random] Switch to 32bit RNG
2018-09-11 10:57:48 +02:00
Behdad Esfahbod
08260c708a
[random] Shuffle
2018-09-11 10:51:19 +02:00
Behdad Esfahbod
71c9f84e7c
Make --features rand=1 available to the user
...
Use rand=255 to mean "randomize".
Part of https://github.com/harfbuzz/harfbuzz/pull/803
2018-09-11 10:47:59 +02:00
Behdad Esfahbod
cc1c4fdf88
Respect user's wish if they set rand feature manually
...
Except if the set it to 1, which would mean "randomize"... Ugly.
2018-09-11 10:47:59 +02:00
Behdad Esfahbod
80de4bcd26
Minor clean up of 'rand' patchset
2018-09-11 10:47:59 +02:00
David Corbett
b545e27d88
Don't seed the RNG from the contents of the buffer
2018-09-11 10:47:59 +02:00
David Corbett
f05df643b4
Allow requesting a specific glyph for 'rand'
...
Randomization only happens by default. If the user specifies a value for
'rand', that value is respected.
2018-09-11 10:47:59 +02:00
David Corbett
c2a75e07e5
Implement 'rand'
2018-09-11 10:47:59 +02:00
Michiharu Ariza
c6f75c3049
fix build attempt
2018-09-10 17:02:31 -07:00
Behdad Esfahbod
96471fe859
[uniscribe] Fix build
2018-09-11 01:39:23 +02:00
Michiharu Ariza
cc52e53cf0
Removed unused subr subset code
2018-09-10 16:27:49 -07:00
Behdad Esfahbod
becd84aa2f
Add HB_FEATURE_GLOBAL_START/END
...
Fixes https://github.com/harfbuzz/harfbuzz/issues/1141
New API:
HB_FEATURE_GLOBAL_START
HB_FEATURE_GLOBAL_END
2018-09-11 01:27:25 +02:00
Behdad Esfahbod
13a8786c7c
Add (unused) hb_array_t<>
2018-09-11 01:09:07 +02:00
Behdad Esfahbod
bccf3e1827
Minor
2018-09-11 01:04:50 +02:00
Behdad Esfahbod
dff2c45f1e
Port rest from VAR to UnsizedArrayOf<>
2018-09-11 01:01:08 +02:00
Michiharu Ariza
1666b89e30
subset CFF1 String Index
...
Repurposed FDMap as Remap then subclassed for remapping SIDs
misc code cleanup
2018-09-10 16:00:20 -07:00
Behdad Esfahbod
9507b05a7a
Simplify sanitize->check_array()
...
Fix a bug in CBDT sanitize, and redundant check in avar.
2018-09-10 23:18:23 +02:00
Behdad Esfahbod
bc485a9812
Port some VAR arrays to UnsizedArrayOf<>
...
Fix avar sanitize().
2018-09-10 23:08:18 +02:00
Behdad Esfahbod
1bc7a8d6c4
[indic] Cache hb_options().uniscribe_bug_compatible on indic_plan
2018-09-10 22:51:26 +02:00
Behdad Esfahbod
24f1d96224
Unbreak HB_OPTIONS
...
Fixes https://github.com/harfbuzz/harfbuzz/issues/1154
2018-09-10 18:19:37 +02:00
Behdad Esfahbod
e46c51f1e9
[indic] Do NOT allow matra after Halant,ZWJ
...
Fixes https://github.com/harfbuzz/harfbuzz/issues/556
Devanagari regresses 12 tests, and Gujarati 2. See:
https://github.com/harfbuzz/harfbuzz/issues/556#issuecomment-419957472
New numbers:
BENGALI: 353725 out of 354188 tests passed. 463 failed (0.130722%)
DEVANAGARI: 707299 out of 707394 tests passed. 95 failed (0.0134296%)
GUJARATI: 366353 out of 366457 tests passed. 104 failed (0.0283799%)
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%)
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-09-10 17:38:19 +02:00
Behdad Esfahbod
5dfd6e0762
Fix sanitize or Context Rule
...
Fixes https://github.com/harfbuzz/harfbuzz/issues/1110
2018-09-10 15:45:32 +02:00
Behdad Esfahbod
20a11a824d
Revert "[subset] Disable GSUB/GPOS subsetting for now"
...
This reverts commit 616fd34a69
.
2018-09-10 13:56:28 +02:00
Behdad Esfahbod
54d332dd9b
1.9.0
2018-09-10 11:37:24 +02:00
Behdad Esfahbod
616fd34a69
[subset] Disable GSUB/GPOS subsetting for now
...
So I can get a release out. I haven't debugged those yet, and they
are producing bad tables.
2018-09-10 11:19:49 +02:00
Behdad Esfahbod
d42f0e5809
[atomic] Fix pointer type passed to InterlockedExchangeAdd()
...
John Emmas reported on mailing list that build with MSVC is failing.
Not sure why bots don't catch it, but this should fix.
2018-09-10 11:05:33 +02:00
Behdad Esfahbod
fda994e1d4
Use enum instead of "static const" in class scope
...
Technically, static const needs an out-of-class definition. Eg:
CXXLD libharfbuzz-subset.la
Undefined symbols for architecture x86_64:
"OT::FeatureVariationRecord::min_size", referenced from:
bool OT::GSUBGPOS::subset<OT::PosLookup>(hb_subset_context_t*) constin libharfbuzz_subset_la-hb-subset.o
bool OT::GSUBGPOS::subset<OT::SubstLookup>(hb_subset_context_t*) constin libharfbuzz_subset_la-hb-subset.o
"OT::Record<OT::LangSys>::min_size", referenced from:
OT::Script::subset(hb_subset_context_t*) constin libharfbuzz_subset_la-hb-subset.o
"OT::IntType<unsigned short, 2u>::min_size", referenced from:
OT::Script::subset(hb_subset_context_t*) constin libharfbuzz_subset_la-hb-subset.o
OT::RecordListOf<OT::Feature>::subset(hb_subset_context_t*) const in libharfbuzz_subset_la-hb-subset.o
ld: symbol(s) not found for architecture x86_64
collect2: ld returned 1 exit status
make[4]: *** [libharfbuzz-subset.la] Error 1
make[3]: *** [all-recursive] Error 1
make[2]: *** [all] Error 2
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2
Exited with code 2
2018-09-07 15:02:57 -04:00
Michiharu Ariza
1e88b1755c
Merge branch 'master' into cff-subset
2018-09-07 10:50:55 -07:00
Behdad Esfahbod
ebe67137ab
Try fixing bots
2018-09-07 10:46:13 -04:00
Behdad Esfahbod
5f17dbc302
[subset] Fix div-by-zero
2018-09-07 10:24:22 -04:00
Michiharu Ariza
22b88632d5
Merge branch 'master' into cff-subset
2018-09-06 22:27:44 -07:00
Michiharu Ariza
2a74536aae
fix build attempt ^2
...
Added hb-ot-cff1-table.cc to hb-subset sources
Deleted unused variable (charset)
2018-09-06 18:26:13 -07:00
Michiharu Ariza
55268df9d4
fix build attempt
...
Added HB_INTERNAL to static funtion declarations
2018-09-06 17:56:05 -07:00
Michiharu Ariza
aca73c9df2
subset CFF1 Encoding & Charset
...
fixed misc Charset bugs
added source file hb-ot-cff1.table.cc
renamed things for clarity & consistency
2018-09-06 17:28:15 -07:00
Garret Rieger
21bf147054
[subset] Fix hdmx subsetted size calculation.
2018-09-05 19:31:55 -07:00
Behdad Esfahbod
1e6599f596
Fix older compilers re '>>' at nested template declarations
2018-09-05 19:29:42 -07:00
Behdad Esfahbod
a1e5e07c73
[subset] Hook up GSUB/GPOS, but still disabled
...
They are still in the drop list.
2018-09-05 16:24:28 -07:00
Behdad Esfahbod
0d160d5ff5
[subset] Implement subsetting of SingleSubst
2018-09-04 14:20:35 -07:00
Michiharu Ariza
5ea03d2951
fix build by untemplatizing DictOpSet & DictVal
...
as they aren't instantiated with BlendArg (yet)
2018-09-04 11:29:15 -07:00
Michiharu Ariza
f2d299b0b7
Drop hints from CFF2 charstrings
...
Templatized ArgStack so it may store the default value along with blend deltas as BlendArg while parsing blend operator arguments in CFF2 charstring
Added get_region_count() method to VarRegionList & VariationStore
2018-09-04 10:25:21 -07:00
Behdad Esfahbod
3f00d0b0df
[subset] Keep glyph set in plan
...
Should remove the vector version at some point...
2018-09-03 18:54:32 -07:00
Behdad Esfahbod
dc50493a8d
[subset] Towards subsetting SingleSubstFormat1
...
Why does subset plan not have a hb_set_t of glyphs?
2018-09-03 18:23:23 -07:00
Behdad Esfahbod
339d3603b9
[subset] Wire up subset() call down to subtables
2018-09-03 17:40:16 -07:00
Behdad Esfahbod
7b2ef551da
Templatize Lookup::sanitize()
2018-09-03 17:16:09 -07:00
Behdad Esfahbod
9c3747c5e5
[subset] More
2018-09-03 16:53:03 -07:00
Behdad Esfahbod
6d618522d6
Templatize GSUBGPOS::sanitize()
2018-09-03 16:41:28 -07:00
Behdad Esfahbod
49c44b58f6
[subset] Fix serialize_subset() calls
...
Ouch.
2018-09-03 16:37:17 -07:00
Behdad Esfahbod
7c9cfa2b40
Add intersects() method to GSUB/GPOS lookups
2018-09-02 19:47:50 -07:00
Behdad Esfahbod
61ce62e554
[subset] Minor
...
Remove Lookup::subset().
2018-09-02 17:00:39 -07:00
Behdad Esfahbod
bfa72a9a72
[subset] Towards GSUB/GPOS subsetting
...
Add subset() call for GSUBGPOS struct and its dependencies.
Not hooked up anywhere.
2018-09-01 18:34:50 -07:00
Behdad Esfahbod
6803ed8674
[serialize] Add reset()
2018-08-31 17:11:08 -07:00
Behdad Esfahbod
e58b190292
[subset] De-templatize hb_subset_context_t
...
We're going to (finally) use virtual methods for hb_serialize_context_t
customization, so don't need to carry a Serializer template variable
around... Simplifies code.
2018-08-31 16:46:35 -07:00
Behdad Esfahbod
22acd424ca
[serialize] Add a couple small methods
2018-08-31 16:41:18 -07:00
Behdad Esfahbod
d1f29908c2
[subset] Add hb_subset_context_t<>
2018-08-31 16:31:00 -07:00
Michiharu Ariza
fcf177885b
templatized ArgStack as a prep to store blends
2018-08-31 16:28:47 -07:00
Michiharu Ariza
968168bf0e
drop hints from CFF1 charstrings
...
renamed confusing Stack.size to Stack.count
2018-08-31 13:28:16 -07:00
Behdad Esfahbod
aba0a945c5
[subset] Add hb-subset-input.hh and make hb-subset.hh toplevel include
2018-08-31 13:25:19 -07:00
Behdad Esfahbod
18d01eac7f
Minor
2018-08-31 13:00:57 -07:00
Michiharu Ariza
8c5e03b541
Added drop_hints to SubrFlattener
2018-08-30 17:21:56 -07:00
Behdad Esfahbod
a23b892fe6
Shuffle
2018-08-29 18:28:39 -07:00
Behdad Esfahbod
93fe0faaee
[subset] Clean up hb_subset_input_t API
2018-08-29 18:24:03 -07:00
Michiharu Ariza
9fd08cc238
CFF2 subroutine flattner
...
Factored out CFF1 & CFF2 common subsetting code in hb-subset-cff-common.hh
2018-08-29 18:18:18 -07:00
Behdad Esfahbod
d237ce7181
[subset] Bail if subsetting a table failed
2018-08-29 18:13:52 -07:00
Behdad Esfahbod
f39166f0c0
[subset] Remove unused hb_subset_profile_t
...
We might reintroduce it later, but for now remove, as it was unused.
Some things that should have been in this object (drop_hints, etc)
are already in hb_subset_input_t. So, for now, keep everything there.
2018-08-29 18:09:55 -07:00
Behdad Esfahbod
2ccc322cf8
[ot-font] Clean up cmap with gid=0
...
Fixes https://github.com/harfbuzz/harfbuzz/issues/1145
2018-08-29 16:38:25 -07:00
Michiharu Ariza
b95bf075d7
fix build attempt ^2
2018-08-29 14:41:52 -07:00
Michiharu Ariza
1d1afddfd2
corrected preprocessor guards
2018-08-29 13:36:39 -07:00
Michiharu Ariza
8af9690ac7
Merge branch 'master' into cff-subset
...
Renamed cff "private" source/headers without the suffix
2018-08-29 13:26:17 -07:00
Michiharu Ariza
0ad081ec32
attempt to fix build failure
2018-08-29 12:56:48 -07:00
Michiharu Ariza
a11420b48c
Subroutine flattener for CFF1
...
Subr-flattened charstrings are temporarily re-encoded in ByteStrBuff during "plan" phase, then copied to hb_serialize_context_t during "write" phase
CSOpSet may callback opcode processing "virtual" functions via CRTP
Numer struct may store a value as fixed optionally in addition to int and float
2018-08-29 12:14:30 -07:00
Behdad Esfahbod
fee0f41c6c
Don't declare extern symbols as inline
...
clang -O3 was completely removing _get_gdef(), causing link
failure when needed from another compilation unit. Surprisingly,
"extern inline" didn't fix it.
2018-08-28 18:27:41 -07:00
Behdad Esfahbod
967741e4c4
Add explicit to hb_auto_t 1param constructors
2018-08-28 18:18:02 -07:00
Behdad Esfahbod
c0a3f38f78
Fix distcheck
2018-08-28 17:22:59 -07:00
Behdad Esfahbod
2dde6c803a
Explicitly pass reference in hb_auto_t constructor
...
Fixes clang bots as well as fuzzer issue.
2018-08-28 11:07:24 -07:00
Behdad Esfahbod
a268068010
[ot-face] Remove tables_t. The face_data_t is what tables_t was
2018-08-26 15:18:46 -07:00
Behdad Esfahbod
3a0b3a29cc
Free up hb-ot-face.hh from includes
...
There might be a better way to do this, but I couldn't find...
2018-08-26 15:11:24 -07:00
Behdad Esfahbod
a84309afc8
[face] Use saved cmap in collect_unicodes() APIs
2018-08-26 09:33:01 -07:00
Behdad Esfahbod
c624e18a24
[OT] Move code around
2018-08-26 09:19:20 -07:00
Behdad Esfahbod
3999094682
[OT] Use relaxed ops for recursing into GSUB/GPOS lookups again
2018-08-26 09:12:25 -07:00
Behdad Esfahbod
d8c57e85d9
[GDEF] Move code around
2018-08-26 09:04:34 -07:00
Behdad Esfahbod
453e0c60b1
Add template keyword
...
I swear I have no idea why this is needed, but it is...
2018-08-26 01:30:52 -07:00
Behdad Esfahbod
c44b0caf0d
Fixup
2018-08-26 01:29:30 -07:00
Behdad Esfahbod
4096fbe487
[ot-face] Port GDEF to unified table accelerator model as well
2018-08-26 01:25:54 -07:00
Behdad Esfahbod
b929100f87
[ot-face] Unify GSUB/GPOS accelerators in the table accelerator framework
2018-08-26 01:15:47 -07:00
Behdad Esfahbod
963413fc54
WIP
2018-08-26 00:47:55 -07:00
Behdad Esfahbod
e6cb938065
[ot-face] Unify accelerators and tables
2018-08-26 00:21:29 -07:00
Behdad Esfahbod
7f8b6fe67d
Minor
2018-08-26 00:07:12 -07:00
Behdad Esfahbod
59bca0d2cb
[ot-font] Rename
2018-08-26 00:06:12 -07:00
Behdad Esfahbod
1c48a7ef06
[ot-font] Cache tables on face, not font
2018-08-25 23:57:16 -07:00
Behdad Esfahbod
71f8893eff
[ot-font] Use init0
2018-08-25 23:27:45 -07:00
Behdad Esfahbod
f36ae6f8a8
[ot-font] Make everything (cmap/metrics) lazy
2018-08-25 23:26:45 -07:00
Behdad Esfahbod
62fc54725a
[ot-font] Fallback vertical advance to UPEM
...
Used to be ascent+descent. Whatever. This is more convenient for
upcoming changes.
2018-08-25 23:15:52 -07:00
Behdad Esfahbod
d950022c8a
Add hb-ot-face.cc/hh
2018-08-25 23:06:37 -07:00
Behdad Esfahbod
dae39c58fb
[face] Introduce character-map API
...
New API:
+hb_face_collect_unicodes
+hb_face_collect_variation_selectors
+hb_face_collect_variation_unicodes
2018-08-25 22:44:39 -07:00
Behdad Esfahbod
66384db97c
Minor
2018-08-25 22:39:17 -07:00
Behdad Esfahbod
c77ae40852
Rename hb-*private.hh to hb-*.hh
...
Sorry for the noise, downstream custom builders. Please adjust.
2018-08-25 22:36:36 -07:00
Behdad Esfahbod
82b12bcadd
[unicode] Add HB_UNICODE_MAX
...
New API:
HB_UNICODE_MAX
2018-08-25 22:07:17 -07:00
Behdad Esfahbod
b09a0336ca
[cmap] More hb_auto_t<>(...)
2018-08-25 22:04:39 -07:00
Behdad Esfahbod
28634db07e
[cmap] Fix skipping gid0 in Format4 collect_unicodes()
2018-08-25 21:23:43 -07:00
Behdad Esfahbod
acce1fa3ea
Use new hb_auto_t<> constructor with Coverage::Iter
2018-08-25 21:15:39 -07:00
Behdad Esfahbod
ddea4d19cf
Add 1-param passthrough constructor to hb_auto_t<>
...
And use.
2018-08-25 21:08:15 -07:00
Behdad Esfahbod
c8cfb702e9
[cmap] Minor
2018-08-25 16:18:00 -07:00
Behdad Esfahbod
1dcf5fb038
[cmap Add hb_subset_collect_variation_unicodes()
...
To be moved to hb-face.h later.
2018-08-25 16:12:18 -07:00
Behdad Esfahbod
4806b3800d
[cmap] Add hb_subset_collect_variation_selectors()
...
To be moved to hb-face later.
2018-08-25 15:58:40 -07:00
Behdad Esfahbod
3336de2479
[cmap] Remove unused code
2018-08-25 15:41:25 -07:00
Behdad Esfahbod
1becabe06c
[cmap] Use bsearch to find subtables
2018-08-25 15:37:56 -07:00
Behdad Esfahbod
02fe03e09a
[cmap] Factor out find_best_subtable
2018-08-25 15:33:05 -07:00
Behdad Esfahbod
b41c43b4e1
Minor
2018-08-25 15:25:03 -07:00
Behdad Esfahbod
7d382fa276
[cmap] Implement collect_unicodes() for Format0/6/10
2018-08-25 09:42:52 -07:00
Behdad Esfahbod
bd0e542525
[cmap] Simplify collect_unicodes()
...
Don't use accelerator (almost). Hooks up Format13 as well.
2018-08-25 09:33:30 -07:00
Behdad Esfahbod
d60c465627
Rename get_all_codepoints() to collect_unicodes()
2018-08-25 08:48:42 -07:00
Behdad Esfahbod
531051b8b9
[ot-font] Return char-not-found if mapped to gid 0
...
OpenType cmap table can use gid=0 to mean "not covered" to produce
more optimized cmap subtables. Return false from get_nominal_glyph()
for those. hb-ft already does this.
2018-08-25 08:44:18 -07:00
Behdad Esfahbod
aadb2a9188
Add face-builder
...
New API:
+hb_face_builder_create
+hb_face_builder_add_table
2018-08-25 08:18:53 -07:00
Behdad Esfahbod
6cac9dc9cc
[blob] Add as_bytes()
2018-08-24 10:29:45 -07:00
Behdad Esfahbod
29a9a08838
[sanitize] Document how sanitize machinery works
2018-08-24 10:24:45 -07:00
Behdad Esfahbod
142ac5a6be
[serialize] Add copy_bytes() and copy_blob()
2018-08-24 10:07:49 -07:00
Behdad Esfahbod
1c6b369324
[ot] Rename hb_ot_layout_t to hb_ot_face_data_t
2018-08-23 11:30:21 -07:00
Michiharu Ariza
27c32d8afb
fixed "Fixed" number decoding
2018-08-22 11:36:39 -07:00
Michiharu Ariza
811a651bbd
fixed bugs with empty CFFIndex, fullset FDMap
2018-08-20 14:04:46 -07:00
Michiharu Ariza
5cde2f55cd
drop hints from CFF & CFF2 Private
2018-08-17 16:50:13 -07:00
Michiharu Ariza
cef75ea41a
Added CFF2 Subr nullifier
...
along with CFF2 charstring interpreter
factored out common code between CFF1 & CFF2 to CSInterpreter
moved fetch_op from Interpreter to InterpEnv
misc code clean up & bug fixes
2018-08-17 13:13:18 -07:00
Michiharu Ariza
f57d6bcbca
renamed CFF::Index to CFF::CFFIndex
...
to avoid confusion with OT::Index
2018-08-16 08:03:46 -07:00
Michiharu Ariza
c4ae426a3d
treat h/vstem the same as h/vstemhm
2018-08-16 00:59:46 -07:00
Michiharu Ariza
e67bb3fbcf
renamed OT::cff to OT::cff1 for consistency
...
along with HB_OT_TAG_cff1
2018-08-16 00:25:57 -07:00
Michiharu Ariza
fdbfa1848b
renamed CFF version 1 structs and sources to CFF1 from CFF
...
"CFF" is used for shared structs & sources between CFF1 & CFF2
except OT:cff is for CFF version 1 table
2018-08-16 00:13:09 -07:00
Michiharu Ariza
867f68bd8a
fix build attempt ^7
2018-08-15 15:53:50 -07:00
Michiharu Ariza
685db67bb0
fix build attempt ^6
2018-08-15 15:45:17 -07:00
Michiharu Ariza
2810caafeb
fix build attempt ^5
2018-08-15 15:30:24 -07:00
Michiharu Ariza
25b8310b2a
Merge branch 'master' into cff-subset
2018-08-15 15:00:55 -07:00
Michiharu Ariza
7aa23f3597
fix build attempt ^4
2018-08-15 15:00:32 -07:00
Michiharu Ariza
270452a446
fix build attempt ^3
2018-08-15 13:15:08 -07:00
Michiharu Ariza
c234839f25
fix build attempt ^2
2018-08-15 13:04:43 -07:00
Michiharu Ariza
eab07e713a
fix build
2018-08-15 12:15:55 -07:00
Michiharu Ariza
633ce88de9
CFF Subrs subsetting
...
Unreferenced subroutines are nullified (not removed) in a subset font
Separate Interpreter struct from hb-ot-cff-common-private.hh in a set of four header files, augmented for CharString (CS):
hb-cff-interp-common-private.hh
hb-cff-interp-dict-common-private.hh
hb-cff-interp-cs-common-private.hh
hb-cff-interp-cs.hh
Interpreter runtime is separated off as a new struct InterpEnv sub-classed differently for Dict and CharString (CS)
2018-08-15 12:00:19 -07:00
Emil A Eklund
22defe0965
Add guard around free_static_C_locale
...
Add HB_USE_ATEXIT guard around free_static_C_locale missed by previous
commit.
2018-08-14 18:10:17 -07:00
Emil A Eklund
7112c6413c
Guard free_static function definitions with macro
...
Add HB_USE_ATEXIT macros around free_static function definitions to
avoid unused function compiler warnings/errors.
2018-08-14 14:04:10 -07:00
Behdad Esfahbod
63be5dcdde
1.8.8
2018-08-14 10:59:34 -07:00
Behdad Esfahbod
c9a22fa124
[icu] Pass normalizer instance down as user_data
2018-08-13 17:02:21 -07:00
Behdad Esfahbod
f0ef096b8c
Don't add reference in get_unicode_funcs() functions
...
Users don't expect a new reference returned from a get() function.
Indeed, all users of that API I foud where NOT destroying the reference.
Just change the implementations to NOT return a reference.
This applies to the following APIs:
hb_unicode_funcs_get_default()
hb_glib_get_unicode_funcs()
hb_icu_get_unicode_funcs()
Fixes https://github.com/harfbuzz/harfbuzz/issues/1134
2018-08-13 10:30:41 -07:00
Behdad Esfahbod
9bbd1cdf06
[uniscribe] Use lazy loader
...
Fixes https://github.com/harfbuzz/harfbuzz/issues/1129
2018-08-12 18:20:53 -07:00
Behdad Esfahbod
2663689936
Another clang bot fix
2018-08-12 18:10:59 -07:00
Behdad Esfahbod
989e71a982
Silence clang
2018-08-12 17:47:59 -07:00
Behdad Esfahbod
6750ec692c
[lazy] Use for C_locale
2018-08-12 17:42:16 -07:00
Behdad Esfahbod
747d2564e6
[lazy] Port more
2018-08-12 17:32:10 -07:00
Behdad Esfahbod
7bd508a0c4
[lazy] Rename free()
2018-08-12 17:19:55 -07:00
Behdad Esfahbod
a3b97db910
[lazy] Port more to it
2018-08-12 17:14:32 -07:00
Behdad Esfahbod
6901090945
[lazy] Make hb_lazy_loader_t<> more usable
2018-08-12 16:59:37 -07:00
Behdad Esfahbod
bb905e9afc
[lazy] Minor
2018-08-12 16:44:44 -07:00
Behdad Esfahbod
3945cd78a9
Minor
2018-08-12 16:33:48 -07:00
Behdad Esfahbod
c21a1b95df
[icu] Use get_relaxed for normalizer access
...
We've had the proper barriers already. No need for more with every access.
2018-08-12 16:30:39 -07:00
Behdad Esfahbod
125fefa2a6
[icu] Fix for breakage after recent change
2018-08-12 16:29:41 -07:00
Behdad Esfahbod
53442be1ed
[lazy] Use for ft_library
2018-08-12 16:20:11 -07:00
Behdad Esfahbod
7a8d480378
[lazy] Add .free()
2018-08-12 16:00:13 -07:00
Behdad Esfahbod
c7ca30a533
[ot/ft] Port font_funcs statis to lazy-loader
2018-08-12 13:46:53 -07:00
Behdad Esfahbod
cb3fc3685c
[ucdn/glib/icu] Port unicode_funcs statics to lazy-loader
2018-08-12 13:39:01 -07:00
Behdad Esfahbod
1b6b481262
[lazy] Allow calling fini() multiple times
2018-08-12 13:16:40 -07:00
Behdad Esfahbod
918ad9f5d9
[lazy] More
2018-08-12 13:12:29 -07:00
Behdad Esfahbod
5abdf5eeba
[lazy] More shuffle
2018-08-12 12:48:44 -07:00
Behdad Esfahbod
5d9863be6e
Minor
2018-08-12 12:27:47 -07:00
Behdad Esfahbod
f9a3eab810
Add explicit_operator
...
Fixes https://github.com/harfbuzz/harfbuzz/issues/1127
2018-08-12 12:21:56 -07:00
Behdad Esfahbod
470acb6c32
Rename
2018-08-12 12:13:36 -07:00
Martin Hosken
39607dc98e
Support _ in feature ids
2018-08-11 16:55:16 -07:00
Michiharu Ariza
a3a8c85b02
Merge branch 'master' into cff-subset
2018-08-10 13:41:42 -07:00
Michiharu Ariza
145f371d71
fixed TRACE build failure
2018-08-10 13:07:53 -07:00
Michiharu Ariza
a97ed342d1
fixed inclusion of excluded Private & local Subrs
...
It was bloating a multi-FD subset font unnecessarily
defined a wrapper struct FDMap for fdmap
2018-08-10 12:55:22 -07:00
Michiharu Ariza
64c5412264
Added CFF support
...
Added sources hb-ot-cff-table.hh, hb-subset-cff.cc & hh
Templatized Index because CFF uses 16-bit count while CFF2 uses 32-bit
Misc code cleanup & bug fixes
2018-08-10 11:07:07 -07:00
Behdad Esfahbod
652cd45c65
[coretext] Another try
2018-08-09 01:02:02 -07:00
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