Behdad Esfahbod
f673cfbd64
Support scripts that are written both LTR and RTL
...
Right now only Old Italic is marked as such.
Fixes https://github.com/harfbuzz/harfbuzz/issues/1000
7 years ago
Behdad Esfahbod
fe28b997fb
Add HB_DIRECTION_IS_VALID
13 years ago
Behdad Esfahbod
4bf90f6483
Make HB_DIRECTION_INVALID be zero
...
This changes all the HB_DIRECTION_* enum member values, but is
nicer, in preparation for making hb_segment_properties_t public.
13 years ago
Behdad Esfahbod
4d6dafd47f
Rename test/ to test/api/
13 years ago
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()
13 years ago
Behdad Esfahbod
654f88fbc9
[test-common] Test hb_direction_to_string()
...
Caught by "make check-symbols".
14 years ago
Behdad Esfahbod
1a64f6e19a
[API] Add HB_LANGUAGE_INVALID
14 years ago
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
14 years ago
Behdad Esfahbod
6af9cff5e1
[test/unicode] Use text fixture instead of static variables
14 years ago
Behdad Esfahbod
aafe395ab5
Add test suite infrastructure
...
Wraps around glib for convenience and ease of use.
14 years ago
Behdad Esfahbod
39a840ae65
[API] Add hb_direction_from/to_string()
...
And hb-view --direction argument.
14 years ago
Behdad Esfahbod
2409d5f8d7
Update Copyright headers
14 years ago
Behdad Esfahbod
1fd73b594d
[test] Rename test-types to test-common
14 years ago
Behdad Esfahbod
f144a8ea84
[icu] Add two-way script conversion functions
...
Also optimizes the common-direction script lookup.
14 years ago
Behdad Esfahbod
62879eebd9
[API] Use ISO 15924 tags for hb_script_t
...
This simplifies the code, reduces static data, and makes the design
more extensible to future additions of new scripts.
14 years ago
Behdad Esfahbod
4744379efc
Minor
14 years ago
Behdad Esfahbod
9385caa8a6
[test] Actually hook up hb_script_t tests
...
I really shall find a way to automate the test enumeration. Otherwise
it's too easy to add a test and wrongly hook it up. Did it twice today.
14 years ago
Behdad Esfahbod
09125576ca
[test] Test hb_language_t
14 years ago
Behdad Esfahbod
db60c96f20
[teset] Test hb_script_t
14 years ago
Behdad Esfahbod
4188096a77
Make HB_TAG_CHAR4 private
...
It's just sugar.
14 years ago
Behdad Esfahbod
7ff7401c92
Make hb_tag_from_string(NULL) return HB_TAG_NONE
14 years ago
Behdad Esfahbod
07233581c9
Rename HB_TAG_STR() to HB_TAG_CHAR4()
...
The problem with HB_TAG_STR() was that it expected a string of size 4
exactly, and unlike hb_tag_from_string() it doesn't pad the tag with
space characters. So, the new name is more appropriate.
14 years ago
Behdad Esfahbod
9faa980067
Add an in-tree test suite
...
Uses the glib testing framework. Wrote unit tests for hb-common.h
types.
14 years ago