Commit Graph

428 Commits

Author SHA1 Message Date
Behdad Esfahbod 5dae8297bb [util] Minor followup to https://github.com/harfbuzz/harfbuzz/pull/3083 2021-07-28 11:35:40 -06:00
Khaled Hosny 50379fbb15 [util] Don’t split text at new lines in batch mode
In batch mode (which is used for testing) we are probably not interested
in splitting text into lines as we could have split the string into
different tests. This fixes a bunch of AOTS tests that use newlines as
input.
2021-07-28 11:35:09 -06:00
Khaled Hosny 92b85749f2 [util] Strip quotes when parsing features
When running in batch mode, the quotes are not stripped by the shell and
end up in the feature string. This breaks one of the AOTS tests.

Alternatively, we can remove the quotes from the test files, not sure
which is less hacky, though!
2021-07-28 11:35:09 -06:00
Qunxin Liu 71b5509c19 [subset] support option --glyph-names 2021-07-23 13:57:39 -07:00
Garret Rieger 668f2bd93e [subset] Add hb_subset_or_fail () to public subset api. 2021-07-22 12:12:36 -07:00
Qunxin Liu eee7b459ee [subset] add option --no-prune-unicode-ranges 2021-06-24 11:44:20 -07:00
Qunxin Liu d07f789ae3 [subset] support option "--notdef-outline" 2021-06-18 15:35:02 -07:00
Behdad Esfahbod bdfed8f113 [blob] Add failing versions of create API
Fixes https://github.com/harfbuzz/harfbuzz/issues/2567

New API:
+hb_blob_create_or_fail()
+hb_blob_create_from_file_or_fail()

Use these in util/ to distinguish empty file from not-found file.
Only err on the latter.
2021-06-15 13:56:30 -06:00
Behdad Esfahbod c61ce962cf [buffer] In hb_buffer_get_positions(), return NULL if inside message callback
As discussed in https://github.com/harfbuzz/harfbuzz/issues/2468#issuecomment-645666066

Part of fixing https://github.com/harfbuzz/harfbuzz/issues/2468
2021-06-10 17:36:38 -06:00
Qunxin Liu cb5a6b5a27 [subset] support option --layout-features 2021-05-26 18:04:18 -06:00
Garret Rieger 73ff04a324 [subset] add option to have the subsetter set the mac overlaps flag on each glyph. 2021-05-26 16:04:56 -06:00
Garret Rieger 1bb00cd54b [subset] add num-iterations flag to util/hb-subset. 2021-05-26 15:20:44 -06:00
Behdad Esfahbod 42bf8e3d49 [util] Disable chafa's truecolor mode
See https://github.com/harfbuzz/harfbuzz/pull/2959#issuecomment-827056111
2021-04-26 12:31:44 -06:00
Hans Petter Jansson 8298c2f93b [hb-view] Use Chafa for terminal graphics if available
This produces high-quality terminal graphics using symbols or sixels
according to the detected terminal capabilities.

Fixes #2430.
2021-04-26 12:13:10 -06:00
Behdad Esfahbod b3159ed8d2 [util] Silence compiler warning 2021-03-30 20:52:56 -06:00
Khaled Hosny c30349d54e [hb-view] Support kitty inline images protocol
https://github.com/harfbuzz/harfbuzz/issues/2758
2021-03-29 15:55:40 -06:00
Khaled Hosny f7d5889b3e [hb-view] Support iTerm2 inline images protocol
https://github.com/harfbuzz/harfbuzz/issues/2758
2021-03-29 15:55:40 -06:00
Khaled Hosny 97a093c52f [hb-subset] Improve error handling a bit
* Check that output-file option is actually set before trying to open
  it.
* Print file name and errno when opening the output file fails.
* Be more resilient when writing output file and use ferror() to check
  for errors.

Fixes https://github.com/harfbuzz/harfbuzz/issues/2711
2020-10-13 11:18:59 -07:00
Simon Cozens c0716bb5dc Move delimiter addition into hb-buffer-serialize 2020-10-09 22:27:55 -06:00
Simon Cozens a0203a28bb Use hb_buffer_serialize to trace in utils 2020-10-09 22:27:55 -06:00
Ebrahim Byagowi 5193357832 Revert "Remove autotools build support"
This reverts commit 01ac32aab2.
2020-08-11 23:51:59 +04:30
Ebrahim Byagowi 01ac32aab2 Remove autotools build support 2020-08-07 23:28:12 +04:30
Ebrahim Byagowi 58a5961ca1 minor spacing tweak 2020-07-29 08:44:23 +04:30
Ebrahim Byagowi 07c43b8cf6 minor spacing tweak 2020-07-29 08:42:52 +04:30
Ebrahim Byagowi 5a7cc7fd8b minor spacing tweak 2020-07-29 08:33:38 +04:30
Ebrahim Byagowi ba810ce83d [tests] Replace space with colon in batch mode 2020-07-06 13:53:19 +04:30
Christoph Reiter 03bd6ead44 [meson] Only pass required dependencies to everything
Instead of passing dependencies as required we used one giant shared
dependency list containing all dependencies for every library/executable.
While this kinda works, the specified deps are also used for generating
the pkg-config files and this leads to lots of Requires.private and Libs.private
entries which aren't really needed.

This removes the "deps" array and replaces it with a few smaller ones and
makes sure the public libraries only get passed the dependencies actually
needed.

Fixes #2441
2020-06-04 23:28:57 +04:30
Behdad Esfahbod 069c5de9f8 [util/hb-view] Add --font-extents
Fixes https://github.com/harfbuzz/harfbuzz/issues/2402
2020-05-14 19:00:37 -07:00
Qunxin Liu b2a965df5e [subset] Add support for "--gids" option
cmap subsetting now retains entries associated with any glyph ids explicitly requested
2020-05-11 15:28:58 -07:00
David Corbett 5a0936f53e Increase the size of the serialization buffer 2020-04-23 16:32:20 -07:00
Ebrahim Byagowi 2a549aadd3
minor 2020-04-21 00:32:34 +04:30
Ebrahim Byagowi 2be859d289 minor, replace nullptr checks with implicit ones 2020-04-21 00:30:34 +04:30
Ebrahim Byagowi 1dd3896688 [meson] Make it work on autotools dist 2020-03-12 14:49:40 +03:30
Aaron Boxer 68f982415b meson: update to latest master 2020-03-11 19:18:57 +03:30
Tim-Philipp Müller 618584e923 meson: rename incbase to incconfig
Makes it clearer what it's for: config.h. See #4.
2020-03-11 19:18:57 +03:30
Tim-Philipp Müller 49ba211a9d meson: add options to enable/disable various features
And fix build without GLib. Fixes #2.
2020-03-11 19:18:57 +03:30
Mathieu Duponchelle 484313ff36 meson: install 2020-03-11 19:18:57 +03:30
Mathieu Duponchelle 99b26789d2 meson: more windows fixes 2020-03-11 19:18:57 +03:30
Mathieu Duponchelle 920efc0ef7 Add Meson build definitions
Fixes #490

http://mesonbuild.com
2020-03-11 19:18:57 +03:30
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 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
Ebrahim Byagowi ce114d6b27 minor, tweak spaces 2019-12-31 15:53:02 +03:30
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
Zero King 6d53cda1ba [util] Fix memory leak 2019-07-26 08:56:47 -07:00
Qunxin Liu 1da1b4dc94 [subset] For option "--unicodes", add support for "*" to retain all code points 2019-07-15 11:18:50 -07:00
Bruce Mitchener 659eeddb2d Use C++11 override keyword. 2019-06-04 20:31:32 -07:00
Bruce Mitchener 5846884f86 test: Use nullptr in C++ code. (#1744) 2019-06-03 12:30:25 +04:30
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
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
David Corbett 45adc18526 Fix or document unsupported font-feature-settings 2019-02-25 17:48:16 -05: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
Behdad Esfahbod 9844c880e2 Minor 2018-12-11 17:28:04 -05:00
Michiharu Ariza b403be8ad9 Merge branch 'master' into cff-subset 2018-11-16 12:29:18 -08:00
Ebrahim Byagowi 11aa0468ac [subset] minor, adjust spaces 2018-11-16 00:02:47 +03:30
Michiharu Ariza 43ee0e4d00 Merge branch 'master' into cff-subset 2018-11-06 09:57:17 -08:00
Behdad Esfahbod 9bddfde25d [util] Fix up previous commit 2018-11-06 11:03:34 -05: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 481fdfdc23 Merge branch 'cff-subset' of https://github.com/harfbuzz/harfbuzz into cff-subset 2018-11-02 15:28:09 -07:00
Michiharu Ariza 6186dbf1be added hb_subset_input_set_desubroutinize API
hooked up with CFF1 subroutinizer
a renaming
2018-11-01 17:25:23 -07: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 edaa768253 [util] Use fgets instead of getline such that windows passes 2018-10-30 01:35:58 -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 58e20f53bf [util] Add hb-shape --batch 2018-10-30 00:52:22 -07:00
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
Ebrahim Byagowi eeddda3ec6
[util] Better file-not-found error from hb-shape / hb-view
fixes #1266
2018-10-18 07:38:47 +03:30
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 310bdac4a0 Fix a warning 2018-10-04 16:31:14 +02: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
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 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 9caa432d0c [util] Use HB_FALLTHROUGH
Sure, gcc knows to warn about this as well:

../../util/options.cc:175:17: warning: this statement may fall through [-Wimplicit-fallthrough=]
     case 1: m.r = m.t;
             ~~~~^~~~~
../../util/options.cc:176:5: note: here
     case 2: m.b = m.t;
     ^~~~

But HOLY SMOKES, look at clang -Weverything bot message:

options.cc:176:5: warning: unannotated fall-through between switch labels [-Wimplicit-fallthrough]
    case 2: m.b = m.t;
    ^
options.cc:176:5: note: insert 'HB_FALLTHROUGH;' to silence this warning
    case 2: m.b = m.t;
    ^
    HB_FALLTHROUGH;

Right, it's telling me to insert "HB_FALLTHROUGH;" there!!!!!!!!!
2018-09-30 06:08:11 -04:00
Behdad Esfahbod 2e728a7d86 [util] Mark var static
From clang -Weverything bot:

options.cc:39:3: warning: no previous extern declaration for non-static variable 'supported_font_funcs' [-Wmissing-variable-declarations]
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 04caf11608 [hb-view] Change subpixel bits from 8 to 6
To match FreeType units, such that FreeType gets correct size from us.
This matters more now that we allow setting --ft-load-flags.
2018-09-26 12:13:47 -04: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 94bfea0ce6 Fix build, another try 2018-09-16 19:12:19 +02: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 93f7596254 [util] Add -n shorthand for --num-iterations
Meh.
2018-09-11 14:11:10 +02:00
Behdad Esfahbod 93fe0faaee [subset] Clean up hb_subset_input_t API 2018-08-29 18:24:03 -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 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 159ddb8729
Treat - just as /dev/stdin and remove one extra file reader (#1065) 2018-06-24 23:09:16 +04:30
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 c53697d3f2
Verbose fail when something is wrong with hb-shape/hb-view input font file (#1059)
This checks if the blob isn't empty and uses `hb_face_count`
to see if the font file passes the simple font file sanitization
so can detect if the input is actually a font and checks also
whether input font-index is out of range.
2018-06-17 17:04:55 +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 eaf649450a Resolve clang's conditional-uninitialize warnings 2018-04-23 11:38:45 -07:00
Ebrahim Byagowi ce17340b23 Add hb_blob_create_from_file, a new API (#926) 2018-04-20 07:59:06 +02:00
Khaled Hosny 6fdeeb2ae3 [util] Check all specified shapers are known (#993)
A bit brute force and requires all shapers to be known, not just one.

Fixes https://github.com/harfbuzz/harfbuzz/issues/956
2018-04-19 22:41:37 +02:00
David Corbett 8269791900 Allow trailing non-numeric chars in --unicodes 2018-03-26 01:36:37 -07:00
Behdad Esfahbod 127096e474 [util] Remove line buffering
Something weird seems to be going on. Just kill it.

Fixes https://github.com/harfbuzz/harfbuzz/issues/888
2018-03-15 13:23:27 -07: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 9046e92442 [subset] Rename constructor to hb_subset_input_create_or_fail()
To signify that unlike rest of library, returns nullptr on failure.
2018-02-13 22:07:12 -08:00
Behdad Esfahbod d5b33f2fe1 [subset] hb_subset_input_t changes 2018-02-13 13:55:10 -08:00
Behdad Esfahbod 70b06cc6e7 More fixes 2018-02-10 16:13:06 -06:00
Behdad Esfahbod 4011d885b7 [util] Remove use of ssize_t which was failing on MSVC 2018-02-10 14:09:06 -06:00
Behdad Esfahbod 570d523761 [subset] Merge remote-tracking branch 'googlefonts/master' 2018-02-10 13:24:22 -06:00
Behdad Esfahbod d0f3e7f597 [util] Use setlinebuf() if present
To work around mysterious bug on OS X.

Fixes https://github.com/harfbuzz/harfbuzz/issues/727
2018-02-10 12:46:11 -06:00
Rod Sheeter 8431c38cdc remove output noise 2018-02-08 19:20:58 -08:00
Behdad Esfahbod 194140d3f3 [util] Minor 2018-02-08 16:27:57 -06:00
Behdad Esfahbod af02812fc5 [subset] Change hb_subset API to remove hb_subset_face_t 2018-02-07 13:07:46 -05:00
Rod Sheeter 6c52d94fd1 capture the set of codepoints passed by --unicodes 2018-02-07 12:41:21 -05:00
Garret Rieger 7481f0ce21 Add codepoints to subset input. 2018-02-07 12:41:21 -05:00
Ebrahim Byagowi 70e13ade81
[subset] Fix Windows issue on endlines (#756) 2018-02-06 13:20:38 +03:30
Garret Rieger 2ea228935d ssize_t -> size_t 2018-02-05 15:10:01 -08:00
Garret Rieger c25898eb54 Switch to fopen() instead of open() in subset test. open wasn't compiling on windows. 2018-02-05 14:35:32 -08:00
Garret Rieger fc04f11ce1 Rename HB_SUBSET_sources -> HB_SUBSET_CLI_sources to match what cmake is looking for. 2018-02-05 11:12:33 -08:00
Garret Rieger e428f7b1c2 Wrap unistd.h include in ifdef. 2018-02-05 10:24:16 -08:00
Behdad Esfahbod ae39fc8171 [subset] Build hb-subset into separate libharfbuzz-subset.so 2018-02-04 20:18:52 -05:00
Behdad Esfahbod eac20e4595 [subset] Minor 2018-02-04 20:08:50 -05:00
Rod Sheeter edcd3b80e9 Actually call hb_subset 2018-02-04 12:57:34 -08:00
Garret Rieger f83a43b561 Add CMake configuration for all of the new subsetting code. 2018-02-04 12:57:34 -08:00
Garret Rieger 5bc0cda179 Add missing unistd header to hb-subset. 2018-02-04 12:57:34 -08:00
Garret Rieger 058b1260ad Re-write hb-subset utility to use main-font-text driver. 2018-02-04 12:57:34 -08:00
Garret Rieger ede84ffa42 Whitespace 2018-02-04 12:57:34 -08:00
Rod Sheeter e9d154ac8d tweak test failure output. write to a temp file not stdout. test still fails because expected is not just an identical copy of input 2018-02-04 12:57:33 -08:00
Rod Sheeter 9ccb8366f6 Start to sketch APIs for subsetting 2018-02-04 12:57:33 -08:00
Behdad Esfahbod 4c4a9fc861 Typo
Fixes https://github.com/harfbuzz/harfbuzz/issues/711
2018-01-17 09:48:08 -08:00
Behdad Esfahbod 7c32e01d04 Minor 2018-01-11 10:47:31 +01:00
Behdad Esfahbod 746a37d5bd [util] Replace setlinebuf 2018-01-10 16:47:47 +01:00
Behdad Esfahbod ff2083c53e [util] Set stdio files to line buffering
So we can stream lines to hb-shape and read output.
2018-01-10 13:58:41 +01:00
Behdad Esfahbod 3b1e97f364 Add HB_BUFFER_FLAG_REMOVE_DEFAULT_IGNORABLES
New API:
HB_BUFFER_FLAG_REMOVE_DEFAULT_IGNORABLES
hb-shape / hb-view --remove-default-ignorables

One more text-rendering-tests test passing.  Eleven failing.
2018-01-10 03:36:03 +01:00
Behdad Esfahbod 3f29ea9144 [util] Add hb-shape --ned
For not displaying extra data: no clusters, no advance. Just data pertaining
to where glyphs end up on the screen.
2018-01-10 02:50:49 +01:00
Behdad Esfahbod 71fd6325b6 Add option to buffer serialization to not output glyph advances
When advances are not printed, glyph offsets reflect absolute glyph
positions.

New API:
HB_BUFFER_SERIALIZE_FLAG_NO_ADVANCES
hb-shape --no-advances
2018-01-10 02:50:49 +01:00
Behdad Esfahbod 7b837e20d2 [util] Add TODO item 2018-01-03 12:46:29 +00:00
Olivier Blin 0fd89dc61c [hb-ft] Fix build when Multiple Master font support is disabled in freetype
FT_Set_Var_Blend_Coordinates() is not available when "Multiple Master
font interface" is disabled in freetype's modules.cfg
2017-12-04 10:52:06 -08:00
Behdad Esfahbod bb7cc4eada Minor 2017-11-20 19:39:47 -08: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 c3448e8d21 Use static_assert instead of custom ASSERT_STATIC 2017-10-15 12:02:00 +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 9355218f58 [util] Add a few shorthand forms for commandline options
-o, -O, -u, -v, -V
2017-09-09 11:21:07 -07:00