Qunxin Liu
36a5c042d7
[subset] Add "--name-languages" and "--name-legacy" options
...
Make name table subsetting consistent with fontTools
2020-01-24 23:17:04 +03:30
Ebrahim Byagowi
5532374f61
[ot-glyph] Add a test for #2053
2020-01-24 20:42:12 +03:30
Ebrahim Byagowi
e171beeb5f
Revert "[subset] Add "--name-languages" and "--name-legacy" options"
...
Causes tests failures, please reapply when tests are fixed, thanks.
This reverts commit fd85818b5b
.
2020-01-24 19:51:32 +03:30
Qunxin Liu
fd85818b5b
[subset] Add "--name-languages" and "--name-legacy" options
...
Make name table subsetting consistent with fontTools
2020-01-23 17:24:05 -08:00
Qunxin Liu
c370da45ff
[subset] Cmap table: remove encodingRecord entry for empty cmap4 subtable
2020-01-23 17:23:55 -08:00
ariza
acb4627eba
add api test
2020-01-23 10:50:52 -08:00
Ebrahim Byagowi
7633b7695e
Merge pull request #2016 from ebraminio/glyf
...
Implement glyph outline path API
2020-01-23 18:51:40 +03:30
Ebrahim Byagowi
02f324c949
[ot-glyph] remove open callback
...
Apparently it wasn't requested actually and can be detected easily
as paths are opened usually when move command is issued anyway.
2020-01-23 15:12:15 +03:30
Ebrahim Byagowi
684ff3e0cd
[ot-glyph] noop->nil, fix close path
2020-01-23 14:48:59 +03:30
ariza
72cbfb9059
remove empty lookup subtables
...
Added a variant of subset_offset_array which takes an extra arg passed to serialize_subset for this impl.
Added a new api test "test-subset-gpos" for this.
2020-01-21 16:53:19 -08:00
Qunxin Liu
e565d1f9bc
[subset] subset lookup/feature/script lists for GSUB/GPOS
2020-01-15 14:04:33 -08:00
ckitagawa
93376a6436
Add unittests
2020-01-15 13:36:01 -08:00
Ebrahim Byagowi
79fed9a1e4
[ot-glyph] Add open/close callbacks
2020-01-14 17:34:59 +03:30
Ebrahim Byagowi
ec1fba1388
[ot-glyph] make hb_ot_glyph_decompose_funcs_t struct opaque
2020-01-14 15:55:23 +03:30
Ebrahim Byagowi
d7c3cb18ee
[ot-glyph] minor on tests
2020-01-13 18:17:21 +03:30
Qunxin Liu
0b39c48064
[subset] closure lookups for GSUB/GPOS
2020-01-10 13:11:06 -08:00
Ebrahim Byagowi
42f4f1ea50
[ot-glyph] Add tests for hb_ot_glyph_decompose
2020-01-11 00:33:31 +03:30
Ebrahim Byagowi
06a1fcb3b4
[ot-glyphs] fix the tests
2020-01-10 23:12:30 +03:30
Ebrahim Byagowi
fddf79fc37
[glyf] minor
2020-01-10 14:25:07 +03:30
Qunxin Liu
1db2c1d0da
fix for cmap4 and OS_2 subsetting: maximum character code allowed is 0xFFFF
2020-01-09 10:00:32 -08:00
Ebrahim Byagowi
33c3d63a0a
Merge pull request #1594 from harfbuzz/var-subset
...
Issue 1558: [subset] TrueType/CFF2 variable font
2019-12-31 13:52:50 +03:30
blueshade7
ed94e41065
fixed api test test-ot-glyphname
2019-11-26 18:34:06 +00:00
blueshade7
7a4745ba8d
added api test test-ot-glyphname
2019-11-26 18:34:06 +00:00
blueshade7
ea8fdfa079
Merge branch 'master' into var-subset
2019-11-22 15:59:09 -08:00
Khaled Hosny
dd288840d6
[cmap] Check GID before adding ranges in format 4 & 12
...
Fixes https://github.com/harfbuzz/harfbuzz/issues/2031
2019-10-29 02:09:13 +02:00
Ebrahim Byagowi
453050ad30
Merge remote-tracking branch 'upstream/master' into var-subset
2019-10-13 08:45:29 +03:30
Ebrahim Byagowi
dc45f22521
[ot-metrics] Don't use mixed scaled and not scaled for generating extents
2019-10-08 23:27:39 +03:30
Ebrahim Byagowi
d73cdcf361
[ot-font] Apply font scaling before turning to int
2019-10-08 11:11:18 +03:30
Michiharu Ariza
b9ff43c162
Implement gvar table and variable glyf
...
Split from Ariza's "[subset] TrueType/CFF2 variable font" work on #1594
2019-10-06 08:58:40 +03:30
Ebrahim Byagowi
19d45dcab7
Merge remote-tracking branch 'upstream/master' into var-subset
2019-10-03 13:39:17 +03:30
Evgeniy Reizner
7d4da8b862
Remove duplicated tests from test-ot-tag ( #1958 )
2019-09-06 12:24:32 -04:00
Ebrahim Byagowi
9ff32b79b3
Merge remote-tracking branch 'upstream/master' into glyf-rebase
2019-08-29 19:53:18 +04:30
Ebrahim Byagowi
28620310b8
[test] Avoid alloca use as clang complain
...
Fixes https://circleci.com/gh/harfbuzz/harfbuzz/108171 complain
2019-08-29 14:55:54 +04:30
Ebrahim Byagowi
a0b4ac4dce
Turn 8 spaces to tab across the project
...
According to the current code style of the project
2019-08-27 02:40:41 +04:30
Behdad Esfahbod
163a66dc73
[test] Add test for aaa85931f3
2019-08-20 14:22:57 -07:00
Behdad Esfahbod
e56d4ff43b
Rename hb_ot_meta_get_entries() to +hb_ot_meta_get_entry_tags()
2019-08-13 21:02:47 -07:00
Qunxin Liu
37572882e7
[subset] cmap table to use _subset2 and new iterator frameworks
2019-08-05 11:26:34 -07:00
Michiharu Ariza
6b3e093911
Merge branch 'master' into var-subset
2019-07-31 16:04:48 -07:00
Ebrahim Byagowi
8c0a2e68ad
[fuzz] Add dummy call of the added APIs ( #1886 )
2019-07-30 13:16:15 +04:30
Ebrahim Byagowi
9f2b4956b4
[base] Add hb_ot_layout_get_baseline API
2019-07-30 04:42:51 +04:30
Ebrahim Byagowi
40a4b6ddbd
[var] Add a new API, hb_font_set_var_named_instance
2019-07-29 16:23:47 -07:00
Ebrahim Byagowi
b6a2281f1a
[meta] Make values match their enum type naming
2019-07-30 03:48:23 +04:30
Ebrahim Byagowi
20072a2eca
[metrics] Make values match their enum type naming
2019-07-30 03:48:23 +04:30
blueshade7
6e3bfecf35
Merge branch 'master' into var-subset
2019-07-29 12:25:43 -07:00
Ebrahim Byagowi
2c2a2b97db
[meta] Rename hb_ot_meta_t to hb_ot_meta_tag_t
2019-07-29 22:43:09 +04:30
Ebrahim Byagowi
62932c14bd
[meta] Rename ot-metadata to ot-meta per review
2019-07-25 17:49:51 -07:00
Ebrahim Byagowi
bc65ebbce7
[meta] hb_ot_metadata_get_entries, tags iteration API
2019-07-25 17:49:51 -07:00
Ebrahim Byagowi
3ac03bd67c
[meta] New API, hb_ot_metadata_reference_entry for fetching meta entries
2019-07-25 17:49:51 -07:00
Ebrahim Byagowi
356b68a00a
[metrics] Add a test that actually practices variation ( #1858 )
2019-07-25 23:22:00 +04:30
blueshade7
5988ab8a4e
Merge branch 'master' into var-subset
2019-07-22 14:36:16 -07:00
Khaled Hosny
04c11a19b7
Merge pull request #1851 from khaledhosny/fix-sbix-extents
...
Fix sbix glyph extents
2019-07-22 16:44:47 +02:00
Ebrahim Byagowi
a51aa951b5
[metrics] Fix _get_variation API to works with actual coord values
2019-07-22 18:35:55 +04:30
Khaled Hosny
c9796d15e1
Fix sbix glyph extents
...
* The ‘height’ needs to be negated since the API returns “distance from
top to bottom side”.
* Similarly, the ‘y_offset‘ needs to be added to the height to get the
‘y_bearing’, since sbix’s offset is “the point in the glyph relative
to its lower-left corner which corresponds to the origin” while
‘y_bearing’ is the “top side of glyph from origin”.
With these changes the sbix glyph metrics return values similar to other
tables, as they were otherwise unusable.
2019-07-22 05:42:34 +02:00
Ebrahim Byagowi
87e628436e
Implement a simple API for fetching opentype metrics
...
Fixes https://github.com/harfbuzz/harfbuzz/pull/1432
2019-07-18 14:15:58 -07:00
blueshade7
386a4a64f5
regenerate subset api test result SourceHanSans-Regular.41,4C2E.retaingids.otf
2019-07-12 17:05:34 -07:00
blueshade7
670768e5b9
fix inc-bimap for subsetting VarStore with retain-gids
2019-07-12 16:14:23 -07:00
blueshade7
8bf989ea70
update from master
2019-07-08 17:13:29 -07:00
Michiharu Ariza
5763a92749
Merge branch 'master' into var-subset
2019-07-01 15:17:19 -07:00
Behdad Esfahbod
f53590971c
[test] Make Unicode tests strict against internal UCD
...
https://github.com/harfbuzz/harfbuzz/pull/1799
2019-06-27 13:42:51 -07:00
David Corbett
d42264f151
Test at least one character per Unicode version
2019-06-27 13:38:03 -07:00
David Corbett
4f37c0db9b
Remove 'mym3'
2019-06-11 15:41:37 -07:00
Michiharu Ariza
4ddab6facc
Merge branch 'master' into var-subset
2019-06-05 11:21:27 -07:00
Behdad Esfahbod
87dd4bff1c
[math] Rename HB_MATH_GLYPH_PART_FLAG_EXTENDER
...
To HB_OT_MATH_GLYPH_PART_FLAG_EXTENDER. Added a deprecated macro.
Fixes https://github.com/harfbuzz/harfbuzz/issues/1734
2019-05-30 11:26:17 -04:00
Ebrahim Byagowi
8a13371847
[test] minor, fix copyright
...
nothing important, fixing a copy paste error inconsistency
2019-05-28 13:54:45 +04:30
rsheeter
96de94768b
Merge pull request #1722 from googlefonts/glyf
...
[subset] Use iterators in glyf/loca subsetting
2019-05-24 11:22:41 -07:00
Rod Sheeter
e662532833
[subset] Cppcheck complaints
2019-05-24 10:39:56 -07:00
Qunxin Liu
993d81b9c5
[subset] Add one ttf file with fvar/STAT tables to integration test
...
Ignore gvar/MVAR/HVAR table
add support for --nameIDs=* option
2019-05-22 17:20:45 -07:00
Rod Sheeter
51a0129f73
[subset] Thar be comparison of integers of different signs
2019-05-21 20:12:19 -07:00
Rod Sheeter
349d692b0e
[subset] Iter in and out for loca
2019-05-21 12:38:53 -07:00
Rod Sheeter
d1b12a5465
Merge branch 'master' of https://github.com/harfbuzz/harfbuzz into glyf
2019-05-20 21:29:54 -07:00
Rod Sheeter
5cedda5e4a
[subset] Fix null pointer deref, tidy up a bit
2019-05-20 21:25:42 -07:00
Rod Sheeter
8a84b540c7
[subset] Tests passing using iterator based glyf
2019-05-20 21:25:42 -07:00
Rod Sheeter
82bbec3063
Merge branch 'master' of https://github.com/harfbuzz/harfbuzz into glyf
2019-05-20 21:25:42 -07:00
rsheeter
3a4c928fcf
[subset] Fix glyf tests except hint stripping & local test asan
2019-05-20 21:25:42 -07:00
Garret Rieger
0ff3618c2d
[subset] Use hb_subset_input_t inside of subset_options_t so that input defaults are shared between the library and cli.
2019-05-20 13:35:46 -07:00
Garret Rieger
3be0ffe45d
[subset] Add drop tables to subset input.
2019-05-20 13:35:46 -07:00
Garret Rieger
6555f20958
[subset] Truncate empty gids at the end in retain-gids mode.
2019-05-16 10:34:53 -07:00
Behdad Esfahbod
f39934983f
[ucdn] Fix Hangul composition
...
https://github.com/grigorig/ucdn/issues/23
2019-05-14 00:13:21 -07:00
Behdad Esfahbod
148d883680
[test] Don't call deprecated API
2019-05-13 14:34:53 -07:00
Garret Rieger
e8ef0e627c
[subset] WIP convert hdmx subsetting to use iterators.
2019-05-08 15:47:24 -07:00
Behdad Esfahbod
5ac4ab6868
[subset] fix for name table serializing with new serializer machinery
2019-05-07 10:59:03 -07:00
Michiharu Ariza
1223a352b7
Merge branch 'master' into var-subset
2019-04-29 16:43:48 -07:00
Qunxin Liu
1ca4b5c770
[subset] Add unit test for str de-dup
...
Also move the implementation of some methods from the .cc to the .hh
2019-04-26 15:24:47 -07:00
Qunxin Liu
6faac8df83
[subset] Subsetting Name Table Step 4
...
Add unit test and integration test
2019-04-26 15:24:47 -07:00
Behdad Esfahbod
42f4bd6b80
Minor warning fix again
2019-04-18 19:06:07 -04:00
Michiharu Ariza
c87488b46d
Merge branch 'master' into var-subset
2019-04-17 12:07:15 -07:00
Michiharu Ariza
49fe81fdeb
updated api test results for HVAR/VVAR subset changes
2019-04-17 11:48:12 -07:00
David Corbett
6745a600bf
Comment out ot_languages where fallback suffices
2019-04-17 10:28:59 -04:00
Michiharu Ariza
3e524bf772
fix VarData serialize to remove unused data sets
...
add api test case for that
2019-04-12 12:48:48 -07:00
Michiharu Ariza
ab9d30965d
Add tt var metrics test cases & bug fixes
2019-04-10 17:21:37 -07:00
Michiharu Ariza
0008963b28
add support of anchor point & SCALED/UNSCALED_COMPONENT_OFFSET
...
some code cleanup
2019-03-29 18:27:21 -07:00
Michiharu Ariza
9c5d694af2
add HVAR & VVAR advance width api test
2019-03-29 18:27:21 -07:00
Michiharu Ariza
ae3db1f4e3
added api test for subset VVAR & bug fix
...
added a mod copy of SourceSerifVariable-Roman.ttf with VVAR as a test font
2019-03-29 18:27:08 -07:00
Michiharu Ariza
fe5aa8b36c
added TT VF full font test & fixed bugs
...
updated CFF2 VF api test results too
2019-03-29 18:26:46 -07:00
Michiharu Ariza
2bd2e656f9
update CFF2 test results
2019-03-29 18:26:20 -07:00
Michiharu Ariza
212dcb758c
add api test cases for HVAR with index map (and fix)
2019-03-29 18:26:20 -07:00
Michiharu Ariza
dc10a7ef60
add gvar & HVAR retain-gids test cases
2019-03-29 18:26:20 -07:00
Michiharu Ariza
43420dfa96
fix test build
2019-03-29 18:26:20 -07:00
Michiharu Ariza
6ee71166b0
add api tests for subset gvar & HVAR; bug fixes
2019-03-29 18:26:20 -07:00
Michiharu Ariza
6e066464f0
replaced tt var api test with a composite glyph
...
for better coverage
2019-03-29 18:26:20 -07:00
Michiharu Ariza
511518c759
add api test for tt var advance widths
...
stripped HVAR from SourceSansVariable-Roman.abc.ttf so glyf gets parsed
2019-03-29 18:26:20 -07:00
Michiharu Ariza
139e87b56c
fix tt var extents & add test
2019-03-29 18:25:35 -07:00
Ebrahim Byagowi
5bbe78a0f3
Allow zero length ranges in sanitization ( #1617 )
...
Fixes fvar table sanitization where there are no named instance
by allowing zero length ranges starting from Null() address.
Fixes #1607
2019-03-29 18:15:00 -07:00
Garret Rieger
d0b6d539f6
Make hb_subset_input_glyph_set () actually do something.
2019-03-29 18:14:59 -07:00
Ebrahim Byagowi
8aaab78efc
Allow zero length ranges in sanitization ( #1617 )
...
Fixes fvar table sanitization where there are no named instance
by allowing zero length ranges starting from Null() address.
Fixes #1607
2019-03-14 16:49:42 -07:00
Garret Rieger
4f37ab63de
Make hb_subset_input_glyph_set () actually do something.
2019-03-01 10:49:46 -08:00
Michiharu Ariza
e2856c2d85
retain FDSelect & FDArray with --retain-gids
...
so in sync with fonttools behavior
2019-02-07 15:32:32 -08:00
Michiharu Ariza
c12862657f
added desubroutinize & retain-gids full test cases with CFF fonts
...
and CFF retain-gids fixes
2019-02-01 14:50:01 -08:00
Michiharu Ariza
f2908b4d8f
Implement subset --regain-gids option with CFF1/2
...
along with api tests & expected results
2019-01-31 14:16:37 -08:00
Garret Rieger
ccc59dc612
[subset] Add unit test for glyf subsetting and retain gids.
2019-01-29 13:19:21 -08:00
Behdad Esfahbod
789396ed6b
Remove wrongly added files
2019-01-22 10:51:21 +01:00
Michiharu Ariza
28917e58f9
init interp_env_t::hintmask_size
...
fixes issue #1547
2019-01-18 09:43:51 -08:00
Behdad Esfahbod
686e6f2e40
Fix automake warnings
...
[skip ci]
2018-12-30 11:28:06 -05:00
fanc999
3ee4ea9456
Fix build on older Visual Studio versions ( #1499 )
...
* src/hb-cff-interp-dict-common.hh: Use ull for unsigned int64_t
The llu suffix does not work for older Visual Studio versions
(pre-2013), but ull works for all the compilers that we attempt to
support.
* test/api: Fix build on pre-C99 compilers
Ensure variables are declared at the top of the block.
* src/hb-dsalgs.hh: Add specialization for hb_is_signed<> for __int8
Pre-Visual Studio 2010 does not consider __int8 (which is typedef'ed to
int8_t) to be equivilant to signed char, so the compiler cannot find the
corresponding hb_is_signed<> specialization that is needed.
The interesting thing is unsigned __int8 is considered to be equivilant
to unsigned char, so as the other types (short, int, long) that we look
for here, so only the specialization for __int8 is added here.
This will fix builds on Visual Studio 2008 at least.
2018-12-19 22:26:54 -05:00
Chun-wei Fan
1e09add232
test/api: Fix building on pre-C99 compilers
...
Ensure variables are declared at the top of the block.
2018-12-12 01:32:01 +08:00
Ebrahim Byagowi
01f628cf55
[aat] Expose hb_aat_layout_has_tracking API
2018-12-03 22:27:26 +03:30
Behdad Esfahbod
967a204ee9
Minor
2018-12-01 19:28:17 -05:00
Michiharu Ariza
32d291ae89
Merge branch 'master' into cff-subset
2018-11-28 16:27:45 -08:00
Behdad Esfahbod
926f512f35
[aat.feat] Rework API and implementation
...
Fixes https://github.com/harfbuzz/harfbuzz/pull/1346
2018-11-25 01:16:02 -05:00
Behdad Esfahbod
2cb235d021
[aat.feat] Fix enum namespace
2018-11-25 01:16:02 -05:00
Behdad Esfahbod
e20f81f4fa
[aat] Rename feat API a bit more
2018-11-25 01:16:02 -05:00
Ebrahim Byagowi
54f4c17f0a
[feat] Rename API uses of setting to selector
2018-11-25 01:16:02 -05:00
Ebrahim Byagowi
9c64b216ec
[feat] Apply renamings and add documentation
2018-11-25 01:16:02 -05:00
Ebrahim Byagowi
4009a05ca7
[feat] Address Behdad comments
2018-11-25 01:16:02 -05:00
Ebrahim Byagowi
19b6025534
[feat] Address @behdad comments
2018-11-25 01:16:02 -05:00
Ebrahim Byagowi
fbad794bd2
[feat] Add feature iteration API
2018-11-25 01:16:02 -05:00
Ebrahim Byagowi
7a0471aa35
[feat] Turn AAT feature id into enum
2018-11-25 01:16:02 -05:00
Ebrahim Byagowi
a157b3e4eb
[feat] Apply @behdad comments
2018-11-25 01:16:02 -05:00
Ebrahim Byagowi
3aff3f822f
[feat] Apply @drott and @jfkthame comments
2018-11-25 01:16:02 -05:00
Ebrahim Byagowi
b791bbbae4
[feat] Apply @jfkthame reviews
2018-11-25 01:16:01 -05:00
Ebrahim Byagowi
95abd53758
[feat] Expose public API
...
* hb_aat_get_feature_settings
2018-11-25 01:16:01 -05:00
David Corbett
018ba46e4d
Don't canonicalize '@' to '-' in language tags
...
Fixes #1406 .
2018-11-23 13:21:22 -05:00
Behdad Esfahbod
f48bb9a393
[var] Deprecated axis enumeration API and add new version
...
New version has axis flags.
New API:
+hb_ot_var_axis_info_t
+hb_ot_var_find_axis_info()
+hb_ot_var_get_axis_infos()
Deprecated API:
-HB_OT_VAR_NO_AXIS_INDEX
-hb_ot_var_axis_t
-hb_ot_var_find_axis()
-hb_ot_var_get_axes()
2018-11-20 20:46:14 -05:00
Michiharu Ariza
1ecbf4d3e3
Merge branch 'master' into cff-subset
2018-11-20 17:19:05 -08:00
Behdad Esfahbod
831ba74382
Fix Codacy "issues"
2018-11-20 01:16:08 -05:00
Michiharu Ariza
b67a7c731f
drop dotsection as hint along with test case
2018-11-16 12:28:24 -08:00
Michiharu Ariza
072c7aba92
use 2-byte offset instead of 4-byte for local subrs
...
more than enough since local subrs immediately follow its corresponding private dict, as the result 2-byte redunction for each font dict with local subrs
updated api test expected subset fonts accordingly
2018-11-15 15:41:46 -08:00
Michiharu Ariza
3787c07856
Implemented seac for extents & subset along with API tests
2018-11-14 13:38:03 -08:00
Michiharu Ariza
0dfa584cb4
changed Adobe company name
2018-11-12 08:47:07 -08:00
Michiharu Ariza
fb2a037f54
Merge branch 'master' into cff-subset
2018-11-10 16:23:11 -08:00
Ebrahim Byagowi
b986fead0a
Hook AAT's lcar to _get_ligature_carets
2018-11-08 23:06:26 +03:30
Michiharu Ariza
0996c0ff62
implented no-desubroutinize with CFF2 along with API test
...
replaced AdobeVFPrototype.abc.otf with a hinted (maually) & subroutinized copy
replaced expected results as well
2018-11-07 14:48:37 -08:00
Michiharu Ariza
43ee0e4d00
Merge branch 'master' into cff-subset
2018-11-06 09:57:17 -08:00
Khaled Hosny
5c3ccbc634
Another missing backlash
...
Did this ever work?
2018-11-06 18:10:56 +02:00
Khaled Hosny
d29602b962
Add missing backslash
2018-11-06 18:07:47 +02:00
Behdad Esfahbod
b062378ce6
[test] Minor
2018-11-06 10:20:36 -05:00
Ebrahim Byagowi
b6112e5ea4
[test] Fix -Weverything bot complain
2018-11-06 11:42:47 +03:30
Ebrahim Byagowi
a49df419f0
[test] Test hb_ot_name_{list_names,get_utf8} on test-ot-name
2018-11-06 11:26:30 +03:30
Behdad Esfahbod
6482fda519
[fuzzing] Fuzz glyph-id etc in test-ot-face
2018-11-05 15:03:18 -05:00
Michiharu Ariza
1682d1bbec
Merge branch 'master' into cff-subset
2018-11-04 13:25:41 -08:00
Behdad Esfahbod
bce437cf0b
[test] Call test-ot-face.c test from hb-shape-fuzzer
...
Should increase coverage...
2018-11-04 02:53:25 -05:00
Behdad Esfahbod
777c22425c
[test] More funcs in test-ot-face
2018-11-04 02:40:20 -05:00
Behdad Esfahbod
9779e602ed
[test] Add test for empty face
2018-11-03 20:50:56 -04:00
Ebrahim Byagowi
b8a78ce201
[BASE] Improvements ( #1347 )
2018-11-03 22:28:30 +03:30
Michiharu Ariza
34b06d994a
fixed FDSelect size calcluation
2018-11-02 16:40:20 -07:00
Michiharu Ariza
481fdfdc23
Merge branch 'cff-subset' of https://github.com/harfbuzz/harfbuzz into cff-subset
2018-11-02 15:28:09 -07:00
Michiharu Ariza
1bc710a8c9
added CFF1 desubr api test cases & bug fixes
2018-11-02 15:28:01 -07:00
Michiharu Ariza
e600e5440b
Merge branch 'master' into cff-subset
2018-11-01 16:13:56 -07:00
Ebrahim Byagowi
cad90be4ea
[test] minor
2018-11-01 13:39:06 +03:30
Behdad Esfahbod
a7aba99baa
[name] Rename hb_name_id_t to hb_ot_name_id_t
...
https://github.com/harfbuzz/harfbuzz/pull/1254
2018-10-30 14:04:09 -07:00
Behdad Esfahbod
56738429d6
[test] Fix warnings
2018-10-30 01:33:22 -07:00
Ebrahim Byagowi
7170e35096
Rename deprecated symbols list file name and clean it up ( #1328 )
2018-10-29 13:11:01 +03:30
Ebrahim Byagowi
c929ccfcea
[ot-color/png] Consider strike ppem on scaling
2018-10-28 22:40:40 -07:00
Ebrahim Byagowi
307d61867a
[ot-color] Make PNGHeader reading actually work
2018-10-28 18:33:10 -07:00
Ebrahim Byagowi
632e9af862
[ot-color] Implement PNGHeader and test it, it doesn't work however
2018-10-28 18:33:10 -07:00
Ebrahim Byagowi
3d4c1f6a41
[ot-color] Apply Behdad reviews
2018-10-28 18:33:10 -07:00
Ebrahim Byagowi
8ef0d2ef92
[ot-color] Apply Behdad comment
2018-10-28 18:33:10 -07:00
Ebrahim Byagowi
dbd419bede
[ot-color] Add public API for CBDT/sbix/SVG color Emojis
2018-10-28 18:33:10 -07:00
Ebrahim Byagowi
524e854c15
Merge pull request #1318 from ebraminio/png
...
Add a non-hooked _png _svg get emoji blob
2018-10-27 15:04:43 +03:30
Ebrahim Byagowi
8180c37df0
[ot-color] Remove _png and _svg public APIs
2018-10-27 14:54:08 +03:30
Ebrahim Byagowi
9435fb24da
[ot-color/png] Implement CBDT part
2018-10-27 13:47:11 +03:30
Ebrahim Byagowi
265ad408ca
[ot-color/png] Implement sbix part
2018-10-27 10:43:46 +03:30
Ebrahim Byagowi
143ffe65aa
[fuzz] Add a new testcase
2018-10-26 12:14:30 +03:30
Ebrahim Byagowi
30f18039b3
[svg] Rename _svg_create_blob to _glyph_reference_blob_svg
2018-10-26 09:34:34 +03:30
Ebrahim Byagowi
5cb1ce8681
[svg] Collapse SVGDocumentIndex into SVG
2018-10-26 09:31:01 +03:30
Ebrahim Byagowi
4ceabb8c21
[svg] Hide start_glyph and end_glyph from API
2018-10-26 09:16:44 +03:30
Ebrahim Byagowi
c7a4e3dfb5
[svg] Add public API
...
* hb_ot_color_has_svg
* hb_ot_color_glyph_svg_create_blob
2018-10-26 09:16:44 +03:30
Michiharu Ariza
be746009e9
dropped support of legacy CFF CharString ops
...
along with test & font
2018-10-25 13:40:40 -07:00
Michiharu Ariza
e1241636d6
Merge branch 'master' into cff-subset
2018-10-23 11:25:51 -07:00
Michiharu Ariza
ba055a8d53
fix build attempt ^3
2018-10-22 16:20:04 -07:00
Michiharu Ariza
b11032afae
fix build attempt ^2
2018-10-22 15:52:37 -07:00
Michiharu Ariza
3d3df5575c
fix build attempt
2018-10-22 15:23:39 -07:00
Behdad Esfahbod
7997144b5f
[color] Revamp palette API
2018-10-22 14:22:31 -07:00
Behdad Esfahbod
1de17bdb80
[colr] Add hb_ot_color_layer_t
...
We never return parallel arrays from functions. That's inconvenient
and hard to bind.
2018-10-22 14:21:23 -07:00
Behdad Esfahbod
3b3668acc8
[color] Rename / reorder a bit
...
Implement has_data() for realz.
2018-10-22 14:21:23 -07:00
Michiharu Ariza
570b77f7d2
Merge branch 'master' into cff-subset
2018-10-22 13:06:47 -07:00
Behdad Esfahbod
9085a72deb
[cpal] Touch up palette flags
2018-10-22 13:03:29 -07:00
Ebrahim Byagowi
d440c8d3fb
Add chromacheck Emoji test fonts and minor preparations ( #1294 )
2018-10-22 22:07:59 +03:30
Michiharu Ariza
857c58279e
Merge branch 'master' into cff-subset
2018-10-22 09:57:20 -07:00
Ebrahim Byagowi
44f79b4bf8
Remove _palette_entry_count as can be done with _palette_colors
2018-10-22 10:17:31 +02:00
Ebrahim Byagowi
6795dcfc08
[test] Test hb_ot_color_has_{colr,cpal}_data
2018-10-22 10:17:31 +02:00
Ebrahim Byagowi
b8ee3a0ec8
[CPAL] Add palette entry and enable palette flag API
2018-10-22 10:17:31 +02:00
Ebrahim Byagowi
d4261b4bb6
Add API test for hb_ot_color_get_color_layers
2018-10-22 10:17:31 +02:00
Ebrahim Byagowi
456978d408
Address COLR/CPAL reviews and revive cpal_v1 tests
2018-10-22 10:17:31 +02:00
Ebrahim Byagowi
e9d798dc12
[test] Use hb_test_open_font_file
2018-10-22 10:17:31 +02:00
Ebrahim Byagowi
e8a6f5b803
Add three macros for separating color channels
2018-10-22 10:17:31 +02:00
Ebrahim Byagowi
0e33467e52
Make ot-color tests pass
2018-10-22 10:17:31 +02:00
Khaled Hosny
d4e928b142
[color] Minimal API for COLR/CPAL
2018-10-22 10:17:31 +02:00
Ebrahim Byagowi
c110878cb6
[test] Unify font file opening across the tests
2018-10-21 11:27:05 +03:30
Ebrahim Byagowi
8931bc4a6b
[test] Fix -Wunused-parameter on test-font.c
2018-10-20 23:23:32 +03:30
Behdad Esfahbod
f11c557662
[test] Fix leak
2018-10-20 12:20:57 -07:00
Behdad Esfahbod
f70f994112
Minor
2018-10-19 20:00:36 -07:00
Behdad Esfahbod
4e09fb8f7a
Oops. Fix build
2018-10-19 19:59:41 -07:00
Behdad Esfahbod
9e288d29d8
[test-map] Cosmetic
2018-10-19 19:47:27 -07:00
Behdad Esfahbod
77d5c3df07
[font] Add failing test amongst font-func parallels infinite-looping
...
Reported by Nona while updating Android to HarfBuzz 2.0.0.
2018-10-19 19:01:01 -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
8a5eba7110
[test] cosmetic, use g_assert_cmpint
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
Ebrahim Byagowi
34f357c78a
Add test for hb_set_del
2018-10-19 20:23:36 +03:30
Michiharu Ariza
51fba41cc9
Merge branch 'master' into cff-subset
2018-10-18 13:08:42 -07:00
Michiharu Ariza
e555ed961e
added flex extents test
2018-10-18 13:04:41 -07:00
Behdad Esfahbod
535ca678bf
[test] Don't use newer glib API
2018-10-18 05:58:04 -07:00
Behdad Esfahbod
3341c7fbfb
[fuzzing] Move fuzzing fonts from api/ here
2018-10-17 15:04:35 -07:00
Michiharu Ariza
1f34388e8b
Merge branch 'master' into cff-subset
2018-10-17 09:34:48 -07:00
Ebrahim Byagowi
61510b63c1
[test] Minor cleanup in test-multithread and test-ot-name ( #1256 )
2018-10-16 14:17:21 +03:30
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
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
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
Michiharu Ariza
fc0153a1d4
Merge branch 'master' into cff-subset
2018-10-12 12:16:50 -07:00
David Corbett
28d091d045
Parse Indic3 tags
2018-10-11 17:44:13 -04:00
Behdad Esfahbod
1d995a340b
Minor
2018-10-11 15:42:54 -04:00
Behdad Esfahbod
57b05210b1
[test] Fix use of deprecated symbols
2018-10-11 15:03:21 -04:00
Michiharu Ariza
ca37172ee3
fixed leak
2018-10-11 11:55:55 -07:00
David Corbett
7f1fbfe2e3
Add hb_ot_tags_to_script_and_language
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
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
Michiharu Ariza
a6b6faf2b8
Replaced CFF1 J subset font for better coverage
...
in api test-ot-extents-cff
2018-10-11 10:53:44 -07: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
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
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
Michiharu Ariza
588518ea51
fixed test-ot-extents-cff failure on some platforms
2018-10-09 14:48:04 -07: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
9f79365c3b
Fix warning
...
How come this one is not generated by clang everything bot?!
../../../test/api/test-multithread.c:37:26: warning: initialization discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
static char *font_path = "fonts/Inconsolata-Regular.abc.ttf";
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../../../test/api/test-multithread.c:38:21: warning: initialization discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
2018-10-09 14:36:25 -04:00
Michiharu Ariza
f5f505b512
Merge branch 'master' into cff-subset
2018-10-09 10:10:35 -07:00
Chun-wei Fan
4035158de4
test/api/test-subset-*.c: Fix build on pre-C99
...
Ensure that we have the variables at the beginning of the block. These
are the only fixes that we need for building HarfBuzz on older
compilers.
2018-10-09 09:43:36 -04:00
Behdad Esfahbod
eb2be97f86
Port test off deprecated API
2018-10-09 07:48:52 -04:00
Behdad Esfahbod
a353c1768d
Remove test for deprecated hb_set_invert()
2018-10-09 01:05:28 -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
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
f92330b5e0
Minor
2018-10-07 17:51:50 +02:00
Michiharu Ariza
6238edbd8b
added CFF glyph extents API test
2018-10-04 13:59:36 -07:00
Michiharu Ariza
1aeaee9dfc
fixed cff2 subset test data
2018-10-03 17:44:45 -07:00