Ebrahim Byagowi
159ddb8729
Treat - just as /dev/stdin and remove one extra file reader ( #1065 )
6 years ago
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.
7 years ago
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.
7 years ago
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.
7 years ago
Ebrahim Byagowi
eaf649450a
Resolve clang's conditional-uninitialize warnings
7 years ago
Ebrahim Byagowi
ce17340b23
Add hb_blob_create_from_file, a new API ( #926 )
7 years ago
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
7 years ago
David Corbett
8269791900
Allow trailing non-numeric chars in --unicodes
7 years ago
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
7 years ago
Garret Rieger
0c0fe2ff82
[subset] Move util/generated-unicode-ranges.py to src/gen-unicode-ranges.py
7 years ago
Garret Rieger
ddc4f2b9fc
[subset] Add python util that was used to generated hb-ot-os2-unicode-ranges.hh
7 years ago
Ebrahim Byagowi
bb82f01383
[aat] trak sanitization
7 years ago
Ebrahim Byagowi
4f6f7c3b22
[util] Implement ppem/ptem on hb-{shape,view} ( #811 )
7 years ago
Rod Sheeter
74e0c13a4a
[subset] drop hint tables if so flagged. Still need to dump glyf instructions.
7 years ago
Rod Sheeter
0bd100e144
[subset] add --hinting flag
7 years ago
Behdad Esfahbod
9046e92442
[subset] Rename constructor to hb_subset_input_create_or_fail()
...
To signify that unlike rest of library, returns nullptr on failure.
7 years ago
Behdad Esfahbod
d5b33f2fe1
[subset] hb_subset_input_t changes
7 years ago
Behdad Esfahbod
70b06cc6e7
More fixes
7 years ago
Behdad Esfahbod
4011d885b7
[util] Remove use of ssize_t which was failing on MSVC
7 years ago
Behdad Esfahbod
d0f3e7f597
[util] Use setlinebuf() if present
...
To work around mysterious bug on OS X.
Fixes https://github.com/harfbuzz/harfbuzz/issues/727
7 years ago
Rod Sheeter
8431c38cdc
remove output noise
7 years ago
Behdad Esfahbod
194140d3f3
[util] Minor
7 years ago
Behdad Esfahbod
af02812fc5
[subset] Change hb_subset API to remove hb_subset_face_t
7 years ago
Rod Sheeter
6c52d94fd1
capture the set of codepoints passed by --unicodes
7 years ago
Garret Rieger
7481f0ce21
Add codepoints to subset input.
7 years ago
Ebrahim Byagowi
70e13ade81
[subset] Fix Windows issue on endlines ( #756 )
7 years ago
Garret Rieger
2ea228935d
ssize_t -> size_t
7 years ago
Garret Rieger
c25898eb54
Switch to fopen() instead of open() in subset test. open wasn't compiling on windows.
7 years ago
Garret Rieger
fc04f11ce1
Rename HB_SUBSET_sources -> HB_SUBSET_CLI_sources to match what cmake is looking for.
7 years ago
Garret Rieger
e428f7b1c2
Wrap unistd.h include in ifdef.
7 years ago
Behdad Esfahbod
ae39fc8171
[subset] Build hb-subset into separate libharfbuzz-subset.so
7 years ago
Behdad Esfahbod
eac20e4595
[subset] Minor
7 years ago
Rod Sheeter
edcd3b80e9
Actually call hb_subset
7 years ago
Garret Rieger
f83a43b561
Add CMake configuration for all of the new subsetting code.
7 years ago
Garret Rieger
5bc0cda179
Add missing unistd header to hb-subset.
7 years ago
Garret Rieger
058b1260ad
Re-write hb-subset utility to use main-font-text driver.
7 years ago
Garret Rieger
ede84ffa42
Whitespace
7 years ago
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
7 years ago
Rod Sheeter
9ccb8366f6
Start to sketch APIs for subsetting
7 years ago
Behdad Esfahbod
4c4a9fc861
Typo
...
Fixes https://github.com/harfbuzz/harfbuzz/issues/711
7 years ago
Behdad Esfahbod
7c32e01d04
Minor
7 years ago
Behdad Esfahbod
746a37d5bd
[util] Replace setlinebuf
7 years ago
Behdad Esfahbod
ff2083c53e
[util] Set stdio files to line buffering
...
So we can stream lines to hb-shape and read output.
7 years ago
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.
7 years ago
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.
7 years ago
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
7 years ago
Behdad Esfahbod
7b837e20d2
[util] Add TODO item
7 years ago
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
7 years ago
Behdad Esfahbod
bb7cc4eada
Minor
7 years ago
Behdad Esfahbod
17f40b7cad
Include hb-private.hh more consistently
...
Part of fixing https://github.com/behdad/harfbuzz/issues/585
7 years ago