Commit Graph

70 Commits

Author SHA1 Message Date
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 5789ca69d7 [util] Minor 2015-01-20 12:45:13 -08:00
Behdad Esfahbod c36c4a9924 Add missing va_end()
Fixes https://github.com/behdad/harfbuzz/pull/74
2015-01-02 14:09:23 -08:00
Behdad Esfahbod 0de25d4184 [util] Note CSS compatibility in --help-features 2014-07-25 12:35:03 -04:00
Behdad Esfahbod 8650def735 [util] Add option to set font function implementation to use
Supports ft and ot right now.  hb-view currently not rendering with ot.
Will fix after some clean up.
2014-07-05 15:51:25 -04:00
Behdad Esfahbod 2306ad46dc [util] Fix memory issue 2014-07-04 18:09:29 -04:00
Behdad Esfahbod 903648437c Start fleshing out builtin font functions 2014-03-24 15:19:15 -07:00
Behdad Esfahbod ea5e8a02eb [util] Plug minor leak 2014-03-19 15:38:02 -07:00
Behdad Esfahbod d688475ea9 Minor 2013-12-12 13:21:57 -05:00
Behdad Esfahbod 260a3198f4 [util] Plug leak 2013-12-02 05:39:39 -05:00
Behdad Esfahbod c2bc818706 Work with old and new glib
Avoids "deprecated" warnings.
2013-10-27 23:37:14 +01:00
Behdad Esfahbod 9326d48e43 Don't use g_mapped_file_unref()
Was introduced in glib 2.22.
2013-10-10 20:04:42 +02:00
Behdad Esfahbod 50067e280f [util] Add --num-iterations
Useful for profiling shapers.
2013-04-11 16:31:01 -04:00
Behdad Esfahbod e2aab4b5db Improve checks for setmode()
As reported by Jonathan, OS X has setmode() that is something other
than what setmode() is on Win32.  So, limit invocation to Windows
platforms only.
2013-02-12 15:35:32 -05:00
Behdad Esfahbod ceeae30f47 Really fix setmode this time
Thanks to Khaled for spotting it.
2013-01-31 19:27:36 -05:00
Behdad Esfahbod 7cba8a673b Fixup previous commit
Now, it looks like this breaks Cygwin again.  Have to figure out what's
going on.
2013-01-31 18:37:10 -05:00
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