Commit Graph

104 Commits

Author SHA1 Message Date
Behdad Esfahbod
bc76449f51 Use setmode() instead of _setmode()
Looks like Cygwin / MSVC declare it that way, and it still works on
MinGW32 cross.
2013-01-31 18:18:05 -05:00
Behdad Esfahbod
9815a88111 [util] List supported output formats in --help output 2012-12-21 16:46:53 -05:00
Behdad Esfahbod
9a34a50daa Fix build with C++11 2012-12-05 19:18:18 -05: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
407f80d625 [util] Add --bot / --eot / --preserve-default-ignorables 2012-11-13 15:33:27 -08:00
Behdad Esfahbod
78d41d8d69 Minor 2012-11-13 15:15:09 -08:00
Behdad Esfahbod
321f73c16e [util] Add --text-before and --text-after to hb-shape / hb-view
Use with Arabic, for example, to see the effect on joining.
2012-11-13 15:12:24 -08:00
Behdad Esfahbod
c8149ca85e [hb-shape] Adjust postioning output format
1. If there is any offset (x or y), print out both x and y offsets.

2. Always print out the advance in the major direction of the buffer.
Ie. even for zero-advance glyphs, print a "+0".  This is more intuitive.
2012-11-13 11:07:20 -08:00
Behdad Esfahbod
3bc22eb7b8 Minor 2012-11-12 10:07:28 -08:00
Behdad Esfahbod
e30ebd2794 Add hb_feature_to/from_string() 2012-09-06 22:09:06 -04:00
Behdad Esfahbod
6f3a300138 Add hb_font_glyph_from/to_string 2012-08-07 22:13:25 -04:00
Behdad Esfahbod
ade7459ea7 [util] Fix leaks 2012-08-06 19:49:42 -07:00
Behdad Esfahbod
bdc48a879a Enlarge glyph_name buffer
Lohit Devanagari has a glyph named:
u0924_u094D.half_u0930_u094D.blwf.vatu
2012-08-04 17:08:38 -07:00
Behdad Esfahbod
39b17837b4 Add hb_buffer_normalize_glyphs() and hb-shape --normalize-glyphs
This reorders glyphs within the cluster to a nominal order.  This should
have no visible effect on the output, but helps with testing, for
getting the same hb-shape output for visually-equal glyphs for each
cluster.
2012-07-17 17:09:29 -04:00
Behdad Esfahbod
0594a24484 Cleanup TRUE/FALSE vs true/false 2012-06-05 20:35:40 -04:00
Behdad Esfahbod
c188548312 Add --verbose to hb-shape
Just turns all --show-* options on.
2012-06-04 09:09:59 -04:00
Behdad Esfahbod
ae62166519 [util] Minor 2012-06-02 12:21:19 -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
bce095524b Add hb_font_get_glyph_name() and hb_font_get_glyph_from_name() 2012-05-28 10:45:50 -04:00
Behdad Esfahbod
8f8956a55f [util] Add hidden --shaper that is equivalent of --shapers 2012-05-25 14:30:24 -04:00
Behdad Esfahbod
30874b4819 [util] Make tools default to stdin if no text is provided
One less argument to type in typical testing workflow!
2012-05-12 15:54:27 +02:00
Behdad Esfahbod
95cefdf96e Add --utf8-clusters
Also fix cairo cluster generation.
2012-04-16 18:08:20 -04:00
Behdad Esfahbod
f51e167436 Minor error handling 2012-01-30 09:48:33 -05:00
Behdad Esfahbod
d530024168 [util] Make clusters work with char offset instead of UTF-8 offset
This means the --features indices also refer to char position
instead of byte position now.  Same for cluster values reported
by hb-shape.

Will add an option for byte indices later.
2012-01-21 19:07:22 -05:00
Behdad Esfahbod
0f68f4a0b5 Correctly print out Unicode strings 2012-01-21 18:59:48 -05:00
Behdad Esfahbod
d8134bc017 [hb-shape] Add parantheses around --show-text output 2012-01-20 17:18:59 -05:00
Behdad Esfahbod
c91c4fa471 [hb-shape] Change glyphstring brackets from </> to [/]
Sorry for the disruption but I need this to differentiate from the
Unicode string.
2012-01-19 17:51:57 -05: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
27c36af411 Fix OOB in hb-shape 2012-01-19 12:30:43 -05:00
Behdad Esfahbod
8750abaf84 [util] Add --help-features
Patch from Khaled Hosny.
2012-01-18 22:47:44 -05:00
Behdad Esfahbod
a097043f9a Allow space in one more place when parsing features 2012-01-14 17:55:51 -05:00
Behdad Esfahbod
fd528c17b7 [util] Add --list-shapers to hb-view and hb-shape 2011-10-12 15:03:58 -04:00
Behdad Esfahbod
5857720cd3 [util] s/%d/%u/ when printing glyph ids and clusters 2011-09-27 12:36:26 -04:00
Behdad Esfahbod
d3f3690b48 hb-shape: In --no-glyph-names, output glyph number directly
Ie. write "86" instead of "gid86".
2011-09-21 16:41:43 -04:00
Behdad Esfahbod
088c1e27c0 [util] Fix option parsing
Wow, who knew bool is one byte and I was using it as a 4byte int?!

C++ auto casts fails you in mysterious ways...
2011-09-20 14:43:55 -04:00
Behdad Esfahbod
422558142a [util] Account for line-space in surface size 2011-09-19 17:57:02 -04:00
Behdad Esfahbod
b5afd8f78e [util] Rename --output to --output_file, and --format to --output-format 2011-09-19 16:56:21 -04: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
Behdad Esfahbod
11e51993ab [util] Move font-size into view-options 2011-09-19 09:58:55 -04:00
Behdad Esfahbod
0fe2960197 Fix Linux build when io.h is available
Bug 40953 - fail compile git: make[2]: *** [hb_view-options.o] Error 1
2011-09-17 09:59:58 -04:00
Behdad Esfahbod
5ddd9cc499 Minor 2011-09-16 16:40:44 -04:00
Behdad Esfahbod
55aeb04904 Fix reading text from stdin 2011-09-16 02:08:36 -04:00
Behdad Esfahbod
a75c1b1251 Move code around 2011-09-16 01:16:41 -04:00
Behdad Esfahbod
7bf6ecd3bf Always shape at size=upem
Fixes bug with uniscribe not handling GIGANTIC sizes.
2011-09-16 01:11:30 -04:00
Behdad Esfahbod
674ee58d9b Minor 2011-09-16 00:54:05 -04:00
Behdad Esfahbod
4451168e5d Fix binary stdin/stdout io in Windows
Make --font-file accept "-" to mean stdin, and have it work
in Windows too!
2011-09-16 00:41:08 -04:00
Behdad Esfahbod
639b5957d9 Minor 2011-09-15 18:09:49 -04:00
Behdad Esfahbod
b9b10ad78b [util] Refactor hb-view completely
Now we can use the same code to do other utils...
2011-09-15 00:30:41 -04:00
Behdad Esfahbod
bc4b07b05e More reshuffling 2011-09-08 17:11:01 -04:00
Behdad Esfahbod
109cb38289 [util] Further refactor option parsing 2011-09-08 16:00:04 -04:00
Behdad Esfahbod
4c9fe88d30 [API] Make all _from_string() functions take a len parameter
Can be -1 for NUL-terminated string.  This is useful for passing parts
of a larger string to a function without having to copy or modify the
string first.

Affected functions:

	hb_tag_t hb_tag_from_string()
	hb_direction_from_string()
	hb_language_from_string()
	hb_script_from_string()
2011-08-26 09:22:12 +02:00
Behdad Esfahbod
97796453aa Fix falloffs of the GOption conversion 2011-08-15 19:03:43 +02:00
Behdad Esfahbod
3bb300ee78 Refactor hb-view code 2011-08-11 12:04:03 +02:00