util/options.hh


Log

Author Commit Date CI Message
Behdad Esfahbod 83a61273 2018-10-30T01:24:23 [util] Minor
Ebrahim Byagowi f7a08cd4 2018-10-30T11:29:09 Fix extra semicolon issues and test that on CI (#1330)
Behdad Esfahbod 6131fb62 2018-10-30T00:38:01 [util] Don't close stdin/stdout
Khaled Hosny cf92cb7e 2018-10-19T22:21:39 Use g_strdup instead of strdup Cygwin does not seem to have strdup.
Behdad Esfahbod 1e8fdd28 2018-10-10T16:32:35 Remove HAVE_OT We never tested compiling without it. Just kill it. We always build our own shaper.
Behdad Esfahbod e42cd58c 2018-10-07T20:46:11 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
Behdad Esfahbod 71b65eb2 2018-10-07T18:41:52 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
Behdad Esfahbod b5285b34 2018-09-30T12:23:01 [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*)
Behdad Esfahbod 89ed040b 2018-09-30T06:06:26 [util] Fix more non-virtual-destructor warnings
Behdad Esfahbod 2382dd07 2018-09-30T05:54:47 Minor
Behdad Esfahbod e910a1ae 2018-09-30T05:46:20 [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 ^
Behdad Esfahbod f90bab85 2018-09-11T14:21:15 [util] Add --ft-load-flags Useful for performance testing. Not hooked to cairo yet. Just changes shaping, not rasterization.
Behdad Esfahbod c77ae408 2018-08-25T22:36:36 Rename hb-*private.hh to hb-*.hh Sorry for the noise, downstream custom builders. Please adjust.
Ebrahim Byagowi d0c2889d 2018-06-18T19:59:33 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.
Ebrahim Byagowi aa0c5df4 2018-06-17T16:49:34 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.
Ebrahim Byagowi ce17340b 2018-04-20T10:29:06 Add hb_blob_create_from_file, a new API (#926)
rsheeter 4a1d51ef 2018-02-26T20:23:41 Merge pull request #818 from googlefonts/drophints [subset] Drop hints
Ebrahim Byagowi bb82f013 2018-02-25T12:30:33 [aat] trak sanitization
Rod Sheeter d78393b5 2018-02-23T17:53:26 Merge branch 'master' of https://github.com/harfbuzz/harfbuzz into drophints
Ebrahim Byagowi 4f6f7c3b 2018-02-23T02:54:12 [util] Implement ppem/ptem on hb-{shape,view} (#811)
Rod Sheeter 74e0c13a 2018-02-21T11:19:18 [subset] drop hint tables if so flagged. Still need to dump glyf instructions.
Rod Sheeter 0bd100e1 2018-02-21T10:34:00 [subset] add --hinting flag
Behdad Esfahbod 194140d3 2018-02-08T16:27:57 [util] Minor
Behdad Esfahbod 3b1e97f3 2018-01-10T03:35:20 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.
Behdad Esfahbod 71fd6325 2018-01-10T02:20:14 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
Behdad Esfahbod 17f40b7c 2017-10-27T09:22:30 Include hb-private.hh more consistently Part of fixing https://github.com/behdad/harfbuzz/issues/585
Behdad Esfahbod dbdbfe3d 2017-10-15T12:11:08 Use nullptr instead of NULL
Behdad Esfahbod dad431e7 2017-10-15T10:55:32 [util] Include hb-private.hh Simplifies compatibility issues by centralizing all boilerplate code in hb-private.hh.
Behdad Esfahbod d03f11f2 2017-09-04T20:14:13 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!
Behdad Esfahbod b262ebcc 2017-08-30T17:25:10 [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
Behdad Esfahbod 69d701b0 2017-08-30T17:07:29 [util] When --verify fails, return reconstructed shape results
Behdad Esfahbod 099472e0 2017-08-30T16:45:06 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.
Behdad Esfahbod a9e52a1a 2017-08-15T17:30:18 [util] Prefix trace lines with "trace:", and error lines with "error:"
Behdad Esfahbod 7ea10c35 2017-08-15T17:12:28 [util] Respect eot/bot in safe-to-break test; hook up hb_buffer_diff()
Behdad Esfahbod a88e2a73 2017-08-14T14:49:21 [util] Fix leaks
Behdad Esfahbod 05fabbd0 2017-08-11T19:51:06 [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.
Behdad Esfahbod d2052278 2017-08-11T15:12:25 [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.
Behdad Esfahbod 40bd7e9a 2016-05-02T14:47:45 [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
Behdad Esfahbod 6f38845d 2017-07-19T17:20:55 [hb-shape] Rename --show-messages to --trace https://github.com/behdad/harfbuzz/issues/506
Behdad Esfahbod e6035055 2017-07-18T19:14:19 [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
Behdad Esfahbod 111f3e55 2017-01-21T17:51:41 [util] Add --variations Is hooked up to the font, but not to FreeType, so raster doesn't show yet. Documentation needs to be done.
Chun-wei Fan a49e7b7e 2015-11-03T18:49:34 MSVC builds: Add fallback implementation for pre-2013 MSVC Pre-2013 MSVC does not have scalbn() and scalbnf(), which are used in the utility programs. Add fallback implementations for these, which can be used when necessary.
Behdad Esfahbod e97835ad 2015-11-10T11:37:01 [util] Fix crash when --output-file is specified but not --output-format
Behdad Esfahbod 3530cc2d 2015-11-03T11:34:47 [util] Fix option-parsing leaks
Behdad Esfahbod fdd1770e 2015-08-24T13:49:55 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.
Behdad Esfahbod 376d587f 2015-07-22T16:51:12 Implement more granular cluster-merging TODO: Documentation. Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=71445
Behdad Esfahbod cd4eb96a 2015-01-20T12:30:45 [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.
Behdad Esfahbod 8650def7 2014-07-05T15:50:18 [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.
Behdad Esfahbod 2306ad46 2014-07-04T18:09:29 [util] Fix memory issue
Behdad Esfahbod ea5e8a02 2014-03-19T15:38:02 [util] Plug minor leak
Behdad Esfahbod c2bc8187 2013-10-27T23:36:35 Work with old and new glib Avoids "deprecated" warnings.
Behdad Esfahbod 4dc798de 2013-08-26T20:39:00 Add hb-deprecated.h, and rename a couple enum values Add deprecated alias for old name.
Behdad Esfahbod 50067e28 2013-04-11T16:31:01 [util] Add --num-iterations Useful for profiling shapers.
Behdad Esfahbod c462b32d 2013-02-15T07:51:47 Disable automatic segment properties guessing Before, if one called hb_shape() without setting script, language, and direction on the buffer, hb_shape() was calling hb_buffer_guess_segment_properties() on the user's behalf to guess these. This is very dangerous, since any serious user of HarfBuzz must set these properly (specially important is direction). So now, we don't guess properties by default. People not setting direction will get an abort() now. If the old behavior is desired (fragile, good for simple testing only), users can call hb_buffer_guess_segment_properties() on the buffer just before calling hb_shape().
Behdad Esfahbod e2aab4b5 2013-02-12T15:35:32 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.
Behdad Esfahbod bc76449f 2013-01-31T18:18:05 Use setmode() instead of _setmode() Looks like Cygwin / MSVC declare it that way, and it still works on MinGW32 cross.
Behdad Esfahbod 1172dc73 2013-01-07T16:46:37 Rename hb_buffer_clear() to hb_buffer_clear_contents() The previous name was clashing with harfbuzz.old. There are systems that need to link both... Clash-free now again.
Behdad Esfahbod 9815a881 2012-12-21T16:46:53 [util] List supported output formats in --help output
Behdad Esfahbod 6bad092a 2012-12-21T16:01:52 [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.
Behdad Esfahbod f9edf167 2012-11-15T12:14:09 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.
Behdad Esfahbod 407f80d6 2012-11-13T15:33:27 [util] Add --bot / --eot / --preserve-default-ignorables
Behdad Esfahbod 321f73c1 2012-11-13T15:12:24 [util] Add --text-before and --text-after to hb-shape / hb-view Use with Arabic, for example, to see the effect on joining.
Behdad Esfahbod ade7459e 2012-08-06T19:42:47 [util] Fix leaks
Behdad Esfahbod 39b17837 2012-07-17T17:09:29 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.
Behdad Esfahbod 0594a244 2012-06-05T20:35:40 Cleanup TRUE/FALSE vs true/false
Behdad Esfahbod c1885483 2012-06-04T08:56:00 Add --verbose to hb-shape Just turns all --show-* options on.
Behdad Esfahbod ae621665 2012-06-02T12:21:19 [util] Minor
Behdad Esfahbod 5db0683a 2012-06-02T12:13:08 [util] Make hb-shape continue shaping other lines if shapers failed
Behdad Esfahbod c87b317f 2012-05-15T23:53:18 [util] Add hb-ot-shape-closure tool Computes all the glyphs that may be generated given a font and set of Unicode characters. The order of the Unicode characters is irrelevant. Sample output: behdad:util 0$ ./hb-ot-shape-closure Doulos\ SIL\ Regular.ttf f f f_f behdad:util 0$ ./hb-ot-shape-closure Doulos\ SIL\ Regular.ttf i i behdad:util 0$ ./hb-ot-shape-closure Doulos\ SIL\ Regular.ttf fi f f_i f_f_i f_f i behdad:util 0$ ./hb-ot-shape-closure DroidNaskh-Regular.ttf ب uni0628 uni0628.init uni0628.medi uni0628.fina behdad:util 0$ ./hb-ot-shape-closure DroidNaskh-Regular.ttf ا uni0627 uni0627.fina behdad:util 0$ ./hb-ot-shape-closure DroidNaskh-Regular.ttf با uni0627 uni0627.fina uni0628 uni0628.init uni0628.medi uni0628.fina behdad:util 0$ ./hb-ot-shape-closure DroidNaskh-Regular.ttf با --no-glyph-names 5 6 133 134 135 136
Behdad Esfahbod 912c5ff8 2012-05-13T12:51:02 Reduce default margin
Behdad Esfahbod 52e7b142 2012-05-13T02:02:58 [util] Make hb-view print out Unicode art if stdout is a terminal
Behdad Esfahbod 30874b48 2012-05-12T15:54:27 [util] Make tools default to stdin if no text is provided One less argument to type in typical testing workflow!
Behdad Esfahbod 20979511 2012-05-12T15:41:48 [util] Change default font size of hb-view to 256 Most common usecase of hb-view is to test rendering of short words for testing / inspection. Not having to type "--font-size 150" each time isn't such a bad idea...
Behdad Esfahbod 95cefdf9 2012-04-16T18:08:20 Add --utf8-clusters Also fix cairo cluster generation.
Behdad Esfahbod 69b84a8f 2012-04-12T15:50:40 Fix hb-view surface size calc for vertical text For some reason it doesn't quite work with IranianNastaliq, but that looks like a font issue.
Behdad Esfahbod 6bd9b479 2012-04-12T14:53:53 Hide backend-specific shape functions Also remove shaper_options argument to hb_shape_full(). That was unused and for "future". Let it go. More shaper API coming in preparation for plan/planned API.
Behdad Esfahbod d5300241 2012-01-21T19:07:22 [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.
Behdad Esfahbod cdc673d9 2012-01-19T12:46:18 [hb-shape] Add --show-line-num Ok, much more useful as a test suite driver now.
Behdad Esfahbod cc4d9810 2012-01-19T12:32:20 [hb-shape] Add --show-text and --show-unicode options
Behdad Esfahbod 088c1e27 2011-09-20T14:43:55 [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...
Behdad Esfahbod 42255814 2011-09-19T17:57:02 [util] Account for line-space in surface size
Behdad Esfahbod 8b8b1905 2011-09-19T16:41:17 [util] Add hb-shape utility Like hb-view, but prints out buffer contents. The output format is kinda cryptic. Suggestions welcome.
Behdad Esfahbod 11e51993 2011-09-19T09:58:55 [util] Move font-size into view-options
Behdad Esfahbod 55aeb049 2011-09-16T02:08:36 Fix reading text from stdin
Behdad Esfahbod a75c1b12 2011-09-16T01:16:41 Move code around
Behdad Esfahbod 4451168e 2011-09-16T00:38:19 Fix binary stdin/stdout io in Windows Make --font-file accept "-" to mean stdin, and have it work in Windows too!
Behdad Esfahbod 639b5957 2011-09-15T18:09:49 Minor
Behdad Esfahbod f7e2ef74 2011-09-15T17:52:00 [hb-view] Make print to stdout work in Windows Apparently there's no equivalent to "/dev/stdout", so write using stdio to be able to output to stdout.
Behdad Esfahbod b9b10ad7 2011-09-13T13:30:39 [util] Refactor hb-view completely Now we can use the same code to do other utils...
Behdad Esfahbod bc4b07b0 2011-09-08T17:08:32 More reshuffling
Behdad Esfahbod 516857eb 2011-09-08T16:50:24 [util] Simplify more
Behdad Esfahbod 4f4b114a 2011-09-08T16:49:02 [util] Move code around
Behdad Esfahbod 90e312cb 2011-09-08T16:42:37 [util] Move code around
Behdad Esfahbod 109cb382 2011-09-08T16:00:04 [util] Further refactor option parsing
Behdad Esfahbod 97796453 2011-08-15T19:03:43 Fix falloffs of the GOption conversion
Behdad Esfahbod 3bb300ee 2011-08-11T11:54:31 Refactor hb-view code