mirror of
https://github.com/rkd77/elinks.git
synced 2024-11-02 08:57:19 -04:00
text direction mark
This commit is contained in:
parent
a75e8dd35c
commit
5e31308da0
@ -640,7 +640,9 @@ good_char:
|
|||||||
#endif /* CONFIG_COMBINE */
|
#endif /* CONFIG_COMBINE */
|
||||||
part->spaces[x] = (data == UCS_SPACE);
|
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;
|
schar->data = (unicode_val_T)data;
|
||||||
part->char_width[x] = 2;
|
part->char_width[x] = 2;
|
||||||
copy_screen_chars(&POS(x++, y), schar, 1);
|
copy_screen_chars(&POS(x++, y), schar, 1);
|
||||||
|
@ -605,12 +605,13 @@ invalid_arg:
|
|||||||
* libc version of wcwidth, and instead use a hardcoded mapping.
|
* libc version of wcwidth, and instead use a hardcoded mapping.
|
||||||
*
|
*
|
||||||
* @return 2 for double-width glyph, 1 for others.
|
* @return 2 for double-width glyph, 1 for others.
|
||||||
* TODO: May be extended to return 0 for zero-width glyphs
|
* 0 for unprintable glyphs (like 0x200e: "LEFT-TO-RIGHT MARK")
|
||||||
* (like composing, maybe unprintable too).
|
|
||||||
*/
|
*/
|
||||||
NONSTATIC_INLINE int
|
NONSTATIC_INLINE int
|
||||||
unicode_to_cell(unicode_val_T c)
|
unicode_to_cell(unicode_val_T c)
|
||||||
{
|
{
|
||||||
|
if (c == 0x200e || c == 0x200f)
|
||||||
|
return 0;
|
||||||
if (c >= 0x1100
|
if (c >= 0x1100
|
||||||
&& (c <= 0x115f /* Hangul Jamo */
|
&& (c <= 0x115f /* Hangul Jamo */
|
||||||
|| c == 0x2329
|
|| c == 0x2329
|
||||||
|
Loading…
Reference in New Issue
Block a user