Commit Graph

98 Commits

Author SHA1 Message Date
Behdad Esfahbod 955aa56b11 [vector] Make it act more like pointer
Add pointer cast operator and plus operator.
2018-10-25 16:50:38 -07:00
Behdad Esfahbod 0816a54978 [uniscribe/coretext] Fix for previous change 2018-10-06 02:40:57 +02:00
Behdad Esfahbod 606bf57430 Revert forcing use of single-parameter static_assert()
Some clang versions define static_assert as a macro apparently, so we cannot
redefine it...

This reverts commit 94bfea0ce6.
This reverts commit 4e62627831.
2018-09-16 19:34:39 +02:00
Behdad Esfahbod 4e62627831 Enforce single-param static_assert() only
So we don't accidentally break it again.
2018-09-16 18:09:36 +02:00
Behdad Esfahbod 96471fe859 [uniscribe] Fix build 2018-09-11 01:39:23 +02: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
Behdad Esfahbod 9bbd1cdf06 [uniscribe] Use lazy loader
Fixes https://github.com/harfbuzz/harfbuzz/issues/1129
2018-08-12 18:20:53 -07:00
Behdad Esfahbod 747d2564e6 [lazy] Port more 2018-08-12 17:32:10 -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 d4d1bf8177 Fix for recent rename 2018-08-02 02:04:02 -07:00
Behdad Esfahbod 91126aa11a [uniscribe] Update for recent changes 2018-08-02 02:03:13 -07:00
Behdad Esfahbod ed7b2e58fc Remove OT namespace from hb-machinery-private.hh 2018-08-02 00:08:08 -07:00
Behdad Esfahbod 3d22aefede Rename 2018-08-01 18:03:32 -07:00
Behdad Esfahbod e7737b41d7 Add sanitizer reference_table, also fix clang build
Clang is being really peculiar.  Fix with:

-  inline hb_blob_t *sanitize (hb_blob_t *blob) { return c->sanitize<Type> (blob); }
+  inline hb_blob_t *sanitize (hb_blob_t *blob) { return c[0].template/*clang idiosyncrasy*/sanitize_blob<Type> (blob); }
2018-07-22 22:24:31 -07:00
Behdad Esfahbod be458eb059 Include more basic internal headers from hb-private.hh 2018-07-10 14:41:04 +02:00
Behdad Esfahbod f7515769fd [vector] Use Crap pool in push() as well 2018-06-01 17:48:37 -07:00
Behdad Esfahbod 65aeabd622 Add hb_vector_t::push(const Type &v)
Makes for cleaner code.
2018-05-24 13:53:02 -07:00
Ebrahim Byagowi 93bdf9b2df
Use arrayZ on hb-coretext and hb-uniscribe and fix macOS/Win bots (#1024)
Following to 63f57f4
2018-05-09 23:24:17 +04:30
Behdad Esfahbod 37b95612d4 Remove hb_auto_array_t
Part of https://github.com/harfbuzz/harfbuzz/issues/1017
2018-05-01 19:09:00 -04:00
Ebrahim Byagowi 70d36543aa Make atexit callbacks threadsafe (#930) 2018-03-29 17:30:28 -07:00
Behdad Esfahbod 48baf7e389 [uniscribe] Fixup for previous commit
Fixes https://github.com/harfbuzz/harfbuzz/issues/934
2018-03-28 13:38:51 -07:00
Behdad Esfahbod b17e1a4088 [uniscribe] Fix assertion fail in checksum calc
Program: Z:\Users\ebrahim\Desktop\harfbuzz\winbuild\util\.libs\hb-shape.exe
File: ../../src/hb-open-type-private.hh, Line 769

Expression: 0 == (Length & 3)

abnormal program termination
2018-03-28 10:45:26 -07:00
David Corbett 21646cc4a6 Do not mark the first glyph as unsafe to break
Fixes #791.
2018-02-17 13:35:34 -08:00
Behdad Esfahbod 470fe5b603 [aat] Implement Lookup table
Untested, but compiles.
2018-01-10 02:50:49 +01:00
Behdad Esfahbod e4da380200 [coretext/uniscribe/directwrite/graphite/fallback] Update for unsafe-to-break
Fixes https://github.com/behdad/harfbuzz/issues/615

We'll see which bots I broke.
2017-11-10 17:14:27 -08:00
Behdad Esfahbod 40ec3bbb55 Consolidate debug stuff into hb-debug.hh
Part of fixing https://github.com/behdad/harfbuzz/pull/605
2017-11-03 17:18:17 -04:00
Behdad Esfahbod 2c439210c9 [uniscribe] Fix a couple of VS warnings 2017-11-01 18:13:35 -06:00
Behdad Esfahbod 98acdde3c6 [coretext/uniscribe] Fix build
https://travis-ci.org/behdad/harfbuzz/jobs/295039536#L3468
https://ci.appveyor.com/project/behdad/harfbuzz/build/1.0.697/job/dr1ujlntxafeqbej#L142
2017-10-31 11:17:43 -06:00
Behdad Esfahbod dbdbfe3d7b Use nullptr instead of NULL 2017-10-15 12:11:08 +02:00
Behdad Esfahbod c3448e8d21 Use static_assert instead of custom ASSERT_STATIC 2017-10-15 12:02:00 +02:00
Behdad Esfahbod 239119a631 [unsafe-to-break] Mark all positions as unsafe in alternative shapers 2017-08-13 15:08:34 -07:00
Behdad Esfahbod 466b3e58bd Shuffle things around a bit 2017-02-03 16:57:15 -08:00
Behdad Esfahbod 72ada4f0c6 [GX] Hook up feature variations
Shape-plan caching is not implemented.
2016-12-16 19:06:26 -06:00
Behdad Esfahbod 333173103b Fix sign of shift operators
This one:

  map->mask = (1 << (next_bit + bits_needed)) - (1 << next_bit);

before the fix, the shift was done as an int, causing overflow
if it ever got to 1 << 31.  Sprinkle 'u's around.

Fixes https://bugs.chromium.org/p/chromium/issues/detail?id=634805
2016-08-08 17:28:14 -07:00
Behdad Esfahbod e6d5e4c310 [uniscribe] Fix negative advance
This happens with at least one test font I have.
2016-01-06 12:29:50 +00:00
Behdad Esfahbod eaf1e93ef1 [uniscribe] Handle E_NOT_SUFFICIENT_BUFFER as well as E_OUTOFMEMORY
On Windows 10 we are seeing that other error message...

Test sequence: U+0995,U+-9CD,U+09B0
With Nirmala shipped on Windows 10, this failed to form the below form.
Works now.

Reported by Sairus.
2015-12-17 17:28:35 +00:00
Behdad Esfahbod 163c435f18 [uniscribe] Fix negative offsets
Ouch!
2015-08-20 15:39:06 +01:00
Behdad Esfahbod 7c5bee09d9 [uniscribe] Fix font scale handling
By default shape at upem (or ppem), and scale results.
Similar to work done in CoreText backend, but using upem as default.
2015-08-19 13:20:31 +01:00
Behdad Esfahbod 666b42f73b Move macros around
Fixes https://bugs.freedesktop.org/show_bug.cgi?id=84491
2014-10-14 21:24:59 -07:00
Behdad Esfahbod 15c633dd1f Minor 2014-08-11 13:42:59 -04:00
Behdad Esfahbod 92aeee3f04 Minor 2014-08-10 17:42:19 -04:00
Behdad Esfahbod 38fb30d742 Use atexit() only if it's safe to call from shared library
Apparently they are not (advertised as?) safe on BSD systems.
We ignore the case of static libraries.

Whitelisted on glibc, Android, and MSVC / mingw.

https://bugs.freedesktop.org/show_bug.cgi?id=82246
2014-08-06 13:34:49 -04:00
Behdad Esfahbod d7c850f803 [uniscribe] Minor 2014-08-02 19:07:53 -04:00
Behdad Esfahbod db30828048 [win] Consolidate windows.h include tips and tricks 2014-07-19 16:32:04 -04:00
Behdad Esfahbod 7627100f42 Mark unsigned integer literals with the u suffix
Simplifies hb_in_range() calls as the type can be inferred.
The rest is obsessiveness, I admit.
2014-07-11 16:22:13 -04:00
Behdad Esfahbod fb8cc86ff9 Rename sort() to qsort()
In an effort to make the algorithm used clear.
2014-06-19 15:31:09 -04:00
Jonathan Kew 62cb28dfc6 fixup for 64-bit windows build 2014-01-22 07:31:54 -05:00
Behdad Esfahbod 3216e44feb [uniscribe] Fix scratch-buffer accounting 2013-12-23 14:39:23 -05:00
Behdad Esfahbod 68c372ed2e More scratch-buffer cleanup 2013-11-13 14:45:43 -05:00
Behdad Esfahbod 16f175cb2e Fix scratch-buffer alignment warnings 2013-11-12 17:22:49 -05:00