| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright © 2013 Google, Inc. | 2 * Copyright © 2013 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 187 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 198 * We could cache the width of the tone marks and the existence of dotted-
circle, | 198 * We could cache the width of the tone marks and the existence of dotted-
circle, |
| 199 * but the use of the Hangul tone mark characters seems to be rare enough
that | 199 * but the use of the Hangul tone mark characters seems to be rare enough
that |
| 200 * I didn't bother for now. | 200 * I didn't bother for now. |
| 201 */ | 201 */ |
| 202 if (start < end && end == buffer->out_len) | 202 if (start < end && end == buffer->out_len) |
| 203 { | 203 { |
| 204 /* Tone mark follows a valid syllable; move it in front, unless it's zer
o width. */ | 204 /* Tone mark follows a valid syllable; move it in front, unless it's zer
o width. */ |
| 205 buffer->next_glyph (); | 205 buffer->next_glyph (); |
| 206 if (!is_zero_width_char (font, u)) | 206 if (!is_zero_width_char (font, u)) |
| 207 { | 207 { |
| 208 buffer->merge_out_clusters (start, end + 1); |
| 208 hb_glyph_info_t *info = buffer->out_info; | 209 hb_glyph_info_t *info = buffer->out_info; |
| 209 hb_glyph_info_t tone = info[end]; | 210 hb_glyph_info_t tone = info[end]; |
| 210 memmove (&info[start + 1], &info[start], (end - start) * sizeof (hb_gl
yph_info_t)); | 211 memmove (&info[start + 1], &info[start], (end - start) * sizeof (hb_gl
yph_info_t)); |
| 211 info[start] = tone; | 212 info[start] = tone; |
| 212 buffer->merge_out_clusters (start, end + 1); | |
| 213 } | 213 } |
| 214 } | 214 } |
| 215 else | 215 else |
| 216 { | 216 { |
| 217 /* No valid syllable as base for tone mark; try to insert dotted circle.
*/ | 217 /* No valid syllable as base for tone mark; try to insert dotted circle.
*/ |
| 218 if (font->has_glyph (0x25CCu)) | 218 if (font->has_glyph (0x25CCu)) |
| 219 { | 219 { |
| 220 hb_codepoint_t chars[2]; | 220 hb_codepoint_t chars[2]; |
| 221 if (!is_zero_width_char (font, u)) { | 221 if (!is_zero_width_char (font, u)) { |
| 222 chars[0] = u; | 222 chars[0] = u; |
| (...skipping 191 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 414 data_create_hangul, /* data_create */ | 414 data_create_hangul, /* data_create */ |
| 415 data_destroy_hangul, /* data_destroy */ | 415 data_destroy_hangul, /* data_destroy */ |
| 416 preprocess_text_hangul, | 416 preprocess_text_hangul, |
| 417 HB_OT_SHAPE_NORMALIZATION_MODE_NONE, | 417 HB_OT_SHAPE_NORMALIZATION_MODE_NONE, |
| 418 NULL, /* decompose */ | 418 NULL, /* decompose */ |
| 419 NULL, /* compose */ | 419 NULL, /* compose */ |
| 420 setup_masks_hangul, /* setup_masks */ | 420 setup_masks_hangul, /* setup_masks */ |
| 421 HB_OT_SHAPE_ZERO_WIDTH_MARKS_NONE, | 421 HB_OT_SHAPE_ZERO_WIDTH_MARKS_NONE, |
| 422 false, /* fallback_position */ | 422 false, /* fallback_position */ |
| 423 }; | 423 }; |
| OLD | NEW |