src


Log

Author Commit Date CI Message
David Corbett 2c7d4db7 2017-12-29T20:19:05 Deprecate obsolete functions `hb_ot_tags` replaces `hb_ot_tags_from_script` and `hb_ot_tag_from_language`. `hb_ot_layout_table_select_script` replaces `hb_ot_layout_table_choose_script`. `hb_ot_layout_script_select_language` replaces `hb_ot_layout_script_find_language`.
David Corbett 91067716 2017-12-08T11:21:14 Refactor the selection of script and language tags The old hb-ot-tag.cc functions, `hb_ot_tags_from_script` and `hb_ot_tag_from_language`, are now wrappers around a new function: `hb_ot_tags`. It converts a script and a language to arrays of script tags and language tags. This will make it easier to add new script tags to scripts, like 'dev3'. It also allows for language fallback chains; nothing produces more than one language yet though. Where the old functions return the default tags 'DFLT' and 'dflt', `hb_ot_tags` returns an empty array. The caller is responsible for using the default tag in that case. The new function also adds a new private use subtag syntax for script overrides: "x-hbscabcd" requests a script tag of 'abcd'. The old hb-ot-layout.cc functions,`hb_ot_layout_table_choose_script` and `hb_ot_layout_script_find_language` are now wrappers around the new functions `hb_ot_layout_table_select_script` and `hb_ot_layout_script_select_language`. They are essentially the same as the old ones plus a tag count parameter. Closes #495.
David Corbett a03f5f4d 2017-12-28T22:59:29 Replace "ISO 639" with "BCP 47" `hb_language_from_string` accepts not only ISO 639 but also BCP 47. Not all ISO 639 codes are valid BCP 47 tags but the function does not accept overlong language subtags anyway.
Behdad Esfahbod 0b9d60e1 2018-10-11T13:26:58 [aat] Apply kerx if GPOS kern was not applied Ned tells me this is what Apple does.
Behdad Esfahbod b59a428a 2018-10-11T13:24:17 Minor
Behdad Esfahbod 04f72e89 2018-10-11T11:25:07 [trak] Implement extrapolation This concludes trak, as well as AAT shaping support!
Behdad Esfahbod d6a12dba 2018-10-11T11:10:06 [trak] Fix, and hook up Works beautifully! Test coming.
Behdad Esfahbod 3d7dea6d 2018-10-11T10:32:08 [trak] Handle nSizes=0 and 1
Behdad Esfahbod 451f3de5 2018-10-11T10:30:32 [trak] Fix counting
Behdad Esfahbod a5be380c 2018-10-11T10:29:02 [trak] More
Behdad Esfahbod d06c4a86 2018-10-11T10:22:01 [trak] Only adjust around first glyph Assumes graphemes only have one base glyph.
Behdad Esfahbod 071a2cbc 2018-10-11T10:18:46 [trak] Clean up
Behdad Esfahbod fbbd926d 2018-10-11T01:22:29 [kerx] Implement Format4 action_type=1 contour-point-based attachment Untested. This concludes kerx table support!
Behdad Esfahbod b6bc0d4f 2018-10-11T01:17:57 [kerx] Implement Format4 action_type=2 coordinate-based attachment Untested.
Behdad Esfahbod 1622ba59 2018-10-11T01:14:18 [kerx] Implement Format4 'ankr'-based mark attachment Tested with Kannada MN: $ HB_OPTIONS=aat ./hb-shape Kannada\ MN.ttc -u 0CCD,0C95,0CD6 [kn_ka.vattu=0+230|kn_ai_length_mark=1@326,0+607]
Behdad Esfahbod 7bb4da7d 2018-10-11T00:52:07 [aat] Wire up 'ankr' table to apply context
Behdad Esfahbod 28f0367a 2018-10-11T00:12:49 [kerx] Flesh out Format4 Doesn't apply actions yet.
Behdad Esfahbod 947962a2 2018-10-10T23:07:03 [ankr] Implement table access
Behdad Esfahbod 7281cb3e 2018-10-10T22:56:52 [ankr] Start fixing
Behdad Esfahbod 34caadc5 2018-10-10T22:17:07 Ugh. Re-enable accidentally disabled GPOS
Behdad Esfahbod f7c45bc3 2018-10-10T22:15:13 [kerx] Allow granularly disabling kerning
Behdad Esfahbod 2b72c4b6 2018-10-10T21:53:14 [kerx] Comment
Behdad Esfahbod 9f450f07 2018-10-10T21:46:58 [kerx] Make Format1 work Tested using Kannada MN: $ HB_OPTIONS=aat ./hb-shape Kannada\ MN.ttc -u 0C95,0CCd,C95,CCD [kn_ka.virama=0+1299|kn_ka.vattu=0+115|_blank=0@-115,0+385] $ HB_OPTIONS=aat ./hb-shape Kannada\ MN.ttc -u 0C95,0CCd,C95,CCD --features=-kern [kn_ka.virama=0+1799|kn_ka.vattu=0+230|_blank=0+0] I don't see the GPOS table in the font do the same. ¯\_(ツ)_/¯
Behdad Esfahbod 504cb68f 2018-10-10T21:29:46 Disable mark advance zeroing as well as mark fallback positioning if doing kerx
Behdad Esfahbod 84967537 2018-10-10T21:18:37 [kerx] Implement Format1 Untested.
Behdad Esfahbod c9165f54 2018-10-10T20:43:21 [kerx] More UnsizedArrayOf<>
Behdad Esfahbod ca54eba4 2018-10-10T20:41:16 [kerx] Fix bound-checking error introduced a couple commits past
Behdad Esfahbod 339036dd 2018-10-10T20:37:22 [kerx] Start fleshing out Format1
Behdad Esfahbod ab1f30bd 2018-10-10T20:10:20 [kerx] Implement Format6 Untested. The only Apple font shipping with this format is San Francisco fonts that use this for their kerx variation tables, which we don't support.
Behdad Esfahbod c9a2ce9e 2018-10-10T20:00:44 [kerx] Move bounds-checking to subtable length itself
Behdad Esfahbod 22955b23 2018-10-10T19:58:20 [kerx] Start fleshing out Format6
Behdad Esfahbod f6aaad9b 2018-10-10T19:20:06 [kerx] When rejecting variable kerning, also check for tupleCount
Behdad Esfahbod 7ed5366d 2018-10-10T19:11:30 [kerx] No-op Tested that Format0 works with Kannada MN font: $ make -j5 lib -s && HB_OPTIONS=aat ./hb-shape Kannada\ MN.ttc -u 0C95,0CC2 [kn_ka=0+1000|kn_matra_uu=0@-30,0+1345] $ make -j5 lib -s && HB_OPTIONS=aat ./hb-shape Kannada\ MN.ttc -u 0C95,0CC2 --features=-kern [kn_ka=0+1030|kn_matra_uu=0+1375] Note that GPOS does the same with 'dist' feature, and applies the whole difference to the same glyph: $ make -j5 lib -s && ./hb-shape Kannada\ MN.ttc -u 0C95,0CC2 [kn_ka=0+970|kn_matra_uu=0+1375] $ make -j5 lib -s && ./hb-shape Kannada\ MN.ttc -u 0C95,0CC2 --features=-dist [kn_ka=0+1030|kn_matra_uu=0+1375]
Behdad Esfahbod 7fa69e92 2018-10-10T19:02:32 Comment
Behdad Esfahbod 7e6e5bf6 2018-10-10T18:59:07 Fix option string matching
Behdad Esfahbod 5d34164d 2018-10-10T18:14:41 [kern/kerx] Fix offset base Disable kern Format2. Fix kerx Format2. Manually tested this with Tamil MN font and it works: $ HB_OPTIONS=aat ./hb-shape Tamil\ MN.ttc -u 0B94,0B95 [tgv_au=0+3435|tgc_ka=1@-75,0+1517] HB_OPTIONS=aat ./hb-shape Tamil\ MN.ttc -u 0B94,0B95 --features=-kern [tgv_au=0+3510|tgc_ka=1+1592]
Behdad Esfahbod 60f86d32 2018-10-10T18:10:05 [kerx] Don't loop over kerning subtables if kerning disabled
Behdad Esfahbod 38a7a8a8 2018-10-10T17:44:46 Allow HB_OPTIONS=aat to prefer AAT tables over OT Fixes https://github.com/harfbuzz/harfbuzz/issues/322
Behdad Esfahbod 44f09afd 2018-10-10T17:32:32 [kerx] Skip variation subtables
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 7727e737 2018-10-10T13:24:51 [kerx] Actually hook up, and fix crash
Behdad Esfahbod b3390990 2018-10-10T12:07:49 Add per-subtable set-digests This speeds up Roboto shaping by ~10%. I was hoping for more. Still, good defense against lookups with many subtables.
Behdad Esfahbod e78549ed 2018-10-10T11:54:48 Move apply down into subtables accel
Behdad Esfahbod 78c09bf2 2018-10-10T11:50:46 Move subtable array into lookup accel
Behdad Esfahbod 97e5913d 2018-10-10T11:41:05 Move more code
Behdad Esfahbod c8f2d933 2018-10-10T11:36:28 Move code In preparation to move add per-subtable set digests...
Behdad Esfahbod a03850a3 2018-10-10T10:57:28 Fix GPOS/kern interaction Oops. Was checking for kern feature in GSUB, not GPOS.
Behdad Esfahbod d1be805e 2018-10-10T10:49:45 More rewriting plan compile Hopefully more clear.
Behdad Esfahbod 961ab46b 2018-10-10T10:42:10 More reshuffle plan compile
Behdad Esfahbod 2091b509 2018-10-10T10:41:08 [kerx] Hook up to shaper
Behdad Esfahbod 8d00c39b 2018-10-10T10:18:39 [kern] Minor
Behdad Esfahbod e655fd38 2018-10-10T10:16:09 Apply TT or fallback kerning when GPOS does not have kern feature Previously we only did if there was no GPOS whatsoever. This applies to Arial, Times New Roman, etc in Win7. Was not kerning before. It is now.
Behdad Esfahbod 754cf440 2018-10-10T10:04:05 Minor
Behdad Esfahbod 0537a401 2018-10-09T23:35:07 [kerx] Comment
Behdad Esfahbod 362d3241 2018-10-09T23:27:00 [aat] Rename
Behdad Esfahbod 54c9ecb9 2018-10-09T23:18:19 [morx] Use subtable range for embedded sanitizer here as well
Behdad Esfahbod d35315cc 2018-10-09T23:17:32 [aat] Fixup recent commit For 329f2401082011007d9ce12b15ce0225cd267c57 max_ops is signed.
Behdad Esfahbod 948f59a1 2018-10-09T23:07:47 [kerx] Use subtable range for runtime checks
Behdad Esfahbod 329f2401 2018-10-09T23:02:53 [aat] Set embedded sanitizer max ops really high Since we consume it legitimately during shaping.
Behdad Esfahbod ad763074 2018-10-09T22:57:00 [kerx] Comment
Behdad Esfahbod db9600bb 2018-10-09T22:55:47 [kerx] Remove junk
Behdad Esfahbod 27db8594 2018-10-09T22:52:41 [kern/kerx] Adjust bounds check
Behdad Esfahbod c66f7f8c 2018-10-09T22:49:33 [kerx] Implement Format2 apply() Still, not hooked.
Behdad Esfahbod 4b461785 2018-10-09T22:46:30 Fix check
Behdad Esfahbod 4df8eb20 2018-10-09T22:46:12 [kern] Use kern subtable length for sanitizing in the accelerator
Behdad Esfahbod 8bff1d29 2018-10-09T22:39:31 [kern] Minor
Behdad Esfahbod 53e55945 2018-10-09T22:35:22 [kerx] Implement Format0 apply() Not hooked up to be called yet.
Behdad Esfahbod 60318f87 2018-10-09T22:25:53 Minor
Behdad Esfahbod 210f899a 2018-10-09T21:56:37 [kern] Sanitize 4 bytes, not 2
Behdad Esfahbod be2f148d 2018-10-09T16:24:50 [ft] Use mutex to lock access to FT_Face Makes our FT-backed hb_font_t safe to use from multiple threads. Still, the underlying FT_Face should NOT be used from other threads by client or other libraries. Maybe I add a lock()/unlock() public API ala PangoFT2 and cairo-ft. Maybe not.
Behdad Esfahbod d18c3c58 2018-10-09T16:07:55 [ft] Remove (probably) stale comment
Behdad Esfahbod 7003b601 2018-10-09T15:55:26 Minor
Behdad Esfahbod 07899435 2018-10-09T15:39:51 Install ot-funcs on newly created funcs **Finally**! Casual users can stop caring about font-funcs completely now, like they haven't been needing to care re unicode-funcs for a few years.
Behdad Esfahbod 55153553 2018-10-09T15:12:09 [ot-font] Don't pre-load cmap table Now that we have get_h_advances() and get_nominal_glyphs() implemented, the overhead of doing a proper atomic load would be once per run, NOT once per glyph. So, no need to pre-load the tables to avoid that overhead. As such, hb_ot_font_set_funcs() has become really cheap. Can *finally* make it be default font functions on all newly created fonts!
Behdad Esfahbod ec84460e 2018-10-09T15:07:04 [ot/ft] Implement get_nominal_glyphs() callback Some more measurable speedup. The recent commits' speedups are as follows: Testing with Roboto, ****when disabling kern and liga****: Before: FT --features=-kern,-liga user↦ 0m0.521s OT --features=-liga,-kern user↦ 0m0.568s After: FT --features=-liga,-kern user↦ 0m0.428s OT --features=-liga,-kern user↦ 0m0.470s So, 17% speedup. Note that FT callbacks are faster than OT these days since we added an advance cache to FT. I don't think the difference is enough to justify adding a cache to OT. When not disabling kern, the thing is three times slower, so the speedups are three times less impressive... Still, 5% not bad for a codebase that I otherwise thought is optimized out. Note that, because of this and other optimiztions in our main shaper, disabling kern and liga, the OT shaper is now *faster* than the fallback shaper. So, that's my recommendation to clients that need the absolute fastest...
Behdad Esfahbod e883f527 2018-10-09T14:50:57 Call get_nominal_glyphs() for runs of simple clusters at a time Even without FT or OT font funcs implementing get_nominal_glyphs(), there's measurable speedup.
Behdad Esfahbod 8008bca8 2018-10-09T14:38:23 Whitespace
Behdad Esfahbod 30c114ff 2018-10-09T14:37:08 Avoid sort and recompose stages if all clusters simple Even has measurable speedup...
Behdad Esfahbod 24382deb 2018-10-09T14:33:24 Rewrite main normalizer loop to isolate runs of simple clusters
Behdad Esfahbod b5371f18 2018-10-09T14:12:59 Inline decompose_cluster Towards separating the common case into its own loop.
Behdad Esfahbod b314c4e9 2018-10-09T09:23:51 [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.
Behdad Esfahbod ca6a3170 2018-10-09T09:06:07 Minor
Chun-wei Fan 8e4ad1d7 2018-07-25T18:12:34 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.
Behdad Esfahbod e640f3a6 2018-10-09T08:28:07 Another old bot fix
Behdad Esfahbod e4f27f36 2018-10-09T08:20:10 Try fixing older bots
Behdad Esfahbod bee93e26 2018-10-09T08:01:49 Add const to get_*_advances API Ouch!
Behdad Esfahbod cc126f28 2018-10-09T01:10:15 Minor
Behdad Esfahbod b2fbe55b 2018-10-09T01:07:36 [icu] Unbreak
Behdad Esfahbod a52bc039 2018-10-09T00:56:33 Properly remove deprecated stuff
Behdad Esfahbod fc509165 2018-10-09T00:39:42 Remove deprecated decompose_compatibility stuff
Behdad Esfahbod eed737f6 2018-10-09T00:33:30 Remove deprecated eastasian_width
Behdad Esfahbod 47030b18 2018-10-09T00:30:45 [ft/ot] Remove implementation of deprecated kerning funcs
Behdad Esfahbod 977c8a8e 2018-10-09T00:22:08 [kern] Minor
Behdad Esfahbod ed5cfa42 2018-10-09T00:20:35 [kern] Minor
Behdad Esfahbod d219f899 2018-10-09T00:01:09 Deprecate font kern API
Behdad Esfahbod a5195881 2018-10-08T23:57:45 Apply TrueType/OpenType kern table when GPOS kern feature is not available Fixes https://github.com/harfbuzz/harfbuzz/issues/250
Behdad Esfahbod 09ad2613 2018-10-08T23:30:24 Separate fallback kern vs mark positioning
Behdad Esfahbod 3c23ff9b 2018-10-08T23:26:26 [kern] Add kerning driver to TT kern table
Behdad Esfahbod 683c3a95 2018-10-08T23:09:48 [kern] Abstract away kerning machine
Behdad Esfahbod fb4f4383 2018-10-08T22:44:16 Add HB_DEPRECATED Fixes https://github.com/harfbuzz/harfbuzz/issues/1232