aboutsummaryrefslogtreecommitdiff
path: root/sys/teken/teken.h
diff options
context:
space:
mode:
authorEd Schouten <ed@FreeBSD.org>2013-12-20 21:31:50 +0000
committerEd Schouten <ed@FreeBSD.org>2013-12-20 21:31:50 +0000
commita6c26592f1bbe194e6f4df159813d28b2f967803 (patch)
tree6b12de7f6b54baecfd56db911a6a2b9c8852b2d2 /sys/teken/teken.h
parent5c3c61083520ec19b5791288f29e7de17ff8560e (diff)
downloadsrc-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/teken/teken.h')
-rw-r--r--sys/teken/teken.h9
1 files changed, 5 insertions, 4 deletions
diff --git a/sys/teken/teken.h b/sys/teken/teken.h
index a9bca98e9669..27d1ce404740 100644
--- a/sys/teken/teken.h
+++ b/sys/teken/teken.h
@@ -41,10 +41,11 @@
typedef uint32_t teken_char_t;
typedef unsigned short teken_unit_t;
typedef unsigned char teken_format_t;
-#define TF_BOLD 0x01
-#define TF_UNDERLINE 0x02
-#define TF_BLINK 0x04
-#define TF_REVERSE 0x08
+#define TF_BOLD 0x01 /* Bold character. */
+#define TF_UNDERLINE 0x02 /* Underline character. */
+#define TF_BLINK 0x04 /* Blinking character. */
+#define TF_REVERSE 0x08 /* Reverse rendered character. */
+#define TF_CJK_RIGHT 0x10 /* Right-hand side of CJK character. */
typedef unsigned char teken_color_t;
#define TC_BLACK 0
#define TC_RED 1