Commit Graph

106 Commits

Author SHA1 Message Date
Behdad Esfahbod bee93e2697 Add const to get_*_advances API
Ouch!
2018-10-09 08:02:25 -04:00
Behdad Esfahbod 47030b1855 [ft/ot] Remove implementation of deprecated kerning funcs 2018-10-09 00:30:45 -04: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 8a31e40629 [font] Make *_advance() fallback to *_advances
And remove redundant implementations.
2018-09-30 06:08:11 -04:00
Behdad Esfahbod cbea7d49ab [ot-font] Rename 2018-09-11 12:57:41 +02:00
Behdad Esfahbod d8a67dac2a [ot-font] Add advances() callbacks 2018-09-11 12:55:54 +02:00
Behdad Esfahbod a268068010 [ot-face] Remove tables_t. The face_data_t is what tables_t was 2018-08-26 15:18:46 -07:00
Behdad Esfahbod 3a0b3a29cc Free up hb-ot-face.hh from includes
There might be a better way to do this, but I couldn't find...
2018-08-26 15:11:24 -07:00
Behdad Esfahbod e6cb938065 [ot-face] Unify accelerators and tables 2018-08-26 00:21:29 -07:00
Behdad Esfahbod 59bca0d2cb [ot-font] Rename 2018-08-26 00:06:12 -07:00
Behdad Esfahbod 1c48a7ef06 [ot-font] Cache tables on face, not font 2018-08-25 23:57:16 -07:00
Behdad Esfahbod 71f8893eff [ot-font] Use init0 2018-08-25 23:27:45 -07:00
Behdad Esfahbod f36ae6f8a8 [ot-font] Make everything (cmap/metrics) lazy 2018-08-25 23:26:45 -07:00
Behdad Esfahbod 62fc54725a [ot-font] Fallback vertical advance to UPEM
Used to be ascent+descent.  Whatever. This is more convenient for
upcoming changes.
2018-08-25 23:15:52 -07:00
Behdad Esfahbod c77ae40852 Rename hb-*private.hh to hb-*.hh
Sorry for the noise, downstream custom builders.  Please adjust.
2018-08-25 22:36:36 -07:00
Emil A Eklund 7112c6413c Guard free_static function definitions with macro
Add HB_USE_ATEXIT macros around free_static function definitions to
avoid unused function compiler warnings/errors.
2018-08-14 14:04:10 -07:00
Behdad Esfahbod 7bd508a0c4 [lazy] Rename free() 2018-08-12 17:19:55 -07:00
Behdad Esfahbod bb905e9afc [lazy] Minor 2018-08-12 16:44:44 -07:00
Behdad Esfahbod 53442be1ed [lazy] Use for ft_library 2018-08-12 16:20:11 -07:00
Behdad Esfahbod 7a8d480378 [lazy] Add .free() 2018-08-12 16:00:13 -07:00
Behdad Esfahbod c7ca30a533 [ot/ft] Port font_funcs statis to lazy-loader 2018-08-12 13:46:53 -07:00
Behdad Esfahbod 1f7380944d [atomic] Add hb_atomic_ptr_t<> and port all uses
Found and fixed a couple bugs.

Found a couple multithreading issues.  Marked them with "XXX-MT-bug".
2018-08-09 00:27:01 -07:00
Behdad Esfahbod 30ff8ac865 Rename 2018-08-03 17:33:13 -07:00
Behdad Esfahbod c988b11999 Move code around 2018-08-02 22:55:52 -07:00
Behdad Esfahbod 574b37e933 Minor 2018-08-02 02:22:38 -07:00
Behdad Esfahbod ff7826e90b Reduce storage by sharing face amongst lazy_loaders 2018-08-02 01:29:05 -07:00
Behdad Esfahbod ed7b2e58fc Remove OT namespace from hb-machinery-private.hh 2018-08-02 00:08:08 -07:00
Ebrahim Byagowi 24b8b9b227 Resolve clang's used-but-marked-unused warnings 2018-04-23 11:38:45 -07:00
Ebrahim Byagowi 70d36543aa Make atexit callbacks threadsafe (#930) 2018-03-29 17:30:28 -07:00
Ebrahim Byagowi 0ef6ab25ab
[ot-color] Move cbdt to the namespace (#860) 2018-03-04 02:47:26 +03:30
Behdad Esfahbod 7b40876a58 [ot] Remove unneeded TODO item
Looks like hb-ot-font is complete after all!

CFF font names and CFF glyph metrics don't work though...
2017-11-14 20:22:05 -08:00
Behdad Esfahbod eab4feb5e2 [hmtx] Use curiously recurring template pattern
https://en.wikipedia.org/wiki/Curiously_recurring_template_pattern
2017-11-14 20:17:15 -08:00
Behdad Esfahbod 977ddff1f1 [ot] Move hb_ot_face_cmap_accelerator_t 2017-11-14 20:06:19 -08:00
Behdad Esfahbod a85d7ead04 [ot] Move hb_ot_face_metrics_accelerator_t 2017-11-14 20:00:34 -08:00
Behdad Esfahbod 7e2839c438 [ot] Move hb_ot_face_glyf_accelerator_t 2017-11-14 19:52:29 -08:00
Behdad Esfahbod c4e18e54dc [ot] Move hb_ot_face_cbdt_accelerator_t 2017-11-14 19:52:26 -08:00
Behdad Esfahbod 9b04b0384f [ot] Fold hb_ot_face_post_accelerator_t 2017-11-14 19:31:50 -08:00
Behdad Esfahbod 702d86ba6b [ot] Fold hb_ot_face_kern_accelerator_t 2017-11-14 19:25:51 -08:00
Behdad Esfahbod 93f7c1652a Revert "[glib/ucdn/icu/ft/ot] Make returned funcs inert"
This reverts commit 5daf3bd449.

If other atexit callbacks try to destruct the objects we destruct
in atexit callbacks, bad things will happen.

I'll come up with some other way to catch premature destruction
of HB-owned objects.

Fixes https://github.com/behdad/harfbuzz/issues/618
2017-11-14 10:59:54 -08:00
Behdad Esfahbod 82a38d1f7a [kern] Allow subtables longer than 64kb
Apparently calibri.ttf does this:
https://github.com/fonttools/fonttools/pull/1094#discussion_r148933791
2017-11-06 15:28:24 -05:00
Behdad Esfahbod 4b3278ef8d [ot] Hook up horizontal kerning to kern table
Seems to work.  Yay!

Still to do: run kerning if GPOS doesn't have 'kern' feature.
2017-11-01 19:41:29 -06:00
Behdad Esfahbod 77acc1106e [kern] More...
Almost there.
2017-11-01 19:40:51 -06:00
Behdad Esfahbod 2a16f647ae [kern] Start implementing kern table
Pushing this out early to catch bot errors since I'm using template tricks
we were not using in HarfBuzz before.
2017-11-01 17:32:34 -06:00
Behdad Esfahbod b0e33da02d Add BinSearchArrayOf<> 2017-10-31 20:05:37 -06:00
Behdad Esfahbod 5de83fab94 [ot] Speed up get_glyph_name()
get_glyph_from_name() coming soon.
2017-10-28 19:54:04 -06:00
Behdad Esfahbod 5daf3bd449 [glib/ucdn/icu/ft/ot] Make returned funcs inert
Such that client cannot accidentally destroy them, even though that
will be a bug in their code...
2017-10-27 16:37:11 -06:00
Behdad Esfahbod 543bd58d7a [post] Touch up and fixes
The get_glyph_from_name() is incorrect; needs fixing.
2017-10-25 18:01:03 -06:00
Khaled Hosny d9e166f74c [ot-font] Implement hb_ot_get_glyph_from_name 2017-10-25 19:29:51 -04:00
Khaled Hosny 9d4d2fb9af [ot-font] Implement hb_ot_get_glyph_name
Turns out we already have support for “post” table, it just needed to be
activated and put in use.
2017-10-25 19:29:51 -04:00