Evgeniy Reizner
b79ceac3c6
Prefer UINT_MAX instead of uint overflow.
...
Also, prefer HB_FEATURE_GLOBAL_START and HB_FEATURE_GLOBAL_END.
2019-12-15 11:46:05 -08:00
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
Bruce Mitchener
659eeddb2d
Use C++11 override keyword.
2019-06-04 20:31:32 -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
67064294a0
[subset] Add drop-tables option to hb-subset util.
2019-05-20 13:35:46 -07:00
Qunxin Liu
e501ea143d
[subset] Subset name table step 3, add --nameids option to guide the
...
selection of which name records to keep in the subset method.
2019-04-26 15:24:47 -07:00
Garret Rieger
490d52f908
[subset] Add retain-gids option to hb-subset executable.
2019-01-29 13:19:21 -08:00
Behdad Esfahbod
60022ecced
Fix -Wcast-function-type warnings in util/ with gcc 4.8
2019-01-26 14:04:51 +01:00
Ebrahim Byagowi
e412008599
Remove redundant void from C++ sources ( #1486 )
2018-12-17 13:01:01 -05:00
Behdad Esfahbod
3f8e7a98d3
[util/hb-subset] Add --layout to keep GDEF/GSUB/GPOS
...
Will become default and option removed in the future.
2018-12-12 11:32:57 -05:00
Michiharu Ariza
43ee0e4d00
Merge branch 'master' into cff-subset
2018-11-06 09:57:17 -08:00
Behdad Esfahbod
3ec2e4fa7b
[util] Don't terminate string after a a 0 in -u
...
Fixes https://github.com/harfbuzz/harfbuzz/issues/1361
2018-11-06 10:49:19 -05:00
Michiharu Ariza
e600e5440b
Merge branch 'master' into cff-subset
2018-11-01 16:13:56 -07:00
Michiharu Ariza
d56e338a90
CFF1 no-desubroutinize + no-hinting
...
no-desubroutinize option is disabled for now
code cleanup (esp. CFF1 width handling)
bug fixes & renaming
2018-10-31 22:30:34 -07:00
Behdad Esfahbod
83a612739a
[util] Minor
2018-10-30 01:29:58 -07:00
Ebrahim Byagowi
f7a08cd41d
Fix extra semicolon issues and test that on CI ( #1330 )
2018-10-30 11:29:09 +03:30
Behdad Esfahbod
6131fb6283
[util] Don't close stdin/stdout
2018-10-30 00:52:22 -07:00
Khaled Hosny
cf92cb7e00
Use g_strdup instead of strdup
...
Cygwin does not seem to have strdup.
2018-10-19 22:46:40 +02: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
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
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
b5285b3479
[util] Remove unneeded virtual
...
clang warning:
../../util/options.hh:72:13: warning: destination for this 'memset' call is a pointer to dynamic class
'option_parser_t'; vtable pointer will be overwritten [-Wdynamic-class-memaccess]
memset (this, 0, sizeof (*this));
~~~~~~ ^
../../util/options.hh:72:13: note: explicitly cast the pointer to silence this warning
memset (this, 0, sizeof (*this));
^
(void*)
2018-09-30 12:23:01 +02:00
Behdad Esfahbod
89ed040b21
[util] Fix more non-virtual-destructor warnings
2018-09-30 06:08:11 -04:00
Behdad Esfahbod
2382dd07fa
Minor
2018-09-30 06:08:11 -04:00
Behdad Esfahbod
e910a1aef4
[util] Add empty virtual destructor to option_group_t
...
From clang -Weverything bot:
./options.hh:57:8: warning: 'option_group_t' has virtual functions but non-virtual destructor [-Wnon-virtual-dtor]
struct option_group_t
^
2018-09-30 06:08:11 -04:00
Behdad Esfahbod
f90bab8560
[util] Add --ft-load-flags
...
Useful for performance testing.
Not hooked to cairo yet. Just changes shaping, not rasterization.
2018-09-11 14:23:35 +02: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
Ebrahim Byagowi
d0c2889dfc
Revert file blob sanitization and index checking ( #1062 )
...
As https://github.com/harfbuzz/harfbuzz/pull/1059#issuecomment-397912812 we
like to still work with blobs that harfbuzz itself can't handle directly that are failing sanitization
currently apparently.
2018-06-18 19:59:33 +04:30
Ebrahim Byagowi
aa0c5df419
Fix reading fonts from stdin ( #1060 )
...
We were passing the font path directly to freetype so rendering
was broken when we are getting the font from stdin.
This fixes it by using FT_New_Memory_Face instead.
This fixes:
* build/util/hb-view /dev/stdin text < font.ttf
* build/util/hb-view - text < font.ttf
* cat font.ttf | build/util/hb-view - text
but doesn't work on
* cat font.ttf | build/util/hb-view /dev/stdin text
which I will try to fix separately.
2018-06-17 16:49:34 +04:30
Ebrahim Byagowi
ce17340b23
Add hb_blob_create_from_file, a new API ( #926 )
2018-04-20 07:59:06 +02:00
rsheeter
4a1d51ef15
Merge pull request #818 from googlefonts/drophints
...
[subset] Drop hints
2018-02-26 20:23:41 -08:00
Ebrahim Byagowi
bb82f01383
[aat] trak sanitization
2018-02-26 00:15:26 -08:00
Rod Sheeter
d78393b554
Merge branch 'master' of https://github.com/harfbuzz/harfbuzz into drophints
2018-02-23 17:53:26 -08:00
Ebrahim Byagowi
4f6f7c3b22
[util] Implement ppem/ptem on hb-{shape,view} ( #811 )
2018-02-23 02:54:12 +03:30
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
Behdad Esfahbod
194140d3f3
[util] Minor
2018-02-08 16:27:57 -06:00
Behdad Esfahbod
3b1e97f364
Add HB_BUFFER_FLAG_REMOVE_DEFAULT_IGNORABLES
...
New API:
HB_BUFFER_FLAG_REMOVE_DEFAULT_IGNORABLES
hb-shape / hb-view --remove-default-ignorables
One more text-rendering-tests test passing. Eleven failing.
2018-01-10 03:36:03 +01:00
Behdad Esfahbod
71fd6325b6
Add option to buffer serialization to not output glyph advances
...
When advances are not printed, glyph offsets reflect absolute glyph
positions.
New API:
HB_BUFFER_SERIALIZE_FLAG_NO_ADVANCES
hb-shape --no-advances
2018-01-10 02:50:49 +01:00
Behdad Esfahbod
17f40b7cad
Include hb-private.hh more consistently
...
Part of fixing https://github.com/behdad/harfbuzz/issues/585
2017-10-27 09:22:42 -06:00
Behdad Esfahbod
dbdbfe3d7b
Use nullptr instead of NULL
2017-10-15 12:11:08 +02:00
Behdad Esfahbod
dad431e75b
[util] Include hb-private.hh
...
Simplifies compatibility issues by centralizing all boilerplate code
in hb-private.hh.
2017-10-15 10:55:32 +02:00
Behdad Esfahbod
d03f11f246
Fix buffer_diff for empty buffers
...
If buffers are empty, content type should be ignored.
This fixes last of the failing tests: fuzzed.tests. Green again!
2017-09-04 20:14:13 -07:00
Behdad Esfahbod
b262ebcc9c
[util] Fix cluster sweeping during --verify
...
If *I* get this wrong in 2017, I have no idea how others get their head around
cluster math...
Fixes tests/arabic-fallback-shaping.tests
2017-08-30 17:26:07 -07:00
Behdad Esfahbod
69d701b02e
[util] When --verify fails, return reconstructed shape results
2017-08-30 17:07:29 -07:00
Behdad Esfahbod
099472e08b
hb_buffer_diff() tweak
...
I like to have a mode where CONTAINS_NOTDEF and CONTAINS_DOTTEDCIRCLE are not
returned. Abused a value of -1 for that. hb-shape now uses it. Fixes two
of the six tests failing with --verify in test/shaping/run-tests.sh.
2017-08-30 16:45:06 -07:00
Behdad Esfahbod
a9e52a1af4
[util] Prefix trace lines with "trace:", and error lines with "error:"
2017-08-15 17:30:18 -07:00
Behdad Esfahbod
7ea10c35a3
[util] Respect eot/bot in safe-to-break test; hook up hb_buffer_diff()
2017-08-15 17:25:04 -07:00
Behdad Esfahbod
a88e2a73f3
[util] Fix leaks
2017-08-14 14:49:21 -07:00
Behdad Esfahbod
05fabbd03e
[unsafe-to-break] Towards verifying unsafe-to-break in --verify
...
We break and shape fragments and reconstruct shape result from them.
Remains to compare to original buffer. Going to add some buffer
comparison API and use here, instead of open-coding.
2017-08-11 20:00:55 -07:00