| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright © 2010,2011 Google, Inc. | 2 * Copyright © 2010,2011 Google, Inc. |
| 3 * | 3 * |
| 4 * This is part of HarfBuzz, a text shaping library. | 4 * This is part of HarfBuzz, a text shaping library. |
| 5 * | 5 * |
| 6 * Permission is hereby granted, without written agreement and without | 6 * Permission is hereby granted, without written agreement and without |
| 7 * license or royalty fees, to use, copy, modify, and distribute this | 7 * license or royalty fees, to use, copy, modify, and distribute this |
| 8 * software and its documentation for any purpose, provided that the | 8 * software and its documentation for any purpose, provided that the |
| 9 * above copyright notice and the following two paragraphs appear in | 9 * above copyright notice and the following two paragraphs appear in |
| 10 * all copies of this software. | 10 * all copies of this software. |
| (...skipping 14 matching lines...) Expand all Loading... |
| 25 */ | 25 */ |
| 26 | 26 |
| 27 #ifdef HAVE_CONFIG_H | 27 #ifdef HAVE_CONFIG_H |
| 28 #include "config.h" | 28 #include "config.h" |
| 29 #endif | 29 #endif |
| 30 | 30 |
| 31 #include "hb.h" | 31 #include "hb.h" |
| 32 #include "hb-ot.h" | 32 #include "hb-ot.h" |
| 33 | 33 |
| 34 #ifdef HAVE_GLIB | 34 #ifdef HAVE_GLIB |
| 35 #include <glib.h> | 35 # include <glib.h> |
| 36 # if !GLIB_CHECK_VERSION (2, 22, 0) |
| 37 # define g_mapped_file_unref g_mapped_file_free |
| 38 # endif |
| 36 #endif | 39 #endif |
| 37 #include <stdlib.h> | 40 #include <stdlib.h> |
| 38 #include <stdio.h> | 41 #include <stdio.h> |
| 39 | 42 |
| 40 #ifdef HAVE_FREETYPE | 43 #ifdef HAVE_FREETYPE |
| 41 #include "hb-ft.h" | 44 #include "hb-ft.h" |
| 42 #endif | 45 #endif |
| 43 | 46 |
| 44 int | 47 int |
| 45 main (int argc, char **argv) | 48 main (int argc, char **argv) |
| (...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 94 #endif | 97 #endif |
| 95 | 98 |
| 96 unsigned int len = argc - 3; | 99 unsigned int len = argc - 3; |
| 97 hb_codepoint_t glyphs[2]; | 100 hb_codepoint_t glyphs[2]; |
| 98 if (!hb_font_glyph_from_string (font, argv[3], -1, &glyphs[0]) || | 101 if (!hb_font_glyph_from_string (font, argv[3], -1, &glyphs[0]) || |
| 99 (argc > 4 && | 102 (argc > 4 && |
| 100 !hb_font_glyph_from_string (font, argv[4], -1, &glyphs[1]))) | 103 !hb_font_glyph_from_string (font, argv[4], -1, &glyphs[1]))) |
| 101 return 2; | 104 return 2; |
| 102 return !hb_ot_layout_lookup_would_substitute (face, strtol (argv[2], NULL, 0),
glyphs, len, false); | 105 return !hb_ot_layout_lookup_would_substitute (face, strtol (argv[2], NULL, 0),
glyphs, len, false); |
| 103 } | 106 } |
| OLD | NEW |