diff options
author | Mattias Andrée <maandree@kth.se> | 2021-10-30 00:42:57 +0200 |
---|---|---|
committer | Mattias Andrée <maandree@kth.se> | 2021-10-30 00:47:12 +0200 |
commit | c944b102ae83acb343b677a9ce8f9ba288170188 (patch) | |
tree | 1135c16f830408f7e475adc9167c46fb199c0524 /demo.c | |
parent | Second commit (diff) | |
download | libparsepcf-c944b102ae83acb343b677a9ce8f9ba288170188.tar.gz libparsepcf-c944b102ae83acb343b677a9ce8f9ba288170188.tar.bz2 libparsepcf-c944b102ae83acb343b677a9ce8f9ba288170188.tar.xz |
Add readme, let use know the demo makes an assumption about the encoding, and remove old testing code1.0
Signed-off-by: Mattias Andrée <maandree@kth.se>
Diffstat (limited to '')
-rw-r--r-- | demo.c | 6 |
1 files changed, 2 insertions, 4 deletions
@@ -471,9 +471,6 @@ print_glyph(size_t glyph) } printf("\n"); - font_ascent = 15; - font_descent = 5; - extra_left = mtx.left_side_bearing > 0 ? (size_t)mtx.left_side_bearing : 0; extra_right = mtx.character_width > mtx.right_side_bearing ? (size_t)(mtx.character_width - mtx.right_side_bearing) : 0; print_width = extra_left + width + extra_right; @@ -722,7 +719,7 @@ print_line(const char *str) lo -= (size_t)font.encoding.min_byte2; glyph = hi * (size_t)(font.encoding.max_byte2 - font.encoding.min_byte2 + 1) + lo; } - /* TODO we are assuming ASCII/UCS-2 */ + /* For the purpose of the demo we are assuming ASCII/UCS-2 */ if (libparsepcf_get_glyph_indices(file, len, font.enc_table, &font.encoding, &glyph, glyph, 1)) { perror("libparsepcf_get_glyph_indices"); exit(1); @@ -772,6 +769,7 @@ main(int argc, char *argv[]) glyph = (size_t)strtoul(argv[1], NULL, 16); print_glyph(glyph); } else { + printf("This demo assumes the font uses ASCII or UCS-2 encoding\n"); for (; argc--; argv++) { print_line(*argv); printf("\n"); |