Behdad Esfahbod
385cf37cf0
Fix hb_in_range() unused-var warning on Windows
2014-07-17 18:22:07 -04:00
Dominik Röttsches
9e7c720100
Fix CoreText build after a8b89a09f6
2014-07-17 12:18:08 -04:00
Behdad Esfahbod
a8b89a09f6
Simplify hb_in_range()
...
It's both faster and produces smaller code. Now I feel stupid for
not writing it this way before.
2014-07-11 14:18:01 -04:00
Behdad Esfahbod
546b1adcdc
Minor: Use template parameter default values for hb_prealloced_array_t
2014-06-27 15:17:01 -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
Behdad Esfahbod
dac86026a6
Fix some cppcheck warnings
...
Bug 77800 - cppcheck reports
2014-06-03 17:57:00 -04:00
Behdad Esfahbod
c306410cab
Bug 77732 - Fix unused typedef warning for ASSERT_STATIC with GCC 4.8
2014-06-03 17:00:07 -04:00
Behdad Esfahbod
ae2b854eab
Move code around
2014-06-03 16:59:09 -04:00
Behdad Esfahbod
6faff8e413
Add static storage classifier to inline functions
...
Before we were just relying on the compiler inlining them and not
leaving a trace in our public API. Try to fix. Hopefully not
breaking anyone's build.
2014-04-28 14:30:44 -07:00
Behdad Esfahbod
a949cd329e
Don't use "register" storage class specifier
...
Fixes warnings.
https://bugzilla.mozilla.org/show_bug.cgi?id=984081
2014-03-16 20:22:42 -07:00
Behdad Esfahbod
c98b7183f7
[ot] Add Hangul shaper
...
Not exhaustively tested, but I think I got the intended logic
right.
The logic can perhaps be simplified. Maybe we should disabled
normalization with this shaper. Then again, for now focusing on
correctness.
2013-12-31 16:23:48 +08:00
Behdad Esfahbod
16f175cb2e
Fix scratch-buffer alignment warnings
2013-11-12 17:22:49 -05:00
Behdad Esfahbod
639afdc690
Minor
2013-08-06 14:28:12 -04:00
Behdad Esfahbod
7235f33f9e
Fix misc warnings reported by cppcheck
...
https://bugs.freedesktop.org/show_bug.cgi?id=65544
2013-06-10 15:08:49 -04:00
Behdad Esfahbod
6c15ddfe2b
Renamed DEBUG to something else
...
Some infrastructures use DEBUG as a generic symbol.
2013-04-30 11:34:00 -04:00
Behdad Esfahbod
2b712bba3f
Fix typo in unused macro
2013-04-16 16:11:09 -04:00
Behdad Esfahbod
c5d91f3980
Add hb_auto_array_t
2013-03-09 04:34:21 -05:00
Behdad Esfahbod
20b817ac21
[buffer] Implement buffer deserialization for format=json
...
Using a ragel machine.
2013-02-27 18:49:18 -05:00
Behdad Esfahbod
847794e929
[buffer] Implement buffer deserialization for format=text
...
Using a ragel machine.
2013-02-27 18:49:18 -05:00
Behdad Esfahbod
29ff254815
Add HB_DEBUG_VERBOSE
...
Only affects the verbosity of function name printing right now.
2013-02-25 19:04:56 -05:00
Behdad Esfahbod
bab02d339f
Rename HB_OT_INDIC_OPTIONS env var to HB_OPTIONS
...
The Myanmar shaper now respects the uniscribe-bug-compatibility
option too.
2013-02-12 15:26:45 -05:00
Behdad Esfahbod
bd61bc13ea
[OTLayout] Add UINT24 type
2012-12-11 16:01:07 -05:00
Behdad Esfahbod
5f9569c139
Make older MSVC happy
2012-12-10 13:39:06 -05:00
Behdad Esfahbod
0beb66e3a6
Fix warnings
2012-12-05 19:14:28 -05:00
Behdad Esfahbod
130bb3f614
Rename VOID and void_t to have HarfBuzz prefix
...
Fixes build on Windows. Ouch!
2012-12-05 16:49:47 -05:00
Behdad Esfahbod
adf7758a27
Improve debug log format in presence of templates
2012-11-23 17:34:02 -05:00
Behdad Esfahbod
2c9d6485a1
More tracing fixup
2012-11-23 16:49:19 -05:00
Behdad Esfahbod
a1733db1c6
[OTLayout] Start adding process() tracing
2012-11-23 16:40:04 -05:00
Behdad Esfahbod
902cc8aca0
[OTLayout] Start unbreaking tracing
2012-11-23 15:23:30 -05:00
Behdad Esfahbod
dabe698fcb
Minor
2012-11-23 14:21:35 -05:00
Behdad Esfahbod
c779d82b2f
Fix warnings
2012-11-23 14:09:21 -05:00
Behdad Esfahbod
2d1dcb3ce3
Mark debug message functions static
2012-10-07 17:13:46 -04:00
Behdad Esfahbod
fabd3113a9
[OT] Port Arabic fallback shaping to synthetic GSUB
...
All of init/medi/fina/isol and rlig implemented.
Let there be dragons... ⻯
2012-09-06 00:51:44 -04:00
Behdad Esfahbod
6f3a300138
Add hb_font_glyph_from/to_string
2012-08-07 22:13:25 -04:00
Behdad Esfahbod
25326c2359
Rewrite ARRAY_LENGTH as a template function
...
Such it wouldn't apply to pointers accidentally.
2012-08-04 16:43:18 -07:00
Behdad Esfahbod
3f4764bb56
Don't lock user_data set during destruction if empty
2012-07-30 10:06:42 -04:00
Behdad Esfahbod
093cd58326
[Thai] Fix SARA AM handling
...
Oops, thinko.
2012-07-23 14:04:42 -04:00
Behdad Esfahbod
4a7f4f3e56
[Thai] Adjust SARA AM reordering to match Uniscribe
...
Adjust the list of marks before SARA AM that get the reordering
treatment. Also adjust cluster formation to match Uniscribe.
With Wikipedia test data, now I see:
- For Thai, with the Angsana New font from Win7, I see 54 failures out
of over 4M tests (0.00129107%). Of the 54, two are legitimate
reordering issues (fix coming soon), and the other 52 are simply
Uniscribe using a zero-width space char instead of an unknown
character for missing glyphs. No idea why. The missing-glyph
sequences include one that is a Thai character followed by an Arabic
Sokun. Someone confused it with Nikhahit I assume!
- For Lao, with the Dokchampa font from Win7, 33 tests fail out of
54k (0.0615167%). All seem to be insignificant mark positioning
with two marks on a base. Have to investigate.
2012-07-23 13:15:33 -04:00
Behdad Esfahbod
efb4ad7356
Fix compiler warnings
...
If x is not constant, we cannot ASSERT_STATIC on it.
2012-07-20 14:27:38 -04:00
Behdad Esfahbod
2c372b80f6
[Indic] Better check for applying 'init'
...
Specifically, don't apply 'init' if previous char is a joiner.
Fixes some more of Bengali.
2012-07-20 13:37:48 -04:00
Behdad Esfahbod
ae63cf2062
Print line number during return when tracing
2012-07-19 20:45:41 -04:00
Behdad Esfahbod
39b17837b4
Add hb_buffer_normalize_glyphs() and hb-shape --normalize-glyphs
...
This reorders glyphs within the cluster to a nominal order. This should
have no visible effect on the output, but helps with testing, for
getting the same hb-shape output for visually-equal glyphs for each
cluster.
2012-07-17 17:09:29 -04:00
Behdad Esfahbod
b5aeb95afe
Make hb_in_range() static
2012-07-13 09:45:54 -04:00
Behdad Esfahbod
6932a41fb6
Use octal-escaped UTF-8 characters instead of plain text
...
https://bugs.freedesktop.org/show_bug.cgi?id=50970
2012-06-26 10:46:31 -04:00
Behdad Esfahbod
fcd6f53261
Unbreak Uniscribe
...
Oops. hb_tag_t and OPENTYPE_TAG have different endianness. Perhaps
something to add API for in hb-uniscribe.h
2012-06-08 09:59:43 -04:00
Behdad Esfahbod
73cb02de2d
Minor
2012-06-06 11:29:25 -04:00
Behdad Esfahbod
79e2b4791f
Fix ASSERT_POD on clang
...
As reported by bashi. Not tested.
2012-06-06 11:27:17 -04:00
Behdad Esfahbod
6220e5fc0d
Add ASSERT_POD for most objects
2012-06-06 03:30:09 -04:00
Behdad Esfahbod
a00a63b5ef
Add macros to check that types are POD
2012-06-06 03:07:01 -04:00
Behdad Esfahbod
0594a24484
Cleanup TRUE/FALSE vs true/false
2012-06-05 20:35:40 -04:00
Behdad Esfahbod
0e253e97af
Add a mutex to object header
...
Removes one more static-initialization. A few more to go.
2012-06-05 15:54:43 -04:00
Behdad Esfahbod
bf93b636c4
Remove constructor from hb_prealloced_array_t
...
This was causing all object types to be non-POD and have static
initializers. We don't need that!
Now, most nil objects just moved from .bss to .data. Fixing for that
coming soon.
2012-06-05 14:17:32 -04:00
Behdad Esfahbod
93345edcbe
Fix warnings
2012-05-13 16:01:08 +02:00
Behdad Esfahbod
4be46bade2
[Indic] Fix state machine to backtrack
2012-05-11 14:39:01 +02:00
Behdad Esfahbod
9659523ca3
More beauty in debug output!
2012-05-11 03:33:36 +02:00
Behdad Esfahbod
d7bba01a35
Only print class name in debug output if there's one available
2012-05-11 02:46:26 +02:00
Behdad Esfahbod
85f73fa8da
Only printout class name in tracing, if one is available
...
Makes debug output much more pleasant.
2012-05-11 02:40:42 +02:00
Behdad Esfahbod
5ccfe8e215
/Minor/
2012-05-11 02:19:41 +02:00
Behdad Esfahbod
0ab8c86217
Annotate SANITIZE return values
...
More to come, for APPLY, CLOSURE, etc.
2012-05-11 02:11:52 +02:00
Behdad Esfahbod
829e814ff3
Minor
2012-05-11 00:52:16 +02:00
Behdad Esfahbod
6eec6f406d
Code reshuffling
2012-05-11 00:50:38 +02:00
Behdad Esfahbod
1e08830b4f
Beautify debug output
2012-05-11 00:43:57 +02:00
Behdad Esfahbod
6f45538017
More massaging trace messaging
2012-05-10 23:24:43 +02:00
Behdad Esfahbod
208109703c
Better trace message support infrastructure
...
We have varargs in the trace interface now. To be used soon...
2012-05-10 23:06:58 +02:00
Behdad Esfahbod
3e32cd9570
Minor
2012-04-23 13:22:50 -04:00
Behdad Esfahbod
e74616b889
Add comment
2012-04-15 14:12:13 -04:00
Behdad Esfahbod
d1c9eb458c
Make it an error to include non-top-level headers
...
Users should #include <hb.h> (or hb-ft.h, hb-glib.h, etc), but
never things like hb-shape.h directly. This makes it easier to
refactor headers later on without breaking compatibility.
2012-04-12 13:17:44 -04:00
Behdad Esfahbod
5ddd9cc499
Minor
2011-09-16 16:40:44 -04:00
Behdad Esfahbod
efde811325
Add a constructor for hb_prealloced_array_t
...
Fixes build with MSVC.
2011-08-23 00:04:57 +02:00
Behdad Esfahbod
33ccc77902
[API] Make set_user_data() functions take a replace parameter
...
We need this to set data on objects safely without worrying that some
other thread unsets it by setting it at the same time.
2011-08-09 00:43:24 +02:00
Behdad Esfahbod
c605bbbb6d
Remove C++ guards from source files
...
Where causing issues for people with MSVC.
2011-08-04 20:00:53 -04:00
Behdad Esfahbod
44b4f50d05
Fix typo
2011-08-04 00:52:20 -04:00
Behdad Esfahbod
0fbb2dc831
Add draft experimental Uniscribe backend
...
Not complete yet, font selection doesn't work. But hey it shapes!
This is not supposed to be a production backend, more like a testing
backend.
2011-08-03 19:55:04 -04:00
Behdad Esfahbod
f60271c0c2
Add mingw32 support
...
With these changes, on Ubuntu I can do:
./configure --host=i586-mingw32msvc && make
2011-08-02 10:00:55 -04:00
Behdad Esfahbod
45d6f29f15
[Indic] Reorder matras
...
Number of failing shape-complex tests goes from 125 down to 94.
Next: Add Ra handling and it's fair to say we kinda support Indic :).
2011-07-30 14:44:30 -04:00
Behdad Esfahbod
8f0b64fb69
Minor
2011-07-29 17:02:48 -04:00
Behdad Esfahbod
b65c06025d
Formalize buffer var allocations
2011-07-28 16:49:29 -04:00
Behdad Esfahbod
cc06c243d8
Streamline debugging infrastructure even more
2011-07-25 20:34:17 -04:00
Behdad Esfahbod
43ff203d8e
Use variadic macros for debugging
...
Looks *so* much nicer!
2011-07-25 17:35:24 -04:00
Behdad Esfahbod
decd4e3e16
Add sugar syntax for debug messages
...
Buffer debugging coming soon.
2011-07-25 16:47:02 -04:00
Behdad Esfahbod
7b08b0a7f2
Minor
2011-07-20 23:59:07 -04:00
Behdad Esfahbod
b70c96dbe4
Enable applying GSUB/GPOS features in multiple segments
...
Fixes https://bugzilla.mozilla.org/show_bug.cgi?id=644184
among others.
Shapers now can request segmented feature application by calling
add_gsub_pause() or add_gpos_pause(). They can also provide a
callback to be called at the pause. Currently the Arabic shaper
uses pauses to enforce certain feature application. The Indic
shaper can use the same facility to pause and do reordering in the
callback.
2011-07-07 21:12:15 -04:00
Behdad Esfahbod
4ec30aec30
[Indic] Optimize Indic table storage
2011-06-28 14:13:38 -04:00
Behdad Esfahbod
970e092dc2
Remove extra semicolon
2011-06-14 14:35:44 -04:00
Behdad Esfahbod
c84d15f52e
Remove unused hb_set_t
2011-05-11 22:23:15 -04:00
Behdad Esfahbod
831886a9b4
Streamline mutex stuff
2011-05-11 21:27:52 -04:00
Behdad Esfahbod
6a7ac79e26
Plug leaks
2011-05-11 14:19:18 -04:00
Behdad Esfahbod
45bfa99034
Fix set implementation to be truly threadsafe even with destroy() callbacks
...
The test/object test is passing again, instead of deadlocking.
2011-05-10 19:15:49 -04:00
Behdad Esfahbod
d37486d87b
Add hb_threadsafe_set_t
2011-05-05 15:07:54 -04:00
Behdad Esfahbod
b45f32ee4e
Use hb_array_t for hb_language_t mapping
2011-05-05 15:00:43 -04:00
Behdad Esfahbod
265ac614ea
Replace fixed-size lookup_maps array with hb_array_t
2011-05-05 14:38:16 -04:00
Behdad Esfahbod
6843569d2c
Replace fixed-size feature_maps array with hb_array_t
2011-05-05 14:30:51 -04:00
Behdad Esfahbod
44b0a4d2fc
Replace fixed-size feature_infos array with hb_array_t
2011-05-05 13:42:19 -04:00
Behdad Esfahbod
b214ec3ac0
Minor
2011-05-05 13:24:07 -04:00
Behdad Esfahbod
811482bd65
Replace hb_map_t with hb_set_t which is more intuitive and flexible
2011-05-05 13:21:04 -04:00
Behdad Esfahbod
478a42536f
Make array/map implementation more generic
2011-05-05 12:39:51 -04:00
Behdad Esfahbod
2000179487
Move Win32 thread-safety stuff to hb-object-private.h
...
The Win32 definitions for LONG, ULONG, etc conflicts with
hb-open-type.h. Avoid that by making sure hb-object-private.h
and hb-open-type.h are not included in the same compilation unit.
2011-05-03 00:49:06 -04:00
Behdad Esfahbod
fc52e9e44c
Implement win32 thread-safety stuff
...
Patch from Bradley Grainger.
2011-05-03 00:09:16 -04:00
Behdad Esfahbod
f55272ecde
Add hb_mutex_free() and use it
...
Based on patch by Bradley Grainger.
2011-05-02 20:57:28 -04:00
Behdad Esfahbod
8d5186484b
Cosmetic
2011-05-02 20:52:21 -04:00
Behdad Esfahbod
5a5030366e
Fix bug in array growth implementation
...
With this, test/object is now passing. Yay!
2011-05-02 19:54:29 -04:00
Behdad Esfahbod
16123e1070
Fix bug in map implementation
2011-05-02 19:54:17 -04:00
Behdad Esfahbod
080a0eb7d8
Add _hb_unsigned_int_mul_overflows
2011-04-28 16:01:01 -04:00
Behdad Esfahbod
123aa04f7b
Fix possible but improbable overflow in hb_array_t
2011-04-28 12:58:28 -04:00
Behdad Esfahbod
852e08ec8f
Move code around
2011-04-27 21:45:51 -04:00
Behdad Esfahbod
153142dac8
Replace simple macros with inline functions for better type safety
...
Now that we use C++ for all source code, lets benefit from it!
The hb_be_int16/32_get/put/eq() macros grow code size if replaced with
inline functions, so leave them as is.
2011-04-27 02:07:46 -04:00
Behdad Esfahbod
ebdc83467c
Don't return in void function
...
Would have been nice if gcc had warned...
2011-04-27 01:41:24 -04:00
Behdad Esfahbod
fca368c468
Add hb_object_header_t which is the common part of all objects
...
Makes way for adding arbitrary user_data support.
2011-04-21 18:24:02 -04:00
Behdad Esfahbod
a9f24c8029
Move hb_reference_count_t to hb-private.h
2011-04-21 17:18:22 -04:00
Behdad Esfahbod
2409d5f8d7
Update Copyright headers
2011-04-21 17:14:28 -04:00
Behdad Esfahbod
dcb7026f33
Add ASSERT_STATIC_EXPR macro
...
Unused right now.
2011-04-21 16:34:22 -04:00
Behdad Esfahbod
3e8bdbf941
Cleanup hb_refrence_count_t
2011-04-21 16:16:21 -04:00
Behdad Esfahbod
c57d454acc
Rename all private sources and headers to C++ files
...
So we can liberally use the simple features of C++ that parts of the
codebase is already using.
2011-04-20 18:50:27 -04:00