src/hb-common.cc


Log

Author Commit Date CI Message
Khaled Hosny ea6a172f 2025-03-24T00:33:53 11.0.0
Behdad Esfahbod 4807a021 2025-03-12T18:27:27 [atomic] Kill hb_atomic_ptr_t<T> Use hb_atomic_t<T *> instead.
Behdad Esfahbod 829d1eda 2025-03-12T18:19:04 [atomic] Clean up atomic_ptr_t
Behdad Esfahbod a0d76c5b 2025-03-12T16:33:13 [atomic] Templatize
Behdad Esfahbod 5bf81c37 2025-03-11T22:46:16 [common] Make hb_malloc() et al public New API: +hb_malloc() +hb_calloc() +hb_realloc() +hb_free()
Matthias Clasen 79c991e1 2025-03-08T18:20:06 Improve docs for feature and variation serialization Clarify that the serialized forms of features and variations won't have any whitespace in them. This can help for parsing when embedding these strings into larger serializations.
Behdad Esfahbod 021b4438 2025-01-10T13:57:16 Garay script is RTL Fixes https://github.com/harfbuzz/harfbuzz/issues/4996
Ozkan Sezer c2f8f35a 2024-03-15T18:45:24 Use inttypes.h PRI?32 macros in format strings for [u]int32_t args. This is a modified and cleaned-up version of PR #4619 by @jpcomito: hb-common.h now expects 'inttypes.h' presence with MSVC exceptions, defines __STDC_FORMAT_MACROS in there (if not already defined) and undoes c930ae2 (PR #1974) and 902ab86. Co-authored-by: jcomito <jcomito@google.com>
Behdad Esfahbod 595def8f 2024-03-14T12:34:39 Revert "Fixing compiler warnings" This reverts commit 61a1ba2ff0fc1b1ed9db0b7c1dd0f59a4312e6e6.
jcomito 61a1ba2f 2024-03-12T21:34:14 Fixing compiler warnings All warning are for format specifiers (-WFormat) in sprintf().
jfkthame f360d704 2023-09-29T13:15:01 Check for closing quote in parse_tag Fixes #4414.
Behdad Esfahbod e8eb1dc5 2023-08-09T15:35:59 [parse_tag] Accept non-ALNUM in tag name
Simon Cozens 2d863462 2023-03-10T14:32:39 Add Tifinagh to list of both-directions scripts
Behdad Esfahbod 5b50b077 2023-02-19T20:30:38 [subset-cff] Make BCD writing locale-independent
Behdad Esfahbod 59c45f6d 2022-11-22T12:54:50 Use hb_memcpy instead of memcpy consistently
Behdad Esfahbod ac0efaf8 2022-11-22T12:50:36 Use hb_memset instead of memset consistently
Lorenz Wildberg 2ee42bba 2022-11-01T13:00:18 hb_variation_to_string: Fix GIR annotation
Behdad Esfahbod f73c15ca 2022-08-03T12:54:03 [atomic-int] Add operators for relaxed ops
Khaled Hosny 40b21edf 2022-07-23T16:45:32 5.0.0
Behdad Esfahbod f7f6d278 2022-07-17T22:15:42 Add hb_language_matches() New API: + hb_language_matches()
Khaled Hosny 98e90cc6 2022-06-30T08:43:57 [docs] Reduce warnings Use markdown syntax for inline code blocks instead of %true, %false, and %NULL.
Behdad Esfahbod c859cbfb 2022-06-16T13:55:12 Mark an array as static Not sure how this wasn't flagged before.
Behdad Esfahbod 68937238 2022-02-11T13:16:25 [machinery] Allow using lazy-loader with void* Fixes https://github.com/harfbuzz/harfbuzz/issues/3427
Behdad Esfahbod 91b779e2 2022-01-28T13:52:15 Avoid redefinition of HB_NO_SETLOCALE in certain configs
Behdad Esfahbod 589bea15 2022-01-15T17:55:10 Fix previous commit
Behdad Esfahbod b97e4f70 2022-01-15T17:47:51 Further adjust setlocale Fixes https://github.com/harfbuzz/harfbuzz/issues/3375#issuecomment-1013783496
Behdad Esfahbod 13643934 2022-01-12T10:54:28 Clean up HB_NO_SETLOCALE https://github.com/harfbuzz/harfbuzz/pull/3358#pullrequestreview-850500143
Behdad Esfahbod a45a6305 2022-01-08T15:47:33 Fix unintentional locale dependency (#3358) Avoid unintentional locale dependency hb_variation_to_string uses sprintf with %g, which will produce a locale-dependent decimal point, which is not desired here. The output is supposed to be compatible with CSS syntax, and that always uses '.' for the decimal point. Fix this by changing the per-thread locale to "C" around sprintf call. Fixes https://github.com/harfbuzz/harfbuzz/issues/3355 Fixes https://github.com/harfbuzz/harfbuzz/pull/3357 Fixes https://github.com/harfbuzz/harfbuzz/pull/3358 Co-authored-by: Matthias Clasen <mclasen@redhat.com>
David Corbett 7b05eec0 2021-09-14T17:51:11 [Unicode 14] Update the script direction list
Behdad Esfahbod ed116320 2021-09-14T07:09:54 Call atexit() via hb_atexit() Part of https://github.com/harfbuzz/harfbuzz/issues/3197
Behdad Esfahbod 2337f0d0 2021-07-08T10:58:50 Internally use hb_malloc/.../hb_free instead of malloc/.../free Redefining those stock names as macros was conflicting with gcc 10 headers. Fixes https://github.com/harfbuzz/harfbuzz/issues/3044
Behdad Esfahbod bb48bf52 2021-07-08T10:53:45 Rename misc uses of "free" In preparation for fixing https://github.com/harfbuzz/harfbuzz/issues/3044
Khaled Hosny 4bfa0b3c 2020-12-31T16:30:05 [docs] Fix hb_color_get_* docs
Khaled Hosny 9b602e8e 2020-12-30T23:28:54 [docs] Complete hb-common docs a bit
Khaled Hosny a8e72ee7 2020-12-30T23:08:40 [docs] Use %true and %false consistently
Khaled Hosny 8586f159 2020-12-24T22:23:47 [docs] Update hb-common documentation
Nathan Willis 4cdb12a3 2019-04-21T20:31:09 [docs] Add gtkdoc comments to hb-common
David Corbett 3bd43bd0 2020-11-16T21:55:02 Map more ISO 15924 variants to `hb_script_t`s
David Corbett fd748fac 2020-03-15T15:59:31 Update to Unicode 13.0.0
David Corbett 665483c9 2020-04-01T17:28:12 Recognize Elymaic as a right-to-left script
Evgeniy Reizner b79ceac3 2019-12-15T16:50:01 Prefer UINT_MAX instead of uint overflow. Also, prefer HB_FEATURE_GLOBAL_START and HB_FEATURE_GLOBAL_END.
Evgeniy Reizner b618e0ae 2019-12-15T16:26:50 Remove non-breaking spaces from comments. `0xC2A0` was used, for some reasons. It's not really a problem, but Qt Creator constatly trying to replace them with regular spaces, so I have to edit those files separately.
Behdad Esfahbod eefb78f6 2019-12-08T21:07:00 Minor
Behdad Esfahbod 0414341a 2019-12-05T11:26:39 Prefer AAT shaping over OT if both available Fixes https://github.com/harfbuzz/harfbuzz/issues/1529
Ebrahim Byagowi e6909ee5 2019-09-18T22:12:25 minor
Ebrahim Byagowi d8af9ee0 2019-09-18T00:47:55 Don't rely on nullptr deref recovery Fixes this -fno-sanitize-recover=undefined fail, /types/language: hb-common.cc:385:20: runtime error: member access within null pointer of type 'const struct hb_language_impl_t' #0 0x4caa34 in hb_language_to_string /home/user/code/harfbuzz/src/hb-common.cc:385:20 #1 0x4c9be8 in test_types_language /home/user/code/harfbuzz/test/api/test-common.c:205:3 #2 0x7f9557e72f49 (/usr/lib/x86_64-linux-gnu/libglib-2.0.so.0+0x72f49) #3 0x7f9557e72e7a (/usr/lib/x86_64-linux-gnu/libglib-2.0.so.0+0x72e7a) #4 0x7f9557e73121 in g_test_run_suite (/usr/lib/x86_64-linux-gnu/libglib-2.0.so.0+0x73121) #5 0x7f9557e73140 in g_test_run (/usr/lib/x86_64-linux-gnu/libglib-2.0.so.0+0x73140) #6 0x4c88a3 in hb_test_run /home/user/code/harfbuzz/test/api/./hb-test.h:88:10 #7 0x4c88a3 in main /home/user/code/harfbuzz/test/api/test-common.c:224:10 #8 0x7f9556e64b96 in __libc_start_main /build/glibc-OTsEL5/glibc-2.27/csu/../csu/libc-start.c:310 #9 0x41e7d9 in _start (/home/user/code/harfbuzz/test/api/test-common+0x41e7d9)
Ebrahim Byagowi 80613e5b 2019-09-07T14:25:54 Minor, remove unused header
Ebrahim Byagowi 57f88e11 2019-09-04T01:20:50 [number] Turn hb_parse_float into hb_parse_double
Ebrahim Byagowi b5e6805e 2019-09-03T15:23:40 [number] Minor tweak on parser related codes
Ebrahim Byagowi a77bb7eb 2019-09-03T14:49:14 Move hb_codepoint_parse to hb_parse_uint
Ebrahim Byagowi 43372fbb 2019-09-03T01:02:40 Merge and aggregate number parsing logics to form hb-number
Ebrahim Byagowi a0b4ac4d 2019-08-24T17:57:14 Turn 8 spaces to tab across the project According to the current code style of the project
GaryQian ccf14482 2019-06-24T12:57:13 Cast long->size_t to ensure comparison of similar types
Ebrahim Byagowi 19b8eb08 2019-06-11T01:33:30 Move HB_NO_SETLOCALE to closer place to its to unbreak HB_TINY build (#1768)
Behdad Esfahbod 1da08917 2019-05-24T15:41:34 Put back Since: tags for hb_color_get_*
Behdad Esfahbod c572732f 2019-05-13T15:41:09 Fix more excess semi-colon errors
Behdad Esfahbod 41248cce 2019-05-07T20:54:31 Remove MIN/MAX in favor of hb_min/hb_max
Ebrahim Byagowi f27fdca4 2019-04-30T13:01:04 [doc] Add documentation to hb_color_get_* and hb_directwrite_face_* (#1690)
Ebrahim Byagowi 9542bdd0 2019-04-29T14:52:28 Add color channels getters ABI (#1513) So can be used with language wrappers
David Corbett 5daeff3e 2019-04-17T09:11:44 Fix "hb_script_" doc typo
Behdad Esfahbod 54ece299 2019-04-16T16:45:53 Use type aliasing for meta-functions, ie. those returning a type
David Corbett 087b9a0a 2019-02-18T22:30:40 Fix or document unsupported font-feature-settings
David Corbett 45adc185 2019-02-18T22:30:40 Fix or document unsupported font-feature-settings
Khaled Hosny 6bd4c082 2019-02-19T02:23:58 [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.
Ebrahim Byagowi e4120085 2018-12-17T21:31:01 Remove redundant void from C++ sources (#1486)
Ebrahim Byagowi b2ebaa9a 2018-12-16T22:38:10 Remove redundant 'inline' from methods (#1483)
Behdad Esfahbod f99abcc3 2018-11-24T00:22:21 Add template-function convenience macros
David Corbett 018ba46e 2018-11-23T13:21:22 Don't canonicalize '@' to '-' in language tags Fixes #1406.
Behdad Esfahbod b89c7fd3 2018-11-21T12:32:48 Allow defining HB_USE_ATEXIT to 0 That's better use of that value than requiring extra macro HB_NO_ATEXIT
Behdad Esfahbod f6fc5574 2018-11-05T13:23:54 Add pointer magic operators to hb_atomic_ptr_t
Behdad Esfahbod cf5fa57f 2018-10-27T04:50:38 [docs] Change section titles again I think I like the uniform "hb-*" more.
Behdad Esfahbod 00cf4e5e 2018-10-27T04:07:33 [docs] Fill in some sections
Behdad Esfahbod 8869436c 2018-10-23T03:07:48 When parsing feature ranges, accept ';' instead of ':'
Behdad Esfahbod 07386ea4 2018-10-22T21:18:27 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).
Bruce Mitchener 8d1e479d 2018-10-18T22:18:42 Use bool literals instead of 0/1.
David Corbett a03f5f4d 2017-12-28T22:59:29 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.
Behdad Esfahbod 7e6e5bf6 2018-10-10T18:59:07 Fix option string matching
Behdad Esfahbod 38a7a8a8 2018-10-10T17:44:46 Allow HB_OPTIONS=aat to prefer AAT tables over OT Fixes https://github.com/harfbuzz/harfbuzz/issues/322
Ebrahim Byagowi 5de2d9cd 2018-10-04T02:14:18 Minor, fix double-promotion warnings (#1221)
Behdad Esfahbod ba0f0f15 2018-09-30T03:49:52 Document setlocale() threadsafety issue "Fixes" //github.com/harfbuzz/harfbuzz/issues/1191
David Corbett d8d1e7df 2018-09-17T11:09:51 Don't enforce a native direction for Old Hungarian
Behdad Esfahbod becd84aa 2018-09-11T01:26:18 Add HB_FEATURE_GLOBAL_START/END Fixes https://github.com/harfbuzz/harfbuzz/issues/1141 New API: HB_FEATURE_GLOBAL_START HB_FEATURE_GLOBAL_END
Behdad Esfahbod c77ae408 2018-08-25T22:36:36 Rename hb-*private.hh to hb-*.hh Sorry for the noise, downstream custom builders. Please adjust.
Emil A Eklund 22defe09 2018-08-14T14:47:20 Add guard around free_static_C_locale Add HB_USE_ATEXIT guard around free_static_C_locale missed by previous commit.
Behdad Esfahbod 6750ec69 2018-08-12T17:42:16 [lazy] Use for C_locale
Martin Hosken 39607dc9 2018-08-09T15:16:32 Support _ in feature ids
Behdad Esfahbod 1f738094 2018-08-09T00:22:37 [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".
Behdad Esfahbod 4bc16aca 2018-07-31T21:05:51 [atomic] Add get_relaxed / set_relaxed To help TSan and be more "correct".
Behdad Esfahbod e22a48ac 2018-07-23T13:24:26 One more visibility trick Should fix Windows build again.
Behdad Esfahbod be458eb0 2018-07-10T14:41:04 Include more basic internal headers from hb-private.hh
David Corbett 46d8f0d5 2018-07-06T15:47:03 Do not enforce a native direction of LTR for Runic Fixes #481
Behdad Esfahbod 060e6b4a 2018-06-05T17:31:46 Update to Unicode 11.0.0 UCDN is not updated yet.
Behdad Esfahbod f673cfbd 2018-05-07T13:58:32 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
Behdad Esfahbod a60ba796 2018-05-01T19:01:25 s/finish/fini For consistency.
Ebrahim Byagowi f24b0b97 2018-04-12T13:40:45 Update the links and revive the dead ones
Ebrahim Byagowi 70d36543 2018-03-30T05:00:28 Make atexit callbacks threadsafe (#930)
Behdad Esfahbod 5aa2c6e1 2018-03-28T15:33:51 [atexit] Make hb_languate_item_t *langs freeing threadsafe Part of https://github.com/harfbuzz/harfbuzz/issues/923
Bruce Mitchener 90218fa9 2018-01-31T20:44:45 Fix typos.
Cosimo Lupo c8f2a4f5 2018-01-18T22:49:40 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
David Corbett 85bb89a8 2017-12-04T15:15:27 Fix string matching in parse_bool