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
Simon Cozens
a0203a28bb
Use hb_buffer_serialize to trace in utils
2020-10-09 22:27:55 -06:00
Ebrahim Byagowi
ba810ce83d
[tests] Replace space with colon in batch mode
2020-07-06 13:53:19 +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
Ebrahim Byagowi
e412008599
Remove redundant void from C++ sources ( #1486 )
2018-12-17 13:01:01 -05:00
Behdad Esfahbod
edaa768253
[util] Use fgets instead of getline such that windows passes
2018-10-30 01:35:58 -07:00
Behdad Esfahbod
58e20f53bf
[util] Add hb-shape --batch
2018-10-30 00:52:22 -07: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
dbdbfe3d7b
Use nullptr instead of NULL
2017-10-15 12:11:08 +02: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
d2052278f2
[util] Add --verify to hb-shape / hb-view that verifies shape results
...
Right now it checks for monotone cluster values. Other checks to be added.
2017-08-11 15:12:25 -07:00
Behdad Esfahbod
40bd7e9a1c
[unsafe-to-break] Add UNSAFE_TO_BREAK flag
...
Not all shapers code is updated to set this properly.
GSUB and Arabic shaper are updated.
GPOS and other shapers are NOT.
Fixes https://github.com/behdad/harfbuzz/issues/224
2017-08-10 15:02:28 -07:00
Behdad Esfahbod
6f38845d9c
[hb-shape] Rename --show-messages to --trace
...
https://github.com/behdad/harfbuzz/issues/506
2017-07-19 17:20:55 -07:00
Behdad Esfahbod
e60350551a
[hb-shape] Improve shaping-debug output
...
Before, that was printed using --debug (and in both hb-shape and hb-view).
Changed it, now hb-shape has a new command-line argument called --show-messages.
When invoked, it also respects other output formatting options. The messages
are better formatted and printed to te same place that hb-shape output is
directed to. Previously they were written to stderr.
Fixes https://github.com/behdad/harfbuzz/issues/506
2017-07-18 19:16:09 -07:00
Philip Withnall
925ceacfed
util: Add missing field initialisers in constructor ( #410 )
...
Coverity ID: 141042
2017-02-07 18:17:48 -08:00
Behdad Esfahbod
fdd1770e00
Add API/cmdline to show glyph extents when serializing buffer
...
New API: HB_BUFFER_SERIALIZE_FLAG_GLYPH_EXTENTS
hb-shape now accepts --show-extents.
Patch from Simon Cozens.
2015-08-24 13:49:55 +01:00
Behdad Esfahbod
cd4eb96abb
[util] Add --font-size to hb-shape
...
Also makes hb-view to use 8 bits of subpixel precision and shape at
requested size, instead of always shaping at upem and scaling results.
2015-01-20 12:45:13 -08:00
Behdad Esfahbod
0afedaa96c
[util/hb-shape] Fix crash; oops
2014-07-09 17:00:48 -04:00
Behdad Esfahbod
9109f1e944
[util/hb-shape] Accept an empty output-format that would skip output
...
Useful for benchmarking, to avoid buffer serialization overhead (which
seems to by far dominate shaping!)
2014-07-08 20:02:29 -04:00
Behdad Esfahbod
ea5e8a02eb
[util] Plug minor leak
2014-03-19 15:38:02 -07:00
Behdad Esfahbod
4dc798de19
Add hb-deprecated.h, and rename a couple enum values
...
Add deprecated alias for old name.
2013-08-27 11:46:08 -04:00
Behdad Esfahbod
7235f33f9e
Fix misc warnings reported by cppcheck
...
https://bugs.freedesktop.org/show_bug.cgi?id=65544
2013-06-10 15:08:49 -04:00
Behdad Esfahbod
4a765f092d
Minor
2012-12-21 16:48:47 -05:00
Behdad Esfahbod
9815a88111
[util] List supported output formats in --help output
2012-12-21 16:46:53 -05:00
Behdad Esfahbod
6bad092aa8
[util] Default to "text" output format in hb-shape
...
If you say:
hb-shape font.ttf text --output-file out.txt
This was previously failing:
Unknown output format `txt'; supported formats are: TEXT / JSON
Now we simply fallback to TEXT if no explicit format was requested.
2012-12-21 16:01:52 -05:00
Behdad Esfahbod
a4bef84e37
[util] Make hb-shape err if output-format is not understood
...
And list supported formats.
2012-11-15 13:29:51 -08:00
Behdad Esfahbod
f9edf16725
Add buffer serialization / deserialization API
...
Two output formats for now: TEXT, and JSON. For example:
hb-shape --output-format=json
Deserialization API is added, but not implemented yet.
2012-11-15 13:10:07 -08:00
Behdad Esfahbod
0594a24484
Cleanup TRUE/FALSE vs true/false
2012-06-05 20:35:40 -04:00
Behdad Esfahbod
5db0683a82
[util] Make hb-shape continue shaping other lines if shapers failed
2012-06-02 12:13:08 -04:00
Behdad Esfahbod
45675e589e
[util] Refactor to accommodate for upcoming new tool
2012-05-15 23:10:39 -04:00
Behdad Esfahbod
95cefdf96e
Add --utf8-clusters
...
Also fix cairo cluster generation.
2012-04-16 18:08:20 -04:00
Behdad Esfahbod
cdc673d97c
[hb-shape] Add --show-line-num
...
Ok, much more useful as a test suite driver now.
2012-01-19 12:46:18 -05:00
Behdad Esfahbod
cc4d9810d6
[hb-shape] Add --show-text and --show-unicode options
2012-01-19 12:32:20 -05:00
Behdad Esfahbod
8b8b19056d
[util] Add hb-shape utility
...
Like hb-view, but prints out buffer contents.
The output format is kinda cryptic. Suggestions welcome.
2011-09-19 16:41:17 -04:00