Commit Graph

78 Commits

Author SHA1 Message Date
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
Behdad Esfahbod dbdbfe3d7b Use nullptr instead of NULL 2017-10-15 12:11:08 +02:00
Behdad Esfahbod e1b6d92302 Remove cast of functions to (hb_destroy_func_t)
Fixes https://github.com/behdad/harfbuzz/issues/474
2017-10-11 15:51:31 +02:00
Behdad Esfahbod 68af14d5cc Protect against div-by-zero in CBDT extent code
Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=1452#c5

CC https://github.com/behdad/harfbuzz/issues/139
2017-08-09 17:09:21 -07:00
Ebrahim Byagowi 3b0e47ca00 Fix arm-none-eabi build (fixes #451) (#496) 2017-06-19 14:47:09 +04:30
Behdad Esfahbod 79e8e27ffd [var] Hook up advance variations to hb-ot-font
Yay, works!
2017-01-23 17:57:27 -08:00
Behdad Esfahbod bd3b11d926 [var] Prepare for hooking up advance variations to hb-ot-font 2017-01-23 17:37:19 -08:00
Behdad Esfahbod 7b399f73ef [var] Start adding HVAR/VVAR 2017-01-23 11:41:43 -08:00
Behdad Esfahbod a11d9a0466 Minor 2017-01-22 20:11:57 -08:00
Behdad Esfahbod 1af9d924a4 Move lazy-loader to more generic place 2017-01-09 22:22:37 -08:00
Behdad Esfahbod ac274331c2 In lazy-loading, remember allocation failure 2017-01-09 22:20:38 -08:00
Volker H. Simonis ad273881c5 Minor fixes to pacify Coverity code scan
Fixes https://github.com/behdad/harfbuzz/pull/377
2016-12-18 00:14:06 -06:00
Behdad Esfahbod e4bfccfb2a [CBDT] Minor 2016-12-04 19:45:46 -08:00
Behdad Esfahbod 9eda74c92c [cbdt] Move some more code around 2016-12-04 19:12:52 -08:00
Behdad Esfahbod c27d6fcf8d [cbdt] Last of sanitization fixes
Should be all good now..
2016-12-02 22:43:05 -08:00
Behdad Esfahbod d495fc5e38 [cbdt] Clean up some more
Almost there..
2016-12-02 21:52:33 -08:00
Behdad Esfahbod ce09e90e15 [cbdt] More sanitize work 2016-12-02 20:12:57 -08:00
Behdad Esfahbod 4b58c9e326 [cbdt] Start fixing sanitization (or lack thereof) 2016-12-02 19:25:54 -08:00
Behdad Esfahbod efca7bf97f Rename 'ebdt' to 'cbdt' since we only support the PNG format 2016-12-02 15:11:37 -08:00
Seigo Nonaka 831852594b Introduce get_extent support for color bitmap font. (#351)
hb_font_get_glyph_extents now works for color bitmap fonts.
Currently only font having index format 1 and image format 17
is supported.
2016-12-02 17:03:50 -06:00
Behdad Esfahbod 63635c763d [hb-ot-font] Use ascent+descent as fallback vertical advance 2016-10-26 18:01:24 +02:00
Behdad Esfahbod b3b0816d5f Fix vertical font metrics
Ouch!
2016-10-26 18:01:20 +02:00
Behdad Esfahbod 34f9aa582c Implement symbol cmap in ft and ot fonts
Fixes https://github.com/behdad/harfbuzz/issues/236
Fixes https://bugs.chromium.org/p/chromium/issues/detail?id=627953
2016-07-20 02:35:54 -07:00
Behdad Esfahbod 9879fc1db3 [ot-font] Remove unused 'post' table include for now
To make a release...
2016-05-02 10:29:12 +02:00
Behdad Esfahbod f00ab2a33a [hb-ot-font] Make 'glyf' table loading lazy
Apparently some clients have reference-table callbacks that copy the table.
As such, avoid loading 'glyf' table which is only needed if fallback positioning
happens.
2016-05-02 10:24:00 +02:00
Behdad Esfahbod 587d46227a [ot-font] Start implementing 'post' table, for accessing glyph names 2016-04-30 19:20:56 +02:00
Behdad Esfahbod 23335deaad [ot-font] Accelerate cmap format4 get_glyph 2016-02-24 20:27:13 +09:00
Behdad Esfahbod e0f16a715b [ot-font] Towards accelerating get_glyph() 2016-02-24 19:52:36 +09:00
Behdad Esfahbod 5473ebfb84 [ot-font] Remove level of indirection in get_glyph_variant 2016-02-24 19:32:43 +09:00