diff options
author | Ed Schouten <ed@FreeBSD.org> | 2013-12-20 21:31:50 +0000 |
---|---|---|
committer | Ed Schouten <ed@FreeBSD.org> | 2013-12-20 21:31:50 +0000 |
commit | a6c26592f1bbe194e6f4df159813d28b2f967803 (patch) | |
tree | 6b12de7f6b54baecfd56db911a6a2b9c8852b2d2 /sys/sys | |
parent | 5c3c61083520ec19b5791288f29e7de17ff8560e (diff) | |
download | src-a6c26592f1bbe194e6f4df159813d28b2f967803.tar.gz src-a6c26592f1bbe194e6f4df159813d28b2f967803.zip |
Extend libteken to support CJK fullwidth characters.
Introduce a new formatting bit (TF_CJK_RIGHT) that is set when putting a
cell that is the right part of a CJK fullwidth character. This will
allow drivers like vt(9) to support fullwidth characters properly.
emaste@ has a patch to extend vt(9)'s font handling to increase the
number of Unicode -> glyph maps from 2 ({normal,bold)} to 4
({normal,bold} x {left,right}). This will need to use this formatting
bit to determine whether to draw the left or right glyph.
Reviewed by: emaste
Notes
Notes:
svn path=/head/; revision=259667
Diffstat (limited to 'sys/sys')
-rw-r--r-- | sys/sys/terminal.h | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/sys/sys/terminal.h b/sys/sys/terminal.h index 146b9acdd084..e76190b500a5 100644 --- a/sys/sys/terminal.h +++ b/sys/sys/terminal.h @@ -62,15 +62,14 @@ struct tty; * * Bits Meaning * 0-20: Character value - * 21: Unused - * 22-25: Bold, underline, blink, reverse + * 21-25: Bold, underline, blink, reverse, right part of CJK fullwidth character * 26-28: Foreground color * 29-31: Background color */ typedef uint32_t term_char_t; #define TCHAR_CHARACTER(c) ((c) & 0x1fffff) -#define TCHAR_FORMAT(c) (((c) >> 22) & 0xf) +#define TCHAR_FORMAT(c) (((c) >> 21) & 0x1f) #define TCHAR_FGCOLOR(c) (((c) >> 26) & 0x7) #define TCHAR_BGCOLOR(c) ((c) >> 29) |