Commit Graph

5321 Commits

Author SHA1 Message Date
Behdad Esfahbod b314c4e9ab [font] Add get_nominal_glyphs() callback (note the plural)
Unused as of now.  To be wired up to normalizer, which would remove
overhead and allow hb-ot-font initialization to become a no-op, so
we can enable it by default.
2018-10-09 09:43:44 -04:00
Behdad Esfahbod ca6a317012 Minor 2018-10-09 09:43:44 -04:00
Chun-wei Fan 8e4ad1d7a0 builds: Fix and clean up MSVC DLL builds
Instead of passing a CFLAG/CXXFLAG to define HB_EXTERN, define it
directly in src/hb.hh as __declspec(dllexport) extern when we are
building HarfBuzz as DLLs on Visual Studio.  Define HB_INTERNAL
as nothing without defining HB_NO_VISIBILITY when building HarfBuzz as
DLLs to avoid linker errors on Visual Studio builds.

Also "install" harfbuzz-subset.dll into $(PREFIX)\bin as the
hb-subset utility will depend on that DLL at runtime, when HarfBuzz is
built as DLLs.  Since it consists of private APIs that are subject to
change, we do not install its headers nor .lib file.
2018-10-09 09:43:36 -04:00
Behdad Esfahbod e640f3a6b1 Another old bot fix 2018-10-09 08:28:07 -04:00
Behdad Esfahbod e4f27f368f Try fixing older bots 2018-10-09 08:20:10 -04:00
Behdad Esfahbod bee93e2697 Add const to get_*_advances API
Ouch!
2018-10-09 08:02:25 -04:00
Behdad Esfahbod cc126f2817 Minor 2018-10-09 01:10:15 -04:00
Behdad Esfahbod b2fbe55b82 [icu] Unbreak 2018-10-09 01:07:36 -04:00
Behdad Esfahbod a52bc039c3 Properly remove deprecated stuff 2018-10-09 00:56:33 -04:00
Behdad Esfahbod fc50916589 Remove deprecated decompose_compatibility stuff 2018-10-09 00:39:42 -04:00
Behdad Esfahbod eed737f672 Remove deprecated eastasian_width 2018-10-09 00:37:10 -04:00
Behdad Esfahbod 47030b1855 [ft/ot] Remove implementation of deprecated kerning funcs 2018-10-09 00:30:45 -04:00
Behdad Esfahbod 977c8a8e5c [kern] Minor 2018-10-09 00:22:08 -04:00
Behdad Esfahbod ed5cfa42c7 [kern] Minor 2018-10-09 00:20:35 -04:00
Behdad Esfahbod d219f899f4 Deprecate font kern API 2018-10-09 00:01:09 -04:00
Behdad Esfahbod a51958819f Apply TrueType/OpenType kern table when GPOS kern feature is not available
Fixes https://github.com/harfbuzz/harfbuzz/issues/250
2018-10-08 23:57:45 -04:00
Behdad Esfahbod 09ad2613c8 Separate fallback kern vs mark positioning 2018-10-08 23:30:24 -04:00
Behdad Esfahbod 3c23ff9b7c [kern] Add kerning driver to TT kern table 2018-10-08 23:26:26 -04:00
Behdad Esfahbod 683c3a9533 [kern] Abstract away kerning machine 2018-10-08 23:09:48 -04:00
Behdad Esfahbod fb4f438381 Add HB_DEPRECATED
Fixes https://github.com/harfbuzz/harfbuzz/issues/1232
2018-10-08 22:44:16 -04:00
Behdad Esfahbod 80e3102b8a [kerx] Process coverage flags 2018-10-08 22:41:08 -04:00
Behdad Esfahbod 26d7305da7 Deprecate decompose_compatibility stuff 2018-10-08 22:31:35 -04:00
Behdad Esfahbod 42b51eee54 Deprecate eastasian_width stuff 2018-10-08 22:26:39 -04:00
Behdad Esfahbod 286a45641f Minor 2018-10-08 16:41:08 -04:00
Behdad Esfahbod c0d3bf1baf Minor 2018-10-08 16:32:44 -04:00
Behdad Esfahbod 1a5a3325a2 [kerx] Minor 2018-10-07 23:08:39 -04:00
Behdad Esfahbod d62b4011cc [kern] Shout less 2018-10-07 22:58:06 -04:00
Behdad Esfahbod c6bb3a588f [kerx] Clean up Format2 2018-10-07 22:52:53 -04:00
Behdad Esfahbod 8aa83d97f9 [kern/kerx] Fix Format2 offsetting
"The values in the right class table are stored pre-multiplied by the
number of bytes in a single kerning value, and the values in the left
class table are stored pre-multiplied by the number of bytes in one
row. This eliminates needing to multiply the row and column values
together to determine the location of the kerning value. The array can
be indexed by doing the right- and left-hand class mappings, adding the
class values to the address of the array, and fetching the kerning
value to which the new address points."
2018-10-07 22:45:15 -04:00
Behdad Esfahbod ed2a404272 [kerx] Clean up Format0 2018-10-07 22:37:20 -04:00
Behdad Esfahbod 4c3b19d52e Support HBUINT32 BinSearchArrayOf 2018-10-07 22:30:42 -04:00
Behdad Esfahbod 456a68c506 Move code 2018-10-07 22:28:45 -04:00
Behdad Esfahbod 3515c8b187 [aat] Rename 2018-10-07 22:27:00 -04:00
Behdad Esfahbod e42cd58c99 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
2018-10-07 20:47:30 -04:00
Behdad Esfahbod 2a5cb37fdb Revert "[morx] Fix MORX-35"
This reverts commit f62f6e90ad.
2018-10-07 20:37:15 -04:00
Behdad Esfahbod 14ebf8af0c [buffer] Improve shift_forward()
"Improve" is a strong word in this case though, I understand.
2018-10-07 20:35:06 -04:00
Behdad Esfahbod f62f6e90ad [morx] Fix MORX-35
Fixes https://github.com/harfbuzz/harfbuzz/issues/1224
2018-10-07 18:52:48 -04:00
Behdad Esfahbod 94368855c6 Remove some code
We use scratch-flags to short-circuit this function.  No need for previous
early loop.
2018-10-07 18:52:48 -04:00
Behdad Esfahbod fdce1e1543 [kerx] Clean up kerx and KerxTable structures 2018-10-07 14:01:33 -04:00
Behdad Esfahbod 71b65eb27d 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
2018-10-07 18:43:26 +02:00
Behdad Esfahbod 13da3be0b3 [ot-font] Load hmtx/vmtx lazily
Since we have get_*_advanes() API now, the overhead is once per shape,
not once per glyph.

Only cmap is warmed-up at set_funcs() time now.
2018-10-07 18:25:41 +02:00
Behdad Esfahbod 856db4c918 Minor 2018-10-07 18:21:15 +02:00
Behdad Esfahbod b2e398c077 [coretext] Fix OS X check
Fixes https://github.com/harfbuzz/harfbuzz/issues/1230
2018-10-07 16:31:33 +02:00
Behdad Esfahbod 7ee50af836 [morx] Fix memory access issues with unsafe_to_break 2018-10-06 21:31:44 +02:00
Behdad Esfahbod 0816a54978 [uniscribe/coretext] Fix for previous change 2018-10-06 02:40:57 +02:00
Behdad Esfahbod 341206eb60 [vector] Make hb_vector_t relocatable / nestable
Ugly, but...
Fixes https://github.com/harfbuzz/harfbuzz/issues/1227
2018-10-05 18:39:48 +02:00
Behdad Esfahbod 5469d80707 Add hb_vector_t::fini_deep () 2018-10-05 18:21:08 +02:00
Behdad Esfahbod 4831e615d1 [morx] Fix memory access issue
If buffer was enlarged, info was being outdated.

Fixes https://github.com/harfbuzz/harfbuzz/issues/1225
2018-10-05 18:14:13 +02:00
Behdad Esfahbod a62f37d6fa Change vendor features from Harf/Buzz to HARF/BUZZ
a01194aaf4 (commitcomment-30772041)

"The tag space of tags consisting of four uppercase letters (A-Z) with no punctuation,
spaces, or numbers, is reserved as a vendor space. Font vendors may use such tags to
identify private features."
2018-10-05 02:49:29 +02:00
Behdad Esfahbod a01194aaf4 Enable two OpenType features, 'Harf' and 'Buzz'
One early, before script-specific features, one late, after.  Allows font
developers to detect us and behave differently if needed.
2018-10-04 13:00:37 +02:00
Behdad Esfahbod 14ff3cbe0f Apply morx if there's no GSUB! 2018-10-04 11:34:21 +02:00
Behdad Esfahbod 3417037eb1 [aat] Add +hb_aat_layout_has_substitution 2018-10-04 11:17:19 +02:00
Sascha Brawer 7810bb1a59 [morx] Only insert glyphs at mark when a mark has been set before
This reverts commit f4072e8cb8.
https://github.com/harfbuzz/harfbuzz/issues/1195
2018-10-04 10:29:23 +02:00
Ebrahim Byagowi 5de2d9cdbd
Minor, fix double-promotion warnings (#1221) 2018-10-04 02:14:18 +03:30
mhosken e4e74c2751 Update Graphite API to latest (#1215) 2018-10-03 23:03:26 +03:30
Behdad Esfahbod b710ea4fde Clean Fitzpatrick hack 2018-10-03 21:17:59 +02:00
Behdad Esfahbod 95e5f1ae69 Unbreak Fitzpatrick
Fixes https://github.com/harfbuzz/harfbuzz/issues/1159
2018-10-03 21:11:40 +02:00
Behdad Esfahbod 03fb6dd4c7 Rewrite grapheme-formation in terms of new work
Also, don't attach ZWNJ to previous cluster.  Closer to Unicode graphemes.
2018-10-03 21:11:40 +02:00
Behdad Esfahbod 68106b1d9b Minor 2018-10-03 21:11:40 +02:00
Behdad Esfahbod 06922acbc4 Fix distcheck 2018-10-03 20:19:42 +02:00
Behdad Esfahbod 4eea2e279b [thai] Set continuation on decomposed nikhahit 2018-10-03 20:19:42 +02:00
Behdad Esfahbod 8edc91022c [indic] Reset continuation on inserted dottedcircle 2018-10-03 20:19:42 +02:00
Behdad Esfahbod 2a6f15213e [buffer] Inline some more 2018-10-03 20:19:42 +02:00
Behdad Esfahbod 6f39c22029 Add code 2018-10-03 20:19:42 +02:00
Behdad Esfahbod 19d50aa262 [indic] Simplify dottedcircle 2018-10-03 20:19:42 +02:00
Behdad Esfahbod 3b78318510 [emoji] Mark emoji contination sequences as continuation
This adds a new grapheme bit.  Not used yet.

Part of https://github.com/harfbuzz/harfbuzz/issues/1159
2018-10-03 20:19:42 +02:00
Behdad Esfahbod 123326e20a Dotted-circle all marks, not just non-spacing, at text beginning 2018-10-03 20:19:42 +02:00
Behdad Esfahbod 674560cf24 Fix build 2018-10-03 19:10:28 +02:00
Behdad Esfahbod 45e55f7080 [indic] Fix clang everything 2018-10-03 18:45:27 +02:00
Behdad Esfahbod 4df02e3240 Minor 2018-10-03 18:45:27 +02:00
Behdad Esfahbod 1e8f195b96 [emoji] Add emoji Extended_Pictographic table and function
Part of https://github.com/harfbuzz/harfbuzz/issues/1159

.
2018-10-03 18:45:27 +02:00
Behdad Esfahbod 1dc601b04a [os2] Minor rename/shuffle 2018-10-03 18:45:27 +02:00
Behdad Esfahbod df32eaae42 [indic] Disallow vowel mark combinations that spoof other vowel marks
Fixes https://github.com/harfbuzz/harfbuzz/issues/1019

New numbers:

BENGALI: 353725 out of 354188 tests passed. 463 failed (0.130722%)
DEVANAGARI: 707261 out of 707394 tests passed. 133 failed (0.0188014%)
GUJARATI: 366353 out of 366457 tests passed. 104 failed (0.0283799%)
GURMUKHI: 60729 out of 60747 tests passed. 18 failed (0.0296311%)
KANNADA: 951300 out of 951913 tests passed. 613 failed (0.0643966%)
MALAYALAM: 1048136 out of 1048334 tests passed. 198 failed (0.0188871%)
ORIYA: 42327 out of 42329 tests passed. 2 failed (0.00472489%)
SINHALA: 271596 out of 271847 tests passed. 251 failed (0.0923313%)
TAMIL: 1091754 out of 1091754 tests passed. 0 failed (0%)
TELUGU: 970555 out of 970573 tests passed. 18 failed (0.00185457%)

Devanagari regressed because Uniscribe doesn't enforce the full set.

Tests added with the *-vowel-letters.txt files in tree and Noto fonts.
2018-10-03 15:53:28 +02:00
Behdad Esfahbod 1b8d5e9991 [thai] Minor 2018-10-03 15:31:33 +02:00
Behdad Esfahbod 0dd9101fd0 Minor 2018-10-03 15:31:33 +02:00
Behdad Esfahbod 9c4ffd10c4 Minor 2018-10-03 15:31:33 +02:00
HinTak bd1be8738f Missing colon for gobject annotation
There should be a colon separating "(transfer full)" and the rest. Warned by g-ir-scanner.
2018-10-03 15:31:26 +02:00
Behdad Esfahbod 75114e01d2 [use] Add Halant_Or_Vowel_Modifier category
Fixes https://github.com/harfbuzz/harfbuzz/issues/1102
2018-10-03 12:30:23 +02:00
Ebrahim Byagowi 6353cc1f83
[circleci] Fix some of warnings from clang-everything bot (#1211)
* -Wshift-sign-overflow
* -Wmissing-prototypes
2018-10-02 21:39:19 +03:30
Behdad Esfahbod fef7af1e22 [tibetan] Remove unused Tibetan shaper 2018-10-02 18:46:13 +02:00
Behdad Esfahbod 32a438166f [tibetan] Route Tibetan through USE
Fixes https://github.com/harfbuzz/harfbuzz/pull/933
https://github.com/harfbuzz/harfbuzz/issues/1012

Tibetan failures go from 0 to 2:

TIBETAN: 208467 out of 208469 tests passed. 2 failed (0.000959375%)
2018-10-02 18:44:57 +02:00
Behdad Esfahbod 77792187be [khmer] Remove unused khmer_position() 2018-10-02 18:20:16 +02:00
Behdad Esfahbod 5101abd42f [indic/use] Factor common expressions in ragel machine
No machine change.
2018-10-02 17:49:06 +02:00
Behdad Esfahbod 6f457f8370 [indic] Minor flip grammar around
No behavior change.
2018-10-02 17:46:27 +02:00
Behdad Esfahbod 40d5d19d5b [ragel] Use ts/te (token-start / token-end) instead of manual tracking 2018-10-02 17:04:05 +02:00
Behdad Esfahbod 9efddb9de8 Treat a base+mark... ligature as base, not ligature
Fixes https://github.com/harfbuzz/harfbuzz/issues/746
2018-10-02 16:05:26 +02:00
Behdad Esfahbod 3cca978723 Move code around 2018-10-02 15:02:35 +02:00
Behdad Esfahbod 0a371fee4d Minor 2018-10-02 14:48:39 +02:00
Behdad Esfahbod 94d15528f8 Minor 2018-10-02 14:45:09 +02:00
Behdad Esfahbod 729f634728 Disable joiner-skipping when looking back for base to attach mark to
Fixes https://github.com/harfbuzz/harfbuzz/issues/1189
2018-10-02 14:41:31 +02:00
Behdad Esfahbod c36f3f5bef [arabic] Use manual-zwj instead of flipping joiners 2018-10-02 14:36:47 +02:00
Behdad Esfahbod 48c513fec9 Minor 2018-10-02 14:19:34 +02:00
Behdad Esfahbod cca757ae56 Minor 2018-10-02 14:10:26 +02:00
Behdad Esfahbod 96eca87f89 Move things 2018-10-02 13:24:40 +02:00
Behdad Esfahbod 588a4ac8bc Rename 2018-10-02 13:16:43 +02:00
Behdad Esfahbod 10b6c7c638 Minor include cleanup 2018-10-02 13:11:18 +02:00
Behdad Esfahbod 1d1734e985 Shuffle code around 2018-10-02 13:04:05 +02:00
Khaled Hosny d27e5ec3a2 Skip BOM in the Python sample file
Fixes https://github.com/harfbuzz/harfbuzz/issues/1208
2018-10-02 08:25:29 +02:00
HinTak f9ea3dc4c6 Missing "out" indicator (#1209)
Missing "out" indicator. Affect gobject introspection.
2018-10-02 09:13:06 +03:30
Ebrahim Byagowi f72b748371
[circleci] Fix "msan" and "everything" bots (#1205) 2018-10-02 00:16:08 +03:30