diff options
author | Youngbok Shin <youngb.shin@samsung.com> | 2018-04-03 14:01:34 +0900 |
---|---|---|
committer | Youngbok Shin <youngb.shin@samsung.com> | 2018-04-03 14:01:34 +0900 |
commit | 1c272a48507bb3c7905aa30d8bf0d092b474f781 (patch) | |
tree | ba3189af507d7357414e13ec3c4351cafdd2aea4 /src/test.cc | |
parent | e3a9d0d2fe726180a0456893d22d4aaa3ddb8931 (diff) | |
download | harfbuzz-1c272a48507bb3c7905aa30d8bf0d092b474f781.tar.gz harfbuzz-1c272a48507bb3c7905aa30d8bf0d092b474f781.tar.bz2 harfbuzz-1c272a48507bb3c7905aa30d8bf0d092b474f781.zip |
Imported Upstream version 1.7.6upstream/1.7.6
Diffstat (limited to 'src/test.cc')
-rw-r--r-- | src/test.cc | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/src/test.cc b/src/test.cc index 0c90f8f..9592b37 100644 --- a/src/test.cc +++ b/src/test.cc @@ -24,9 +24,7 @@ * Google Author(s): Behdad Esfahbod */ -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif +#include "hb-private.hh" #include "hb.h" @@ -46,7 +44,7 @@ int main (int argc, char **argv) { - hb_blob_t *blob = NULL; + hb_blob_t *blob = nullptr; if (argc != 2) { fprintf (stderr, "usage: %s font-file.ttf\n", argv[0]); @@ -62,7 +60,7 @@ main (int argc, char **argv) hb_memory_mode_t mm; #ifdef HAVE_GLIB - GMappedFile *mf = g_mapped_file_new (argv[1], false, NULL); + GMappedFile *mf = g_mapped_file_new (argv[1], false, nullptr); font_data = g_mapped_file_get_contents (mf); len = g_mapped_file_get_length (mf); destroy = (hb_destroy_func_t) g_mapped_file_unref; @@ -90,7 +88,7 @@ main (int argc, char **argv) /* Create the face */ hb_face_t *face = hb_face_create (blob, 0 /* first face */); hb_blob_destroy (blob); - blob = NULL; + blob = nullptr; unsigned int upem = hb_face_get_upem (face); hb_font_t *font = hb_font_create (face); @@ -105,11 +103,11 @@ main (int argc, char **argv) hb_buffer_add_utf8 (buffer, "\xe0\xa4\x95\xe0\xa5\x8d\xe0\xa4\xb0\xe0\xa5\x8d\xe0\xa4\x95", -1, 0, -1); hb_buffer_guess_segment_properties (buffer); - hb_shape (font, buffer, NULL, 0); + hb_shape (font, buffer, nullptr, 0); unsigned int count = hb_buffer_get_length (buffer); - hb_glyph_info_t *infos = hb_buffer_get_glyph_infos (buffer, NULL); - hb_glyph_position_t *positions = hb_buffer_get_glyph_positions (buffer, NULL); + hb_glyph_info_t *infos = hb_buffer_get_glyph_infos (buffer, nullptr); + hb_glyph_position_t *positions = hb_buffer_get_glyph_positions (buffer, nullptr); for (unsigned int i = 0; i < count; i++) { |