Behdad Esfahbod
3b5c22c39b
Remove src/test.cc
...
Not really useful.
2012-01-19 14:28:11 -05:00
Behdad Esfahbod
889caa52fa
[icu] Use U_FAILURE
2012-01-18 22:32:52 -05:00
Behdad Esfahbod
36a4f4a482
Replace u_strlen() with u_countChar32()
...
The latter is what I meant.
2012-01-18 22:16:49 -05:00
Behdad Esfahbod
c521e793bd
Fix OOB in replace_glyph()
...
Patch from Kenichi Ishibashi.
2012-01-18 21:51:05 -05:00
Behdad Esfahbod
03408ce73d
Fix more possible buffer overruns
...
I have this function, but can't clean up it to my satisfaction.
2012-01-18 21:28:34 -05:00
Behdad Esfahbod
7d479900cd
Refactor the two remaining uses of _hb_ot_layout_skip_mark()
2012-01-18 21:19:32 -05:00
Behdad Esfahbod
506ffeb8e7
Further mark skippy fixes from Jonathan Kew
...
We should be in good shape now.
2012-01-18 16:07:53 -05:00
Behdad Esfahbod
a4a48fe6d4
Fix mark skipping regression
...
Ouch!
2012-01-17 18:08:41 -05:00
Behdad Esfahbod
4ab9731154
Refactor mark skipping
2012-01-16 22:20:31 -05:00
Behdad Esfahbod
370f03e9c6
Minor
2012-01-16 17:06:59 -05:00
Behdad Esfahbod
4d3aeb8cb2
[GSUB/GPOS] Fix mark skip indexing issues
...
Mozilla bug 701637 and 714067 combined.
Patch from Jonathan Kew.
2012-01-16 16:43:26 -05:00
Behdad Esfahbod
e8eedf2687
Avoid enum trailing commas
...
Based on patch from Jonathan Kew.
2012-01-16 16:39:40 -05:00
Behdad Esfahbod
299ae0c3a3
[icu] Remove glib-ism
2012-01-14 21:29:45 -05:00
Behdad Esfahbod
af92135424
Minor
2011-10-21 09:18:43 -07:00
Behdad Esfahbod
89d89646e8
Fix intrin.h b0rkage with older MSVC
...
Reported by Jonathan Kew.
2011-10-17 11:50:54 -07:00
Behdad Esfahbod
af913c5788
Fix infinite loop in normalization code with variation selectors
...
Reported by Jonathan Kew.
2011-10-17 11:39:28 -07:00
Behdad Esfahbod
55deff7595
Add comments
2011-09-28 16:20:09 -04:00
Behdad Esfahbod
52ebdff49d
Fix GSUB lookuptype 1 subtype 1 delta wrapping
2011-09-27 12:38:16 -04:00
Behdad Esfahbod
b95324cdd2
Minor
2011-09-21 16:50:39 -04:00
Behdad Esfahbod
0cd33592ab
Fix possible leaks
2011-09-21 16:49:33 -04:00
Behdad Esfahbod
d606daa4cc
Whitespace
2011-09-20 14:34:06 -04:00
Behdad Esfahbod
f83f0f4836
[graphite] Add note about graphite shaker brokenness
2011-09-19 18:51:48 -04:00
Behdad Esfahbod
0a965eee88
Minor
2011-09-19 16:53:47 -04:00
Behdad Esfahbod
5c29934311
[uniscribe] Various improvements
2011-09-19 14:53:26 -04:00
Behdad Esfahbod
5ddd9cc499
Minor
2011-09-16 16:40:44 -04:00
Behdad Esfahbod
947c9a778c
Minor
2011-09-16 16:33:18 -04:00
Behdad Esfahbod
d5476a30a1
Minor
2011-09-16 12:30:50 -04:00
Behdad Esfahbod
36b10f58cc
Minor
2011-09-15 16:29:51 -04:00
Behdad Esfahbod
c4611cb66f
Fix test
2011-09-15 00:32:39 -04:00
Behdad Esfahbod
bc187e5ac7
Refine Indic scripts, following Martin Hosken's recommendation
2011-09-08 13:35:17 -04:00
Behdad Esfahbod
738d096a06
Pass through unknown ISO 639-3 language tags to OpenType engine
...
In hb_ot_tag_from_language(), if first component of an unknown
language is three letters long, use it directly as OpenType language
tag (after case conversion and padding).
2011-09-02 13:31:19 -04:00
Behdad Esfahbod
ea02cbf03c
[graphite] Don't preload glyphs
...
Doesn't seem to be slower.
2011-09-02 12:39:20 -04:00
Behdad Esfahbod
210a06f3d7
Minor
2011-08-26 13:39:49 +02:00
Behdad Esfahbod
4a8d2e379a
[graphite2] Chop a few more lines
2011-08-26 09:40:54 +02:00
Behdad Esfahbod
81ec289da7
Minor
2011-08-26 09:33:06 +02:00
Behdad Esfahbod
3380de5abb
[graphite] Use buffer->replace_glyphs()
2011-08-26 09:30:49 +02:00
Behdad Esfahbod
9ebe8c0286
Add buffer->replace_glyphs()
2011-08-26 09:29:42 +02:00
Behdad Esfahbod
a5edb1031c
Minor
2011-08-26 09:27:13 +02:00
Behdad Esfahbod
290e3ee517
[graphite] Only pass the first part language tag to graphite
...
Still not sure about:
1) Case. We pass lowercase for now. Would be nice if graphite was
uppercase 3letter like OpenType,
2) Padding. IMO, tag padding is always with spaces, but Martin was
talking about NUL bytes.
2011-08-26 09:25:04 +02:00
Behdad Esfahbod
4c9fe88d30
[API] Make all _from_string() functions take a len parameter
...
Can be -1 for NUL-terminated string. This is useful for passing parts
of a larger string to a function without having to copy or modify the
string first.
Affected functions:
hb_tag_t hb_tag_from_string()
hb_direction_from_string()
hb_language_from_string()
hb_script_from_string()
2011-08-26 09:22:12 +02:00
Behdad Esfahbod
a499bdea5c
[graphite2] Bail if grface is NULL
2011-08-25 22:46:21 +02:00
Behdad Esfahbod
3007ffa9e5
Reorder combining-class to better suit Arabic shadda mark-mark positioning
...
As reported by Khaled on the list:
"After the introduction of canonical reordering of combining marks
(commit 34c22f8
), I'm no longer able to do mark/mark substitution or
positioning for mark sequences that involve shadda as a first mark (or
most interesting sequences at least).
"After some digging, it turned out that shadda have a ccc=33 while most
Arabic marks that combine with it have a lower ccc value, which results
in the shadda being reordered after the other mark which,
unsurprisingly, breaks my contextual substitution and mkmk anchors."
See:
http://unicode.org/faq/normalization.html#8
http://unicode.org/faq/normalization.html#9
2011-08-25 09:08:53 +02:00
Behdad Esfahbod
74ef81a0b0
Fix make distcheck
2011-08-24 19:36:50 +02:00
Behdad Esfahbod
24bcdbcc06
Add hb-ot-hmtx-table.hh
...
Oops!
2011-08-24 19:13:15 +02:00
Behdad Esfahbod
a3bd8a0e18
[graphite] Rewrite properly
2011-08-24 03:25:57 +02:00
Behdad Esfahbod
5072934c35
Minor
2011-08-24 02:24:27 +02:00
Behdad Esfahbod
71388b3ee7
[uniscribe] Minor
2011-08-24 02:09:04 +02:00
Behdad Esfahbod
cd2b901027
[graphite] Minor
2011-08-24 01:48:03 +02:00
Behdad Esfahbod
834af3b48a
[graphite] Remove hb_graphite2_feature_check()
...
I don't see how this function can be useful.
2011-08-24 01:45:47 +02:00
Behdad Esfahbod
1f49cf32c9
Add graphite2 integration from Martin Hosken
...
To be modified, a lot.
2011-08-24 01:32:41 +02:00
Behdad Esfahbod
0e6d36d8a3
Minor
2011-08-24 01:31:29 +02: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
d75333f166
Add gobject enum support, but disabled for now
...
need to figure out the naming. The generated code doesn't have the
right name.
2011-08-19 19:59:24 +02:00
Behdad Esfahbod
7d235d272f
Flesh out tt funcs a bit
2011-08-19 19:23:28 +02:00
Behdad Esfahbod
b9415e76d7
[API] Add hb_font_set_funcs_data()
2011-08-19 19:20:30 +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
187bdeaa6c
Do (nothing for) hmtx sanitize
2011-08-17 19:03:06 +02:00
Behdad Esfahbod
d6016e4910
Fix name-table sanitize
2011-08-17 15:00:18 +02:00
Behdad Esfahbod
ae9877dea6
Add hhea-table support
2011-08-17 15:00:10 +02:00
Behdad Esfahbod
7a750ac33e
Rename table files from eg maxp-private.hh to maxp-table.hh
2011-08-17 14:19:59 +02:00
Behdad Esfahbod
0b7e4d9f20
[ft] FT_Get_Advance() for advance-width callbacks
...
Using graphite2's comparerenderer suggests that this makes hb-ft 15
times faster. No caching layer needed anymore.
2011-08-15 20:41:59 +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
553bc3de82
Minor
2011-08-15 16:21:06 +02:00
Behdad Esfahbod
254142bb67
[ft] FT_Select_Charmap() when we create face
2011-08-15 16:15:44 +02:00
Behdad Esfahbod
a4cbd03dd1
Apply 'locl' with 'ccmp' in Arabic shaper
...
According to Peter Constable this is indeed what Uniscribe has been
doing for years.
Mozilla Bug 667166 - wrong shape of letter when it comes at the end of
word in the arabic version of Firefox 5.0
2011-08-15 09:52:05 +02:00
Behdad Esfahbod
c214cff55c
Start adding gobject-introspection support
2011-08-14 15:17:51 +02:00
Behdad Esfahbod
9527fb200f
Fix missing return
2011-08-13 19:03:48 +02:00
Behdad Esfahbod
77a3287695
Minor
2011-08-13 17:16:45 +02:00
Behdad Esfahbod
d6660356dd
Add uniscribe font getters
2011-08-10 22:08:36 +02:00
Behdad Esfahbod
01ec13a1d9
Implement hb_ft_font_get_face
2011-08-10 22:00:35 +02:00
Behdad Esfahbod
0501573ded
Fix const correctness in the API
2011-08-10 16:25:56 +02:00
Behdad Esfahbod
511a136f0c
Move hb-view into util/
2011-08-09 15:03:00 +02:00
Behdad Esfahbod
d753ac78da
[uniscribe] Remove zerowidth glyphs from output
2011-08-09 14:03:12 +02:00
Behdad Esfahbod
ddd247b0c5
Minor
2011-08-09 11:44:42 +02:00
Behdad Esfahbod
1b8196c986
Add fallback shaper
2011-08-09 11:37:46 +02:00
Behdad Esfahbod
13a601fe99
[FT] Don't make font immutable
2011-08-09 11:36:54 +02:00
Behdad Esfahbod
38b2118724
[API] Add hb_ft_font_set_funcs(), remove hb_ft_get_font_funcs()
...
Remove hb_ft_get_font_funcs() as it cannot be used by the user anyway.
Add hb_ft_font_set_funcs(). Which will make the font internally use
FreeType. That is, no need for the font to have created using the
hb-ft API. Just create using hb_face_create()/hb_font_create() and
then call this on the font (after having set font scale). This
internally creates an FT_Face and attached to the font.
2011-08-09 11:10:32 +02:00
Behdad Esfahbod
255f176fdc
Minor
2011-08-09 08:35:07 +02:00
Behdad Esfahbod
a9057eb3f3
[uniscribe] Unbreak
2011-08-09 00:47:55 +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
de1e1cf9bc
[FT] Adapt to new face API
2011-08-09 00:19:38 +02:00
Behdad Esfahbod
bf3eef540f
[uniscribe] Cleanup backend
2011-08-09 00:14:22 +02:00
Behdad Esfahbod
3897335c76
[API] Sort out get_blob API
...
hb_face_get_blob() renamed to hb_face_reference_blob(), returns a
reference now.
hb_face_[sg]et_index() added.
hb_face_set_upem() added.
2011-08-08 23:37:41 +02:00
Behdad Esfahbod
e715784be3
Rename get_table to reference_table in all API
2011-08-08 21:43:06 +02:00
Behdad Esfahbod
670c873499
Fix shaper ordering logic
2011-08-08 21:36:24 +02:00
Behdad Esfahbod
cc797e0d53
Minor
2011-08-08 03:50:38 +02:00
Behdad Esfahbod
826e22732d
[uniscribe] Fix blob lifecycles
2011-08-07 03:53:42 -04:00
Behdad Esfahbod
ff199ba356
Fix shaper_list manipulation, aaaaaaaaaaaaargh
2011-08-07 03:43:46 -04:00
Behdad Esfahbod
577326b86a
[uniscribe] Fix cluster calculation
2011-08-07 01:04:40 -04:00
Behdad Esfahbod
f6d83b2dcf
Minor
2011-08-07 00:59:58 -04:00
Behdad Esfahbod
2eb474afb4
[uniscribe] Fix shaper
...
It's kinda working finally!
2011-08-07 00:59:38 -04:00
Behdad Esfahbod
f22e661147
[glib] Protect against invalid characters
2011-08-07 00:59:12 -04: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
e9c71fab30
Fix name-table lookup
...
Oops!
2011-08-07 00:01:04 -04:00
Behdad Esfahbod
3fd2b5bece
[uniscribe] Use font size directly
2011-08-06 22:59:54 -04:00
Behdad Esfahbod
892eb2e462
[uniscribe] Make font selection work
...
Not tested yet.
2011-08-06 22:32:07 -04:00
Behdad Esfahbod
b492299eb3
Start implementing the 'name' table
2011-08-05 20:34:50 -04:00
Behdad Esfahbod
4538efacca
Skip tests by returning 77
...
automake test runner understands this.
2011-08-05 20:11:06 -04:00
Behdad Esfahbod
54eb65538d
Fix check on OS X sh
2011-08-05 20:09:25 -04:00
Behdad Esfahbod
9da554504e
Add hb_shape_list_shapers()
2011-08-05 19:59:02 -04:00
Behdad Esfahbod
d7bf473ef2
Minor
2011-08-05 19:59:02 -04:00
Behdad Esfahbod
c62a8f10f3
Free all static memory upon exit
2011-08-05 19:59:02 -04:00
Behdad Esfahbod
c4d63ef744
Fix env parsing code
...
Also changed the separator to comma instead of colon.
2011-08-05 19:59:02 -04:00
Behdad Esfahbod
3931837beb
Change hb_shape() API back to what it was, add hb_shape_full()
...
I disliked changing hb_shape() API, and disliked the fact that it was
returning a bool now. So, reverted. Added new API for the extra
functionality.
2011-08-05 19:59:02 -04:00
Behdad Esfahbod
3ca6c4ecc2
Change hb_shape() API back to what it was, add hb_shape_full()
...
I disliked changing hb_shape() API, and disliked the fact that it was
returning a bool now. So, reverted. Added new API for the extra
functionality.
2011-08-05 17:22:19 -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
57692adf12
Make test.cc do something more useful
...
Hardcoded to the uniscribe backend for now. Will fix soon.
2011-08-04 20:49:16 -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
8336186a52
Zero map objects
2011-08-04 19:49:05 -04:00
Behdad Esfahbod
c747f509bc
More out-of-tree build fixes
2011-08-04 01:51:30 -04:00
Behdad Esfahbod
20dde61016
Minor
2011-08-04 01:07:33 -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
e62df43649
Add internal hb_buffer_t::get_scratch_buffer()
2011-08-03 17:38:54 -04:00
Behdad Esfahbod
bf8c57ba74
[API] Add hb_face_get_blob()
...
Need to think more about it.
2011-08-03 17:38:04 -04:00
Behdad Esfahbod
2118fdb9f5
Fix fallback shaping
...
Broke it a few commits ago.
2011-08-02 14:06:51 -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
f5414cf0a2
Use missing script for calling ragel
2011-08-01 16:34:16 -04:00
Behdad Esfahbod
a91c58bf98
[Indic] Disable CJCT-disabling logic
...
Read comment.
2011-08-01 16:30:11 -04:00
Behdad Esfahbod
5e72071062
[Indic] Stop looking for base upon seeing joiners
...
Not sure where this is documented, but I remember this being the desired
behavior.
test-shape-complex failures are down from 48 to 46. Meh.
2011-07-31 17:52:44 -04:00
Behdad Esfahbod
281683995a
Cosmetic
2011-07-31 16:00:35 -04:00
Behdad Esfahbod
6b37bc8084
[Indic] Fix ZWJ/ZWNJ application
...
Not quite working just yet. False alarm re 10 failures. It was
crashing. Ouch! Back to 48 failures.
2011-07-31 15:57:00 -04:00
Behdad Esfahbod
e7be057024
[Indic] Add Final Reordering rules into comments
...
Not applied yet.
2011-07-31 15:22:46 -04:00
Behdad Esfahbod
cfd4382ec1
[Indic] Handle Reph when determining base consonant
2011-07-31 15:08:40 -04:00
Behdad Esfahbod
97158392a5
[Indic] Ra is a consonant too
2011-07-31 15:01:28 -04:00
Behdad Esfahbod
0d8f8a177c
[Indic] Fix reph inhibition logic
2011-07-31 14:57:59 -04:00
Behdad Esfahbod
9da0487cd4
[Indic] Support ZWJ/ZWNJ
...
Brings test-shape-complex failures down from 52 to 10!
I hereby declare harfbuzz-ng supporting Indic!
2011-07-31 13:46:44 -04:00
Behdad Esfahbod
9ee27a928a
[Indic] Suppress reph formation upon joiners
2011-07-31 11:10:14 -04:00
Behdad Esfahbod
8354e004e5
Un-Ra U+09F1. According to the test suite this is correct.
...
But I'm not sure... Down from 54 failures to 52.
2011-07-31 02:24:51 -04:00
Behdad Esfahbod
ba7e85c104
Cosmetic
2011-07-30 21:11:53 -04:00
Behdad Esfahbod
f5bc2725cb
[Indic] For old-style Indic tables, move Halant around
...
In old-style Indic OT standards, the post-base Halants are moved after
their base. Emulate that by moving first post-base Halant to
post-last-consonant.
Brings test-shape-complex failures down from 88 to 54. Getting there!
2011-07-30 21:08:10 -04:00
Behdad Esfahbod
c47a31fb47
[OT] Save chosen script tag
2011-07-30 20:57:01 -04:00
Behdad Esfahbod
fd06bf5611
[Indic] Handle initial Ra+Halant in scripts that support Reph
...
Brings test-shape-complex failures down from 104 to 92. Way to go!
2011-07-30 20:14:44 -04:00
Behdad Esfahbod
ee58f3bc75
Minor
2011-07-30 19:15:53 -04:00
Behdad Esfahbod
352372ae5e
[Indic] Categorize Ra in scripts that have Reph
...
Is the categorization correct? I don't know.
2011-07-30 19:04:02 -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
911bf32aca
Bug 39686 - Add '-no-undefined' to libharfbuzz LDFLAGS
2011-07-30 11:16:00 -04:00
Behdad Esfahbod
8f0b64fb69
Minor
2011-07-29 17:02:48 -04:00
Behdad Esfahbod
743807a3ce
[Indic] Apply Indic features
...
Find the base consonant and apply basic Indic features accordingly.
Nothing complete, but does something for now. Specifically:
no Ra handling right now, and no ZWJ/ZWNJ.
Number of failing shape-complex tests goes from 174 down to 125.
Next: reorder matras.
2011-07-29 16:46:09 -04:00
Behdad Esfahbod
9f9bcceca6
Register buffer vars in Indic shaper
2011-07-28 17:07:50 -04:00
Behdad Esfahbod
be09bf6b79
Oops. This should have gone into the previous commit
2011-07-28 17:03:43 -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
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
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
651e8dd79e
Start cleaning up buffer var allocation
...
I've messed up a lot of stuff recently, different parts of the
shaping process are stumbling on eachother's toes because
manually tracking what's in which buffer var is hard. I'm
going to add some internal API to track those such that mistakes
are discovered as soon as they are introduced.
2011-07-25 14:54:08 -04:00
Behdad Esfahbod
c86f932015
Move code around
2011-07-25 00:44:50 -04:00
Behdad Esfahbod
18c42850c9
Shrink space used for ligature ids
...
This frees 16bits in the glyph_info struct during the ot_layout process.
We can use the freed space in the shapers now.
2011-07-25 00:43:39 -04:00
Behdad Esfahbod
d8787493c9
Minor
2011-07-25 00:36:01 -04:00
Behdad Esfahbod
c311d85208
Keep Unicode props updated as we go so we avoid a scan later
2011-07-23 23:43:54 -04:00
Behdad Esfahbod
5389ff4dbc
Implement the Unicode Canonical Composition algorithm
...
Fallback normalization is complete and working now!
2011-07-22 20:22:49 -04:00
Behdad Esfahbod
dcdc51cdc0
Handle singleton decompositions
2011-07-22 17:14:46 -04:00
Behdad Esfahbod
34c22f8168
Implement Unicode Canonical Reordering Algorithm
2011-07-22 17:04:20 -04:00
Behdad Esfahbod
4ff0d2d9df
Decomposition works now!
2011-07-22 16:15:32 -04:00
Behdad Esfahbod
468e9cb25c
Move buffer methods into the object
2011-07-22 14:49:14 -04:00
Behdad Esfahbod
45412523dc
More normalization kick
2011-07-22 11:07:05 -04:00
Behdad Esfahbod
63c0ef4a07
Fix decompose() implementations to work with non-starter non-composables
...
Add tests.
2011-07-21 20:58:42 -04:00
Behdad Esfahbod
5d90a342e3
Document normalization design
2011-07-21 15:25:01 -04:00
Behdad Esfahbod
02cdf743c2
Add prefer_decomposed() complex-shaper callback
...
This allows the Indic shaper to request decomposed characters. This will
handle split matra for free. Other shapers prefer precomposed
characters.
2011-07-21 12:23:12 -04:00
Behdad Esfahbod
d6b9c6d200
More kicking
2011-07-21 12:16:45 -04:00
Behdad Esfahbod
192445aef2
Remove intermittent_glyph()
...
Lets not worry about performance for now...
2011-07-21 12:13:04 -04:00
Behdad Esfahbod
d63adfc7d0
No need to handle variation-selectors seperately, they are GC=Mn
2011-07-21 11:48:57 -04:00
Behdad Esfahbod
aa7264123a
Only form clusters if we are reversing
...
This produces more accurate cluster mappings. Cluster mappings are
minimal now. Combining marks get their own cluster value most of
the time.
2011-07-21 11:34:59 -04:00
Behdad Esfahbod
5c6f5982d7
Towards normalization
2011-07-21 11:31:08 -04:00
Behdad Esfahbod
cf7f43ec33
Remove stale comment
2011-07-21 01:12:26 -04:00
Behdad Esfahbod
54d1a0d2b2
Form clusters before ensuring native direciton
...
This is essential as ensure_native_direction uses cluster info that
is set by form_clusters().
2011-07-21 01:11:09 -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
655586fe5e
Towards normalization
2011-07-21 00:52:42 -04:00
Behdad Esfahbod
49741c8633
Include variation-selectors in cluster calculation
2011-07-21 00:35:37 -04:00
Behdad Esfahbod
dd89d958c1
Fix cluster calculation for non-LTR text
2011-07-21 00:28:57 -04:00
Behdad Esfahbod
4a68684654
When forming clusters, participate all mark types
2011-07-21 00:14:01 -04:00
Behdad Esfahbod
5157e12a55
Rename HB_UNICODE_GENERAL_CATEGORY_COMBINING_MARK to HB_UNICODE_GENERAL_CATEGORY_SPACING_MARK
...
Spacing_Mark is the current Unicode long-name for this property value.
The previous name was wrongly carried from glib.
2011-07-21 00:12:33 -04:00
Behdad Esfahbod
7b08b0a7f2
Minor
2011-07-20 23:59:07 -04:00
Behdad Esfahbod
498e1a9be6
[icu] Implement compose()/decompose()
2011-07-20 23:19:49 -04:00
Behdad Esfahbod
ffd4a436f7
Add tests for compose()/decompose()
...
Adjust glib fallback implementation.
The tests are not hooked up for ICU yet.
2011-07-20 22:31:23 -04:00
Behdad Esfahbod
fca0923b04
Minor
2011-07-20 22:16:13 -04:00
Behdad Esfahbod
26b6024962
[glib] Use g_unicode_script_to/from_iso15924() if available
2011-07-20 22:16:01 -04:00
Behdad Esfahbod
22fdc66712
[glib] Add compose() and decompose() implementations with fallback
2011-07-20 21:51:37 -04:00
Behdad Esfahbod
a54a5505a3
Minor
2011-07-20 16:42:10 -04:00
Behdad Esfahbod
22989c5ffc
Distribute hb-ot-shape-complex-indic-machine.rl
2011-07-12 11:54:58 -04:00
Behdad Esfahbod
f6fd3780e1
Let shapers decide when to apply ccmp and locl
...
Instead of always applying those two features before the complex shaper,
let the complex shaper decide whether they should be applied first.
Also add stub for Indic's final_reordering().
2011-07-08 00:22:40 -04:00
Behdad Esfahbod
c4641723fb
[API] Add compose() and decompose() unicode funcs, rename other ones
...
Add compose() and decompose() unicode funcs. These implement
pair-wise canonical composition/decomposition.
The glib/icu implementations are lacking for now. We are adding
API for this to glib, but I cannot find any useful API in ICU.
May end of implementing these in-house.
Changed all unicode_funcs callback names to remove the "_get" part.
Eg, hb_unicode_get_script_func_t is now hb_unicode_script_func_t,
and hb_unicode_get_script() is hb_unicode_script() now.
2011-07-08 00:09:31 -04:00
Behdad Esfahbod
d05dded167
More code generation through preprocessor
2011-07-07 23:43:47 -04:00
Behdad Esfahbod
891c4755ba
Humm, undo some shuffling
...
In preparation for adding more advanced unicode funcs.
2011-07-07 23:27:27 -04:00
Behdad Esfahbod
4b6317c4f4
More code shuffling
2011-07-07 23:14:42 -04:00
Behdad Esfahbod
3361c9a323
Minor
2011-07-07 22:35:17 -04:00
Behdad Esfahbod
76f76812ac
Shuffle code around, remove shape_plan from complex shapers
2011-07-07 22:25:25 -04:00
Behdad Esfahbod
e88bff9b4d
Minor, use function typedefs
2011-07-07 22:03:02 -04:00
Behdad Esfahbod
359dcaa0d3
Update copyright headers
2011-07-07 21:55:05 -04:00
Behdad Esfahbod
d8d0c480c8
Refactor some code common to GSUB and GPOS
2011-07-07 21:22:08 -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
f6d7a9bb4c
Shuffle code around
2011-07-07 16:20:35 -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
fa2befa46f
Minor
2011-07-04 17:18:57 -04:00
Behdad Esfahbod
d69d5ceaa0
[Indic] Well, at least finding syllables works now :)
...
Still not much there.
2011-07-04 12:56:38 -04:00
Behdad Esfahbod
4ec30aec30
[Indic] Optimize Indic table storage
2011-06-28 14:13:38 -04:00
Behdad Esfahbod
c4a59de6d8
[Indic] Generate a single data table instead of multiple ones
2011-06-28 14:03:29 -04:00
Behdad Esfahbod
8fdba506f0
[Indic] Define indic_position_t
2011-06-24 20:45:55 -04:00
Behdad Esfahbod
65988a145b
[Indic] Add a table of consonant positions
...
Copied form HarfBuzz.old Indic data. These are below and post
consonants. This is temporary. Read the comment in the patch.
2011-06-24 19:05:52 -04:00
Behdad Esfahbod
c7fe56a1d5
[Indic] Some of the basic features are global; Mark them so
2011-06-24 19:05:34 -04:00
Behdad Esfahbod
867361c3ad
[indic] Add syllable recognition state machine
...
Using an incredible tool called Ragel.
2011-06-17 18:35:46 -04:00
Behdad Esfahbod
422e08dbb8
Better categorize Indic character classes
...
Matches OT types now.
2011-06-15 17:22:48 -04:00
Behdad Esfahbod
31f18abecb
Minor compiler warning fixes
2011-06-15 09:49:58 -04:00
Behdad Esfahbod
e3693b72f0
Change a couple strstr() to strchr()
2011-06-15 09:33:52 -04:00
Behdad Esfahbod
b9452bfc16
Fix compiler warnings with -pedantic
2011-06-14 14:47:07 -04:00
Behdad Esfahbod
970e092dc2
Remove extra semicolon
2011-06-14 14:35:44 -04:00
Behdad Esfahbod
8142680802
Cosmetic
2011-06-13 16:12:56 -04:00
Behdad Esfahbod
902ab866f2
GNOME Bug 652227 - Unconditional use of stdint.h
2011-06-10 23:08:54 -04:00
Behdad Esfahbod
20503ccd57
More Indic data shuffling
2011-06-07 17:02:48 -04:00
Behdad Esfahbod
63b177e45c
Minor
2011-06-07 15:51:40 -04:00
Behdad Esfahbod
b9ddbd5593
[Indic] Start an Indic shaper
...
Nothing functional in there yet.
So far, we're parsing IndicSyllabicCategory.txt and IndicMatraCategory.txt
fils from Unicode Character Database and store them in an array to be used
by the shaper. Also hooked up the shaper, but it does not do anything
right now.
2011-06-02 17:43:12 -04:00
Behdad Esfahbod
697a65c5f5
Minor
2011-06-01 23:15:48 -04:00
Behdad Esfahbod
9de1481f2b
Update to ArabicShaping-6.1.0d2.txt
2011-06-01 20:45:14 -04:00
Behdad Esfahbod
9d49433efb
Minor rename
2011-06-01 18:10:10 -04:00
Behdad Esfahbod
89a2bc9ba6
[Vertical] Apply vertical features
...
We apply all of vert, vrt2, vkrn, valt, and vpal.
2011-05-31 15:18:13 -04:00
Behdad Esfahbod
0c6a9767c8
[hb-view] Add --face-index to choose a face in a TrueType Collection
2011-05-31 12:59:17 -04:00
Behdad Esfahbod
4f28fbdd80
Fix TTC header handling
...
Also change the Version type to avoid similar bugs in the future.
Reported by Grigori Goronzy.
2011-05-31 12:33:11 -04:00
Behdad Esfahbod
21deab2bdc
Fixed inifinite loop introduced in 7403e055cd
...
k is the index, not j.
Reported by Tom Hacohen.
2011-05-30 11:08:40 -04:00
Behdad Esfahbod
51881a61ca
Shrink code size
2011-05-27 18:15:56 -04:00
Behdad Esfahbod
90645fb24b
[OT] Separate map_builder from the actual map
...
Respectively, separate planner from the actual plan.
2011-05-27 18:13:31 -04:00
Behdad Esfahbod
5560a19e2b
Minor
2011-05-27 17:49:16 -04:00
Behdad Esfahbod
5bc18195d5
Add check-includes.sh
2011-05-27 15:58:54 -04:00
Behdad Esfahbod
376dafa6ed
Hide internal symbols
2011-05-27 03:40:04 -04:00
Behdad Esfahbod
329c15714b
Add libtool versioning
...
The versioning is automatic. For now, soname-major is 0. With
the 1.0.0 release it will jump to 1 and stay there forever.
2011-05-25 16:07:07 -04:00
Behdad Esfahbod
2d8ebcb9d0
[API] One last font-funcs API change
...
Now that vertical text works correctly, I'm doing a last round
modification of the font-funcs API to simplify. Expect no more
changes around here.
2011-05-25 11:27:33 -04:00
Behdad Esfahbod
7403e055cd
[Vertical] fix vertical gpos
...
Wow, it took me a few days to find the right fix!
We now set the advance for attached marks to zero, but we
do this in the _finish() state of gpos, so it shouldn't
regress with fonts like DejaVuSansMono that explicitly
decrease the mark advance width to set it to zero.
2011-05-25 10:52:15 -04:00
Behdad Esfahbod
3b0bb855e0
[Vertical] GPOS x/y advance adjustments only apply in hori/vert respectively
2011-05-20 15:59:59 -04:00
Behdad Esfahbod
cc2086d67c
[Vertical] Fix GPOS y-advance direction
2011-05-19 19:19:50 -04:00
Behdad Esfahbod
67d51ff961
[Vertical] Do fallback origin calculation
2011-05-19 19:08:57 -04:00
Behdad Esfahbod
60fbb36096
[Vertical] GPOS is always done with horizontal origin
2011-05-19 18:46:15 -04:00
Behdad Esfahbod
8b38faeede
More vertical
...
Starting to get there, but not without yet another round of changes.
I think I know wheere to go now.
2011-05-19 13:08:00 -04:00
Behdad Esfahbod
e609aeb1e2
[hb-view] Add --annotate
...
Currently it only marks glyph origins.
2011-05-18 10:17:02 -04:00
Behdad Esfahbod
b8d76dd74e
Vertical: Adjust origin in glyph_extents() and glyph_contour_point()
...
The base for vertical is almost ready now.
2011-05-17 23:31:00 -04:00
Behdad Esfahbod
190981851f
Cosmetic
2011-05-17 23:27:22 -04:00
Behdad Esfahbod
2c3f51a11c
Minor
2011-05-17 23:23:27 -04:00
Behdad Esfahbod
7e2c85de30
[API] Vertical support, take 2
...
I like this API *much* better. Implementation still incomplete, but
horizontal works.
2011-05-17 17:55:03 -04:00
Behdad Esfahbod
744970af4d
[API] Add support for vertical text
...
Design not final yet, and in fact I'm going to change it immediately,
but this is an standalone change for itself.
2011-05-17 17:12:34 -04:00
Behdad Esfahbod
4053f3f788
Cosmetic
2011-05-16 17:03:27 -04:00
Behdad Esfahbod
56d12e0356
Remove unnecessary TODO item
2011-05-16 16:01:58 -04:00
Behdad Esfahbod
1883af3796
[hb-view] Start work on vertical support
2011-05-16 15:18:16 -04:00
Behdad Esfahbod
9aa6f96af5
[hb-view] No need to allocate an extra glyph item at the end
2011-05-16 15:08:31 -04:00
Behdad Esfahbod
1a64f6e19a
[API] Add HB_LANGUAGE_INVALID
2011-05-13 22:55:32 -04:00
Behdad Esfahbod
40b5c2e86c
[test/test-ot-tag] Test hb-ot-tag.h, fix many bugs
...
I'm in awe with how many bugs this test revealed. All fixed.
2011-05-13 22:46:36 -04:00
Behdad Esfahbod
7fc5a30cb4
[API] Add hb_face_make/is_immutable()
2011-05-12 17:48:20 -04:00
Behdad Esfahbod
20c8b908dd
Finish off previous change
2011-05-12 15:19:33 -04:00
Behdad Esfahbod
0fd8c2f1be
[API] Make get_glyph() callback return a boolean
...
We need to know whether the glyph exists, so we can fallback to
composing / decomposing. Assuming that glyph==0 means "doesn't exist"
wouldn't work for applications like Pango that want to use different
"doesn't exist" glyph codes for different characters. An explicit
return value fixes that.
2011-05-12 15:14:13 -04:00
Behdad Esfahbod
805af72405
Rename get_kernings() arguments from first/second_glyph to left/right_glyph
...
Makes it clear that kerning is in visual order.
2011-05-12 12:39:40 -04:00
Behdad Esfahbod
df077fadd7
[object] Make object inert during destruction
...
Such that user_data and other finalizers cannot resurrect object
2011-05-12 01:19:39 -04:00
Behdad Esfahbod
52df150efe
Fix font subclass chainup
...
Test passing now.
2011-05-12 00:46:57 -04:00
Behdad Esfahbod
7033518f75
[API] Pass face to get_table()
2011-05-11 23:31:15 -04:00
Behdad Esfahbod
b467827806
[API] Remove const from font user_data
2011-05-11 23:25:28 -04:00
Behdad Esfahbod
9a14688e40
[API] Rename hb_face_create_for_data() to hb_face_create()
2011-05-11 22:49:29 -04:00
Behdad Esfahbod
46d6a21cc8
[API] Add hb_ot_layout_substitute_start/finish()
2011-05-11 22:33:13 -04:00
Behdad Esfahbod
c84d15f52e
Remove unused hb_set_t
2011-05-11 22:23:15 -04:00
Behdad Esfahbod
389a7c9e67
Remove hb_static_threadsafe_set_t
2011-05-11 22:21:38 -04:00
Behdad Esfahbod
e06d4eda7b
Use constructor/destructor for hb_ot_shape_plan_t
2011-05-11 22:18:31 -04:00
Behdad Esfahbod
daa446f184
Fix compile with no mutex available
2011-05-11 21:31:25 -04:00
Behdad Esfahbod
1e56c476c1
Free static mutex'es
2011-05-11 21:28:01 -04:00
Behdad Esfahbod
831886a9b4
Streamline mutex stuff
2011-05-11 21:27:52 -04:00
Behdad Esfahbod
438c4eee35
Remove unused hb_mutex_trylock()
2011-05-11 21:14:34 -04:00
Behdad Esfahbod
80a6833b03
[API] Add hb_*_get_empty() for all objects
2011-05-11 18:21:58 -04:00
Behdad Esfahbod
d3b30be378
[API] Add HB_UNTAG()
...
Useful in C API only.
2011-05-11 18:06:12 -04:00
Behdad Esfahbod
3cc6e9dcb4
Minor
2011-05-11 18:02:48 -04:00
Behdad Esfahbod
4101ca7dbb
Plug more leaks
...
All good now.
2011-05-11 14:30:56 -04:00
Behdad Esfahbod
6a7ac79e26
Plug leaks
2011-05-11 14:19:18 -04:00
Behdad Esfahbod
7aa12ebdff
[unicode] Simplify method setting
2011-05-11 11:55:11 -04:00
Behdad Esfahbod
d5bfd02721
Minor
2011-05-11 11:48:28 -04:00
Behdad Esfahbod
6a4e7e1372
Add maxp table
...
Not used for anything right now. Will use to get num_glyphs in the future.
2011-05-11 10:31:33 -04:00
Behdad Esfahbod
a513dbcf73
[API] Change signature of get_contour_point and get_kerning ffuncs
...
get_contour_point now takes glyph id before point_index.
get_kerning now takes a vector to fill-in.
2011-05-11 00:38:22 -04:00
Behdad Esfahbod
63d646fb29
[font] Do user-space conversion when chaining up to parent font
2011-05-11 00:15:37 -04:00
Behdad Esfahbod
b6f902a1a9
Minor
2011-05-11 00:04:15 -04:00
Behdad Esfahbod
abcfe9b59b
Remove hb_ot_layout_context_t, simplify code
2011-05-11 00:02:02 -04:00
Behdad Esfahbod
1ded6d8bbf
Make default font-funcs chain-up to the parent
2011-05-10 20:50:06 -04:00
Behdad Esfahbod
b9d975b931
[API] Pass down closure user_data to font funcs
2011-05-10 20:41:13 -04:00
Behdad Esfahbod
446df9cdb1
Whitespace
2011-05-10 20:14:44 -04:00
Behdad Esfahbod
686c2d165d
[API] Remove font_funcs func getter functions
2011-05-10 20:04:26 -04:00
Behdad Esfahbod
defc45be6d
[API] Add hb_font_create_sub_font() and hb_font_get_parent()
...
Not quite useful just yet.
2011-05-10 20:02:49 -04:00
Behdad Esfahbod
11bb8fe7b3
[font] Fix internal sign of x/y_scale
...
Should have been done as part of da97541988
2011-05-10 19:57:00 -04:00
Behdad Esfahbod
85e6218e33
[API] Remove broken-by-design hb_font_unset_funcs()
2011-05-10 19:40:44 -04:00
Behdad Esfahbod
74f1d896f2
Add hb_font_make/is_immutable()
2011-05-10 19:39:32 -04:00
Behdad Esfahbod
8c7a100a4d
Fix build without mutex
2011-05-10 19:21:07 -04:00
Behdad Esfahbod
19d3035c40
Remove duplicate atomic_int implementation
2011-05-10 19:18:12 -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
1c9f8717eb
[API] Simplify blob API, remove lock
2011-05-06 22:59:42 -04:00
Behdad Esfahbod
a0f337a1cc
Remove unused hb_blob_try_writable_inplace()
2011-05-06 19:20:52 -04:00
Behdad Esfahbod
08611d5194
Add note re deadlocks
2011-05-06 16:28:10 -04:00
Behdad Esfahbod
34fb5521a5
[API] Add hb_language_get_default()
...
It uses locale information to detect default language. It's used by
hb_shape() whenever language is not set on the buffer.
Not sure how to properly test it in the test suite. Tested by observing
that with DejaVu Sans we select the proper local glyph version for U+431
under Serbian locale. See http://www.pango.org/ScriptGallery
2011-05-06 00:05:08 -04:00
Behdad Esfahbod
c78f448558
[API] Add version macros and functions
...
Step version up to 0.5.0.
Also, fix to pass "make distcheck"
2011-05-05 21:31:04 -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
46df682851
Make user_data access threadsafe
...
For now, by taking a global user_data mutex.
2011-05-05 15:33:19 -04:00
Behdad Esfahbod
218e67b9ee
Shrink code
2011-05-05 15:28:37 -04:00
Behdad Esfahbod
b8d6183ebc
Use threadsafe set implementation for hb_language lookups
...
Note that the static variable has to be a global static, as gcc
implements local statics differently and that would require linking
to libstdc++, which we don't want.
2011-05-05 15:14:04 -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
21d2c92fdf
Move code around
2011-05-05 14:47:53 -04:00
Behdad Esfahbod
265ac614ea
Replace fixed-size lookup_maps array with hb_array_t
2011-05-05 14:38:16 -04:00