Behdad Esfahbod
208f70f055
Inline Unicode callbacks internally
2012-08-01 17:13:10 -04:00
Behdad Esfahbod
69cc492dc1
[buffer] Minor
2012-07-31 14:51:36 -04:00
Behdad Esfahbod
ea278d3895
Partially switch ot shaper to shape_plan
2012-07-27 02:12:28 -04:00
Behdad Esfahbod
47ef931f13
[buffer] Make sure out_info = info during GPOS
2012-07-19 20:52:44 -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
e085fcf7ca
Remove unused buffer->replace_glyphs_be16
2012-06-08 21:45:00 -04:00
Behdad Esfahbod
fe3dabc08d
Minor
2012-06-08 20:56:05 -04:00
Behdad Esfahbod
e88e14421a
Use merge_clusters instead of open-coding
2012-06-08 20:55:21 -04:00
Behdad Esfahbod
e51d2b6ed1
Extend into main buffer if extension hit end of out-buffer merging clusters
2012-06-08 20:36:33 -04:00
Behdad Esfahbod
5ced012d9f
Extend end when merging clusters in out-buffer
2012-06-08 20:31:32 -04:00
Behdad Esfahbod
72c0a18783
Extend clusters backward in out-buffer
2012-06-08 20:30:03 -04:00
Behdad Esfahbod
cd5891493d
Extend clusters backwards, into the out-buffer too
2012-06-08 20:28:59 -04:00
Behdad Esfahbod
cafa6f3727
When merging clusters, extend the end
2012-06-08 20:17:10 -04:00
Behdad Esfahbod
2a3d911fe0
Fix alignment-requirement missmatch
...
Detected by clang and lots of cmdline options.
2012-06-07 17:31:46 -04:00
Behdad Esfahbod
0594a24484
Cleanup TRUE/FALSE vs true/false
2012-06-05 20:35:40 -04:00
Behdad Esfahbod
e1ac38f8dd
Fix inert buffer set_length() with zero
...
Oops!
2012-06-05 20:31:49 -04:00
Behdad Esfahbod
be4560a3b5
Undo default unicode-funcs to avoid static initializer again
2012-06-05 18:43:57 -04:00
Behdad Esfahbod
f06ab8a426
Better hide nil objects and make them const
2012-06-05 14:49:14 -04:00
Behdad Esfahbod
8e3715f8a1
Minor
2012-04-23 22:18:54 -04:00
Behdad Esfahbod
3b26f96ebe
Add Thai shaper that does SARA AM decomposition / reordering
...
That's not in the OpenType spec, but it's what MS and Adobe do.
2012-04-10 10:52:07 -04:00
Behdad Esfahbod
d4cc44716c
Move code around, in prep for Thai/Lao shaper
2012-04-07 21:52:28 -04:00
Behdad Esfahbod
c521e793bd
Fix OOB in replace_glyph()
...
Patch from Kenichi Ishibashi.
2012-01-18 21:51:05 -05:00
Behdad Esfahbod
9ebe8c0286
Add buffer->replace_glyphs()
2011-08-26 09:29:42 +02:00
Behdad Esfahbod
e6c09cdf43
Remove the pre_allocate argument from hb_buffer_create()
...
For two reasons:
1. User can always call hb_buffer_pre_allocate() themselves, and
2. Now we do a pre_alloc in add_utfX anyway, so the total number of
reallocs is limited to a small number (~3) anyway. This just makes the
API cleaner.
2011-08-19 19:20:26 +02:00
Behdad Esfahbod
4e9ff1dd6e
Pre-allocate buffers when adding string
...
We do a conservative estimate of the number of characters, but still,
this limits the number of buffer reallocs to a small constant.
2011-08-15 16:21:22 +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
944b2ba1ce
[buffer] Make API take signed int length
...
Since we already switched to accepting -1 as 'zero-terminated'.
2011-08-09 00:23:58 +02:00
Behdad Esfahbod
144cd49a0e
[buffer] Accept -1 for text_length and item_length
...
A -1 text_length means: zero-terminated string.
A -1 item_length means: to the end of string.
2011-08-07 00:51:50 -04:00
Behdad Esfahbod
02aeca985b
[API] Changes to main shape API
...
hb_shape() now accepts a shaper_options and a shaper_list argument.
Both can be set to NULL to emulate previous API. And in most situations
they are expected to be set to NULL.
hb_shape() also returns a boolean for now. If shaper_list is NULL, the
return value can be ignored.
shaper_options is ignored for now, but otherwise it should be a
NULL-terminated list of strings.
shaper_list is a NULL-terminated list of strings. Currently recognized
strings are "ot" for native OpenType Layout implementation, "uniscribe"
for the Uniscribe backend, and "fallback" for the non-complex backend
(that will be implemented shortly). The fallback backend never fails.
The env var HB_SHAPER_LIST is also parsed and honored. It's a
colon-separated list of shaper names. The fallback shaper is invoked if
none of the env-listed shapers succeed.
New API hb_buffer_guess_properties() added.
2011-08-04 22:38:09 -04: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
e62df43649
Add internal hb_buffer_t::get_scratch_buffer()
2011-08-03 17:38:54 -04:00
Behdad Esfahbod
b65c06025d
Formalize buffer var allocations
2011-07-28 16:49:29 -04:00
Behdad Esfahbod
a9ad3d3460
Move more code around
...
Buffer var allocation coming into shape
2011-07-28 15:42:18 -04:00
Behdad Esfahbod
3a81b1db89
Minor, fix leak from my previous refactorings
2011-07-25 16:30:32 -04:00
Behdad Esfahbod
f4a579bc42
Add internal API for buffer var allocation
2011-07-25 16:26:05 -04:00
Behdad Esfahbod
468e9cb25c
Move buffer methods into the object
2011-07-22 14:49:14 -04:00
Behdad Esfahbod
9111b21ef9
Add _hb_buffer_output_glyph() and _hb_buffer_skip_glyph()
2011-07-21 00:59:15 -04:00
Behdad Esfahbod
dd89d958c1
Fix cluster calculation for non-LTR text
2011-07-21 00:28:57 -04:00
Behdad Esfahbod
2e18c6dbdf
Fix reverse_range() position loop
...
Mozilla Bug 669175 - Slow rendering of text sometimes in this case,
using direction: rtl
2011-07-06 16:05:45 -04:00
Behdad Esfahbod
80a6833b03
[API] Add hb_*_get_empty() for all objects
2011-05-11 18:21:58 -04:00
Behdad Esfahbod
3935af1c0d
[buffer] Remove wrong optimization
...
While the cluster fields of the glyph string are usually sorted, they
wouldn't be in special cases (for example for non-native direction).
Blindly using bsearch is plain wrong. If we want to reintroduce this
optimization we have to make sure we know the buffer clusters are
monotonic and in which direction. Not sure it's worth it though.
2011-05-05 16:09:45 -04:00
Behdad Esfahbod
e87867cb88
[buffer] Fail in _create() if we cannot pre-allocate the requested size
2011-05-02 19:35:05 -04:00
Behdad Esfahbod
243673d601
[test/buffer] Add more extensive UTF-8 test data from glib
2011-04-28 19:37:51 -04:00
Behdad Esfahbod
080a0eb7d8
Add _hb_unsigned_int_mul_overflows
2011-04-28 16:01:01 -04:00
Behdad Esfahbod
3264042873
[test/buffer] Test pre_allocate() and allocation_successful()
2011-04-28 14:24:16 -04:00
Behdad Esfahbod
e0db4b868f
[buffer] More error handling
...
Should be all set now.
2011-04-28 12:56:49 -04:00
Behdad Esfahbod
5fa849b77d
[API] Add _set/get_user_data() for all objects
2011-04-27 21:46:01 -04:00
Behdad Esfahbod
47e71d9661
[object] Remove unnecessary use of macros
2011-04-27 16:41:08 -04:00
Behdad Esfahbod
65e0063eae
Make buffer size growth start from 32 instead of 8
2011-04-27 09:38:23 -04:00
Behdad Esfahbod
d4bee9f813
[API] Add hb_unicode_funcs_get_default()
2011-04-27 09:38:19 -04:00