Khaled Hosny
6bd4c082e4
[doc] Document hb_feature_from_string() syntax
...
Copied and edited from the util option documentation. The docbook table
syntax is too verbose, but that is the best I can come up with.
2019-02-18 17:00:44 -08:00
Ebrahim Byagowi
e412008599
Remove redundant void from C++ sources ( #1486 )
2018-12-17 13:01:01 -05:00
Ebrahim Byagowi
b2ebaa9afa
Remove redundant 'inline' from methods ( #1483 )
2018-12-16 14:08:10 -05:00
Behdad Esfahbod
f99abcc379
Add template-function convenience macros
2018-11-24 00:24:01 -05:00
David Corbett
018ba46e4d
Don't canonicalize '@' to '-' in language tags
...
Fixes #1406 .
2018-11-23 13:21:22 -05:00
Behdad Esfahbod
b89c7fd3dc
Allow defining HB_USE_ATEXIT to 0
...
That's better use of that value than requiring extra macro HB_NO_ATEXIT
2018-11-21 12:32:48 -05:00
Behdad Esfahbod
f6fc5574d3
Add pointer magic operators to hb_atomic_ptr_t
2018-11-05 13:23:54 -05:00
Behdad Esfahbod
cf5fa57f00
[docs] Change section titles again
...
I think I like the uniform "hb-*" more.
2018-10-27 04:51:42 -07:00
Behdad Esfahbod
00cf4e5eb6
[docs] Fill in some sections
2018-10-27 04:47:41 -07:00
Behdad Esfahbod
8869436cb8
When parsing feature ranges, accept ';' instead of ':'
2018-10-23 03:07:48 -07:00
Behdad Esfahbod
07386ea410
Remove const and references when binding Null()
...
Fixes https://github.com/harfbuzz/harfbuzz/issues/1299
Removes anomaly I was seeing in cpal table trying to use implicit Null(NameID).
2018-10-22 21:21:17 -07:00
Bruce Mitchener
8d1e479d1d
Use bool literals instead of 0/1.
2018-10-19 18:05:46 +02:00
David Corbett
a03f5f4dfb
Replace "ISO 639" with "BCP 47"
...
`hb_language_from_string` accepts not only ISO 639 but also BCP 47. Not
all ISO 639 codes are valid BCP 47 tags but the function does not accept
overlong language subtags anyway.
2018-10-11 13:54:28 -04:00
Behdad Esfahbod
7e6e5bf614
Fix option string matching
2018-10-10 18:59:07 -04:00
Behdad Esfahbod
38a7a8a89e
Allow HB_OPTIONS=aat to prefer AAT tables over OT
...
Fixes https://github.com/harfbuzz/harfbuzz/issues/322
2018-10-10 17:44:46 -04:00
Ebrahim Byagowi
5de2d9cdbd
Minor, fix double-promotion warnings ( #1221 )
2018-10-04 02:14:18 +03:30
Behdad Esfahbod
ba0f0f156f
Document setlocale() threadsafety issue
...
"Fixes" //github.com/harfbuzz/harfbuzz/issues/1191
2018-09-30 06:08:11 -04:00
David Corbett
d8d1e7df00
Don't enforce a native direction for Old Hungarian
2018-09-17 18:53:25 +02:00
Behdad Esfahbod
becd84aa2f
Add HB_FEATURE_GLOBAL_START/END
...
Fixes https://github.com/harfbuzz/harfbuzz/issues/1141
New API:
HB_FEATURE_GLOBAL_START
HB_FEATURE_GLOBAL_END
2018-09-11 01:27:25 +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
Emil A Eklund
22defe0965
Add guard around free_static_C_locale
...
Add HB_USE_ATEXIT guard around free_static_C_locale missed by previous
commit.
2018-08-14 18:10:17 -07:00
Behdad Esfahbod
6750ec692c
[lazy] Use for C_locale
2018-08-12 17:42:16 -07:00
Martin Hosken
39607dc98e
Support _ in feature ids
2018-08-11 16:55:16 -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
4bc16aca47
[atomic] Add get_relaxed / set_relaxed
...
To help TSan and be more "correct".
2018-07-31 21:29:18 -07:00
Behdad Esfahbod
e22a48ac95
One more visibility trick
...
Should fix Windows build again.
2018-07-23 13:24:26 -07:00
Behdad Esfahbod
be458eb059
Include more basic internal headers from hb-private.hh
2018-07-10 14:41:04 +02:00
David Corbett
46d8f0d552
Do not enforce a native direction of LTR for Runic
...
Fixes #481
2018-07-08 17:18:25 +04:30
Behdad Esfahbod
060e6b4a13
Update to Unicode 11.0.0
...
UCDN is not updated yet.
2018-06-05 17:31:46 -07:00
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
2018-05-07 14:12:17 -07:00
Behdad Esfahbod
a60ba7964e
s/finish/fini
...
For consistency.
2018-05-01 19:01:25 -04:00
Ebrahim Byagowi
f24b0b9728
Update the links and revive the dead ones
2018-04-12 13:44:32 +04:30
Ebrahim Byagowi
70d36543aa
Make atexit callbacks threadsafe ( #930 )
2018-03-29 17:30:28 -07:00
Behdad Esfahbod
5aa2c6e194
[atexit] Make hb_languate_item_t *langs freeing threadsafe
...
Part of https://github.com/harfbuzz/harfbuzz/issues/923
2018-03-28 15:33:51 -07:00
Bruce Mitchener
90218fa93c
Fix typos.
2018-01-31 08:18:15 -08:00
Cosimo Lupo
c8f2a4f5b9
hb-common.cc: Hatran script is right-to-left ( #714 )
...
"Hatran is written from right to left horizontally"
http://www.unicode.org/L2/L2012/12312-n4324-hatran.pdf
This ancient script was added with Unicode 8.0.
Also this spreadsheet (referenced in an inline comment in the
source code) has it as RTL: http://goo.gl/x9ilM
2018-01-19 01:19:40 +03:30
David Corbett
85bb89a88b
Fix string matching in parse_bool
2017-12-04 13:10:16 -08:00
Behdad Esfahbod
7f39f57614
Implement strtod_l() on MSVC
...
Patch from Jean Ghali on mailing list.
2017-11-13 15:04:13 -08:00
Behdad Esfahbod
8eaff980fc
Remove HB_TAG_CHAR4
2017-10-31 16:54:31 -06:00
Behdad Esfahbod
dbdbfe3d7b
Use nullptr instead of NULL
2017-10-15 12:11:08 +02:00
Behdad Esfahbod
3ca69c8c32
Use strtod_l() to correctly parse decimal numbers in French & other locales
...
Test with, eg.:
$ LC_ALL=fr_FR.utf-8 ./hb-view NotoSansArabic-VF.ttf بهداد --variations wght=1.2
2017-09-14 20:50:35 -04:00
Ebrahim Byagowi
3b0e47ca00
Fix arm-none-eabi build ( fixes #451 ) ( #496 )
2017-06-19 14:47:09 +04:30
Behdad Esfahbod
7dba30639a
Handle allocation failure in hb-language code
2017-06-01 11:44:42 -04:00
Sebastian Rasmussen
92e2c4baaf
Avoid using strdup inside library. ( #488 )
...
If an application provides a malloc replacement through
hb_malloc_impl() it is important that it is used to allocate
everything, but the use of strdup() circumvents this and
causes system malloc() to be called instead. This pairs
badly with the custom hb_free_impl() being called later.
2017-05-29 10:53:30 -07:00
Chris Peterson
aacca37590
Fix clang -Wcomma warnings ( #471 ) ( #472 )
...
clang's new -Wcomma compiler option warns about possible misuse of the
comma operator such as between two statements.
hb-common.cc:190:9 [-Wcomma] possible misuse of comma operator here
hb-ot-layout-gsubgpos-private.hh:345:30 [-Wcomma] possible misuse of
comma operator here
hb-shape-plan.cc:438:26 [-Wcomma] possible misuse of comma operator here
2017-04-17 23:25:24 -07:00
Khaled Hosny
91570a1eeb
Just always use strtod here
2017-03-22 23:07:20 +02:00
Chun-wei Fan
539571c1a9
src/hb-common.cc: Fix build on older Visual Studio
...
Visual Studio only supported strtof() from Visual Studio 2013 onwards, so
use strtod() instead to do the operation, which should do the same thing,
sans going to a double, not a float.
2017-03-22 23:03:49 +02:00
Behdad Esfahbod
d2f249e745
Stub out doc comments for new symbols
2017-01-22 17:42:33 -08:00
Behdad Esfahbod
bb1e19268f
[var] Rename var_coord to variation
...
Looks much better.
2017-01-21 17:42:50 -08:00
Behdad Esfahbod
b3c0714b4b
[var] Add hb_var_coord_t and parsing routines
2017-01-20 20:30:03 -08:00
Behdad Esfahbod
72364103bc
Move code around
2017-01-20 20:16:53 -08:00
Khaled Hosny
e4d451ee55
[introspection] Fix hb_tag_from_string annotation
2016-07-02 00:04:57 +02:00
Behdad Esfahbod
691086f131
Add Unicode 9 beta scripts
...
These are frozen, so good time to add.
2016-05-06 12:09:53 +01:00
Behdad Esfahbod
80c8855cfe
Minor
2016-02-12 12:50:17 +07:00
Khaled Hosny
8ab797c5b8
[docs] A bit more buffers documentation
2015-12-30 17:59:01 +04:00
Behdad Esfahbod
ea512f7108
Use C-style casts instead of compare to 0, to convert hb_bool_t to bool
2015-11-26 19:22:22 -05:00
Behdad Esfahbod
766963adba
Merge pull request #114 from ThePhD/vc++-fixes
...
Fix all VC++ warnings and errors
2015-11-24 15:38:43 -06:00
Behdad Esfahbod
f3159ba514
Micro-optimize hb_language_from_string()
...
As measured / improved by Benson Limketkai.
2015-09-29 14:34:56 +01:00
Behdad Esfahbod
b8811429b6
Fix Since tags
...
Fixes https://github.com/behdad/harfbuzz/issues/103
2015-09-03 15:53:22 +04:30
ThePhD
5c99cf93d6
Merge branch 'master' into vc++-fixes
2015-08-14 01:02:00 -04:00
Behdad Esfahbod
64a2726e2c
Add Unicode 8.0 scripts
...
Based on https://bugzilla.mozilla.org/show_bug.cgi?id=1183209
2015-07-15 01:36:39 +01:00
ThePhD
e0a828ecbd
Back to using regular `strdup`, with an `hb-private.hh` fix that special-cases VC++'s
...
definition and usage of the words
2015-06-23 09:07:17 -04:00
ThePhD
8e545d5961
Fix all VC++ warnings and errors in the current commit's builds.
2015-06-22 22:29:04 -04:00
Behdad Esfahbod
351f68f4e0
[bindings] Fix hb_language_get_default() and hb_ot_tag_to_language()
...
Part of https://github.com/behdad/harfbuzz/issues/91
2015-06-12 17:46:06 -07:00
Sascha Brawer
01c3a88543
Fix "Since:" tags
...
Based on data from http://upstream-tracker.org/versions/harfbuzz.html
Resolves #103
2015-06-01 13:25:27 +02:00
Khaled Hosny
04f89e8f7d
[bindings] Fix ownership of returned hb_language_t
...
It should not be freed by the caller.
2015-04-10 18:17:02 +02:00
Behdad Esfahbod
f3b170bdd9
Minor
2015-04-08 16:26:24 -07:00
Khaled Hosny
a394bb6670
[bindings] Fix *_from_string functions
...
Without the element-type they will be getting garbage, at least with
Python.
2015-03-22 20:29:10 +02:00
Konstantin Ritt
675956aca0
Do not leak hb_language_t on hb_language_item_t destruction
2015-01-27 10:06:56 -08:00
Chris Peterson
fb85d618f5
Add #ifdef HB_USE_ATEXIT to fix -Wunused-function warnings
2015-01-04 19:31:10 -08:00
Chris Peterson
d1897a98d8
Fix hb_atomic_ptr_cmpexch -Wunused-value warnings
2015-01-03 19:46:19 -08: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
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
2b051c6057
Rename HB_VERSION_CHECK and hb_version_check to "atleast"
...
HB_VERSION_CHECK's comparison was originally written wrongly
by mistake. When API tests were written, they were also written
wrongly to pass given the wrong implementation... Sigh.
Given the purpose of this API, there's no point in fixing it
without renaming it. As such, rename.
API changes:
HB_VERSION_CHECK -> HB_VERSION_ATLEAST
hb_version_check -> hb_version_atleast
2014-06-20 14:09:57 -04:00
Behdad Esfahbod
a4a7899cd9
[unicode7] Mark right-to-left scripts
2014-06-18 12:22:45 -04:00
Behdad Esfahbod
dac86026a6
Fix some cppcheck warnings
...
Bug 77800 - cppcheck reports
2014-06-03 17:57:00 -04:00
jfkthame
0082dbeae6
wrap definition of free_langs() with HAVE_ATEXIT
...
...to avoid an unused function warning; see mozilla bug https://bugzilla.mozilla.org/show_bug.cgi?id=984081 .
2014-03-16 13:40:33 -07:00
Behdad Esfahbod
2a8c49ade0
Remove unnecessary includes
2013-12-11 20:24:20 -05:00
Behdad Esfahbod
48360ec03b
Bug 68990 - test-common fails on i686-linux
...
Fix use-after-end-of-scope.
2013-09-26 16:48:42 -04:00
Behdad Esfahbod
70303cf23b
[docs/introspection] Some more annotations
2013-09-06 17:38:25 -04:00
Behdad Esfahbod
cd361c3cbe
Minor change to hb_language_t
...
Let me know if this breaks anyone's anything.
2013-09-06 17:16:25 -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
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
e9171af55c
Bug 60053 - hb-common.cc:181:6: warning: ‘void free_langs()’ defined but not used
2013-01-29 22:45:00 -05:00
Behdad Esfahbod
7babfe5a79
Move object mutext into the user-data array
...
We are not using it for anything lse it seems.
2012-12-04 00:35:54 +02:00
Behdad Esfahbod
e30ebd2794
Add hb_feature_to/from_string()
2012-09-06 22:09:06 -04:00
Behdad Esfahbod
7e7d245b33
Make default_language threadsafe
2012-08-08 15:23:48 -04:00
Behdad Esfahbod
1bc1cb3603
Make source more digestable for gobject-introspection
2012-06-16 15:21:55 -04:00
Behdad Esfahbod
04aed572f1
Make hb-ft static-initializer free
2012-06-05 18:45:36 -04:00
Behdad Esfahbod
093171ccec
Implement lock-free hb_language_t
...
Another static-initialization down. One more to go.
2012-06-05 18:00:45 -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
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.
2012-04-12 17:38:23 -04:00
Behdad Esfahbod
cad3821f3d
More sorting by Unicode version
...
This is the most convenient way to browse scripts.
2012-03-07 17:13:25 -05:00
Behdad Esfahbod
fa2673c1ee
More Unicode script age annotation, and a couple more RTL scripts
...
Cross-checked with Mark Davis's spreadsheet at http://goo.gl/x9ilM
2012-03-07 15:52:02 -05:00
Behdad Esfahbod
50e810cd0e
Lydian and Kharoshthi are right-to-left
2012-03-07 12:49:08 -05: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
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
c62a8f10f3
Free all static memory upon exit
2011-08-05 19:59:02 -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
1a64f6e19a
[API] Add HB_LANGUAGE_INVALID
2011-05-13 22:55:32 -04:00