1
0
mirror of https://github.com/rkd77/elinks.git synced 2024-07-26 16:45:12 -04:00

text direction mark

This commit is contained in:
Marco Migliori 2017-05-16 18:37:29 +02:00 committed by Witold Filipczyk
parent a75e8dd35c
commit 5e31308da0
2 changed files with 6 additions and 3 deletions

View File

@ -640,7 +640,9 @@ good_char:
#endif /* CONFIG_COMBINE */
part->spaces[x] = (data == UCS_SPACE);
if (unicode_to_cell(data) == 2) {
if (unicode_to_cell(data) == 0)
continue;
else if (unicode_to_cell(data) == 2) {
schar->data = (unicode_val_T)data;
part->char_width[x] = 2;
copy_screen_chars(&POS(x++, y), schar, 1);

View File

@ -605,12 +605,13 @@ invalid_arg:
* libc version of wcwidth, and instead use a hardcoded mapping.
*
* @return 2 for double-width glyph, 1 for others.
* TODO: May be extended to return 0 for zero-width glyphs
* (like composing, maybe unprintable too).
* 0 for unprintable glyphs (like 0x200e: "LEFT-TO-RIGHT MARK")
*/
NONSTATIC_INLINE int
unicode_to_cell(unicode_val_T c)
{
if (c == 0x200e || c == 0x200f)
return 0;
if (c >= 0x1100
&& (c <= 0x115f /* Hangul Jamo */
|| c == 0x2329