Commit Graph

28 Commits

Author SHA1 Message Date
Behdad Esfahbod ed023f66df Enable -Wformat-signedness
And fix the codebase.
2023-01-12 17:04:24 -07:00
Behdad Esfahbod bdfed8f113 [blob] Add failing versions of create API
Fixes https://github.com/harfbuzz/harfbuzz/issues/2567

New API:
+hb_blob_create_or_fail()
+hb_blob_create_from_file_or_fail()

Use these in util/ to distinguish empty file from not-found file.
Only err on the latter.
2021-06-15 13:56:30 -06:00
Behdad Esfahbod 7cb22ba7eb
Include C headers with their C++ names (#2882)
Remove unnecessary includes.

Fixes build with some known broken SDKs (Nintendo Switch?)

https://en.cppreference.com/w/cpp/header

Fixes https://github.com/harfbuzz/harfbuzz/pull/2881
2021-03-01 11:44:06 -08:00
Ebrahim Byagowi bb4cdf8e0b Replace create_from_file with empty blob if HB_NO_OPEN is defined 2019-06-24 14:35:53 -07: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
Ebrahim Byagowi ce17340b23 Add hb_blob_create_from_file, a new API (#926) 2018-04-20 07:59:06 +02:00
Behdad Esfahbod 5014c60afa More nullptr fix
Fixes https://github.com/behdad/harfbuzz/issues/585
2017-10-28 12:00:49 -06:00
Behdad Esfahbod dbdbfe3d7b Use nullptr instead of NULL 2017-10-15 12:11:08 +02:00
Behdad Esfahbod 8e5f902656 src/test.cc: wrong field printed
Fixes https://github.com/behdad/harfbuzz/issues/188
Fixes https://bugs.freedesktop.org/show_bug.cgi?id=93182
2015-11-30 16:53:21 -08:00
Behdad Esfahbod c2bc818706 Work with old and new glib
Avoids "deprecated" warnings.
2013-10-27 23:37:14 +01:00
Behdad Esfahbod 9326d48e43 Don't use g_mapped_file_unref()
Was introduced in glib 2.22.
2013-10-10 20:04:42 +02:00
Behdad Esfahbod ef9e02eddf Minor 2013-04-09 14:06:54 -04:00
Behdad Esfahbod 8a7e70ef65 [Minor] 2012-07-29 19:56:54 -04:00
Behdad Esfahbod be73a5f936 Add src/test-would-substitute tool 2012-07-19 15:12:18 -04:00
Behdad Esfahbod 3b5c22c39b Remove src/test.cc
Not really useful.
2012-01-19 14:28:11 -05:00
Behdad Esfahbod 5ddd9cc499 Minor 2011-09-16 16:40:44 -04: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 ddd247b0c5 Minor 2011-08-09 11:44:42 +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 f6d83b2dcf Minor 2011-08-07 00:59:58 -04:00
Behdad Esfahbod 892eb2e462 [uniscribe] Make font selection work
Not tested yet.
2011-08-06 22:32:07 -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 9a14688e40 [API] Rename hb_face_create_for_data() to hb_face_create() 2011-05-11 22:49:29 -04:00
Behdad Esfahbod 3cc6e9dcb4 Minor 2011-05-11 18:02:48 -04:00
Behdad Esfahbod f1425a549f Rename hb-view.c and test.c to .cc files 2011-04-27 12:15:06 -04:00