Behdad Esfahbod
5bc28b5f68
Optimize positioning for when h_origin is nil
9 years ago
Behdad Esfahbod
762770c964
Add font->has_...() to check for individual nil font funcs
...
Hopefully this wouldn't break any compiler. There was some magic
moments to getting this to compile...
9 years ago
Behdad Esfahbod
88e9a9bcae
Minor reshaping of hb_font_funcs_t implementation
...
In anticipation of further changes. No functional changes.
9 years ago
Behdad Esfahbod
a6a7715bac
Comments
9 years ago
Behdad Esfahbod
6c48ec830f
[ot] Remove font funcs that do nothing
9 years ago
Behdad Esfahbod
75ea2daa1d
[ot] Port ot font funcs to allocated object
9 years ago
Behdad Esfahbod
44f8275080
[ft] Remove font funcs that do nothing
9 years ago
Behdad Esfahbod
7918c261ef
[ft] Port ft font funcs to allocated object
9 years ago
Behdad Esfahbod
da29b43794
Separate nil font-funcs from parent-peeking font-funcs
...
API change: all fonts created with hb_font_create() now inherit from
(ie have parent) hb_font_get_empty().
9 years ago
Behdad Esfahbod
bee901b38e
Optimize positioning direction calculations
...
It makes the binary smaller AND faster. Yumm!
9 years ago
Behdad Esfahbod
e3e4bb011a
Don't do fractions if buffer is ASCII-only
9 years ago
Behdad Esfahbod
6986208ba3
Optimize runs without Default_Ignorable's
...
Now that we have a buffer-wide scratch flags facility, use it to
optimize away a few passes.
9 years ago
Behdad Esfahbod
14c2de3218
Limit max edits during sanitize to 8
...
Used to be 100. If a tabe needs more than one or two edits, it's
probably completely bogus...
Might help with speeding up fuzzing for
https://github.com/behdad/harfbuzz/issues/157
9 years ago
Behdad Esfahbod
9cbc39aef9
Minor
9 years ago
Behdad Esfahbod
52e6c4e158
If font doesn't support U+2011, fall back to U+2010
...
Test passes now.
9 years ago
Behdad Esfahbod
75483aafa6
Untangle if/else waterfall
9 years ago
Behdad Esfahbod
04fd8517f8
Add tests for hyphen fallback
...
U+2011 is <noBreak> equivaent of U+2010, so we should do the fallback
for it. Currently fails.
9 years ago
Behdad Esfahbod
550417117d
[test] Drop hintings when subsetting fonts to record
9 years ago
Behdad Esfahbod
49ef630936
Adjust the width of various spaces if font does not cover them
...
See discussion here:
81ef4f407d
There's no way to disable this fallback, but I don't think it would
be needed. Let's hope for the best!
Fixes https://github.com/behdad/harfbuzz/issues/153
9 years ago
Behdad Esfahbod
aa7044de0c
Generalize flags types
9 years ago
Behdad Esfahbod
7793aad946
Normalize various spaces to space if font doesn't support
...
This resurrects the space fallback feature, after I disabled
the compatibility decomposition. Now I can release HarfBuzz
again without breaking Pango!
It also remembers which space character it was, such that later
on we can approximate the width of this particular space
character. That part is not implemented yet.
We normalize all GC=Zs chars except for U+1680 OGHA SPACE MARK,
which is better left alone.
9 years ago
Behdad Esfahbod
8b3c7f9ede
[test] Support recording multiple lines of text in record-test.sh
9 years ago
Behdad Esfahbod
8565839480
Protect against possible invalid-memory access after OOM
9 years ago
Behdad Esfahbod
4cc80bed25
Fix typo!
...
Ouch! Fortunately that function was unused.
9 years ago
Behdad Esfahbod
9ac4b9656d
Add Unicode space category
...
Unused so far.
9 years ago
Behdad Esfahbod
8249ec3f86
Make top-byte of unicode_props available to be used differently per-GC
9 years ago
Behdad Esfahbod
cc5d3a3388
Towards using top-byte of unicode-props for more things
9 years ago
Behdad Esfahbod
2f38dde5a1
Add _hb_glyph_info_is_unicode_mark()
...
Unused right now.
9 years ago
Behdad Esfahbod
90d75f93bb
Tighten ccc-setting a bit and document it
9 years ago
Behdad Esfahbod
2f0dfd43cd
Fix test expectation
9 years ago
Behdad Esfahbod
df698f3299
[ot-font] Fix hmtx table length checking, *again*
...
Exactly the same problem that I fixed in
63ef0b41dc
I rewrote the table checking yesterday in
67f8821fb2
and introduced the exact same issue again. :(
Good thing we have ongoing fuzzing going now. Was discovered
immediately by libFuzzer. Thanks kcc!
https://github.com/behdad/harfbuzz/issues/139#issuecomment-153449473
Fixes https://github.com/behdad/harfbuzz/issues/156
9 years ago
Behdad Esfahbod
3530cc2d7c
[util] Fix option-parsing leaks
9 years ago
Behdad Esfahbod
642135f3b2
[util] In --debug mode, duplicate font data
...
This has the effect that the font data will end up in a memory
section malloc()ed exactly to its size. This gives us better
valgrind detection of out-of-bounds access.
Previously, the font data was placed in a mmap()ed section or
GString-allocated area, which didn't have proper protections
at the end when running under valgrind.
9 years ago
Behdad Esfahbod
ed2024ef93
[perf] Micro-optimize
9 years ago
Behdad Esfahbod
76a5310a83
Remove irrelevant comment
...
I tried moving the is_default_ignorable() function to an INTERNAL
function. That made the binary size grow by 5k AND things got a
tad bit slower!
9 years ago
Behdad Esfahbod
8259669fbd
Minor
9 years ago
Behdad Esfahbod
9382c471ea
Combine unicode_props0/1 into a uint16
...
Slightly faster. In prep for more changes.
9 years ago
Behdad Esfahbod
7127718545
[perf] Only call combining_class() for marks
...
Saves some time. Also preparing for reusing the ccc byte for other stuff.
9 years ago
Behdad Esfahbod
5ba450407b
Make max context-length and max nesting level configurable
...
...at compile time.
9 years ago
Behdad Esfahbod
67f8821fb2
[ot] Make bad-hmtx handling match FreeType
...
Also route fuzzing-related tests through hb-ot-font, to reduce dependency
on FreeType behavior for badly-broken fonts. Fixes failing test with
FreeType master.
9 years ago
Behdad Esfahbod
672ca3b4e6
Use templates for making sure expression is constant
9 years ago
Behdad Esfahbod
5c8174eda3
Update comments for removal of compat decompositions
9 years ago
Behdad Esfahbod
f679970040
Disable compatibility decomposition usage during normalization
...
Fixes https://github.com/behdad/harfbuzz/issues/152
9 years ago
Behdad Esfahbod
ce889189c1
Fix two more -Wshadow warnings
...
https://bugzilla.mozilla.org/show_bug.cgi?id=1215894
9 years ago
Behdad Esfahbod
4a6b1eedbb
Fix one more -Wshadow warning
...
https://bugzilla.mozilla.org/show_bug.cgi?id=1215894
9 years ago
Behdad Esfahbod
6f932bc8f9
Fix a few more -Wshadow-local warnings
...
https://bugzilla.mozilla.org/show_bug.cgi?id=1215894
9 years ago
Behdad Esfahbod
b90cb366d7
Fix one -Wshadow-compatible-local warning
...
From https://bugzilla.mozilla.org/show_bug.cgi?id=1215894
9 years ago
Behdad Esfahbod
50e5750bd8
Avoid unnecessary cast to 64-bit
...
Fixes https://github.com/behdad/harfbuzz/issues/146
Or I think it should.
9 years ago
Behdad Esfahbod
305d2fbf5a
Add HB_FALLTHROUGH
...
Borrowed from https://bugzilla.mozilla.org/show_bug.cgi?id=1215411
9 years ago
Ebrahim Byagowi
f35b3e931d
Add a prototype of DirectWrite as a shaping backend
9 years ago