summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorwl <wl>2010-12-18 09:13:16 +0000
committerwl <wl>2010-12-18 09:13:16 +0000
commit81d80a6f71cc6d6fbd3d1111498318fb22a6857a (patch)
tree998eb2024c65eb8da534b6f1448f63d434575f85 /doc
parent995c9418dc28ee74941ca052ed98b246faf5d3dd (diff)
downloadgroff-81d80a6f71cc6d6fbd3d1111498318fb22a6857a.tar.gz
Improve CJK support with new values for `.cflags'.
This patch introduces three new values to `.cflags': don't break before character: 128 don't break after character: 256 allow inter-character break: 512 They are handled differently if compared to other cflags values: (1) hcode values are completely ignored (2) similar to kern values, and contrary to the other cflags values, troff looks at pairs of characters to decide whether a break gets inserted A yet-to-be-written patch should add inter-character spacing if those flags are active; currently, only zero-width breakpoints are inserted. * src/roff/troff/charinfo.h (charinfo): Change type of `flags' to `int'. Update callers accordingly. New enum values `DONT_BREAK_BEFORE', `DONT_BREAK_AFTER', and `INTER_CHAR_SPACE'. New member functions `prohibit_break_before', `prohibit_break_after', and `inter_char_space'. * src/roff/troff/input.cpp: Updated. * src/roff/troff/node.cpp (inter_char_space_node): New class similar to kern_pair_node, collecting charinfo entities with the abovementioned cflags values. (break_char_type): Add new enum values. (glyph_node::merge_glyph_node): Handle abovementioned cflags values and emit an `inter_char_space_node' if necessary. * tmac/ja.tmac: Use new cflags values. * doc/groff.texinfo, NEWS, man/groff_diff.man: Document new values.
Diffstat (limited to 'doc')
-rw-r--r--doc/groff.texinfo21
1 files changed, 21 insertions, 0 deletions
diff --git a/doc/groff.texinfo b/doc/groff.texinfo
index 42cf6166..dc81fb5a 100644
--- a/doc/groff.texinfo
+++ b/doc/groff.texinfo
@@ -9537,6 +9537,27 @@ into your document. Note, however, that this can lead to bad layout if
done without thinking; in most situations, a better solution instead of
changing the @code{cflags} value is to insert @code{\:} right after the
hyphen at the places which really need a break point.
+
+@item 128
+Prohibit a line break before the character, but allow a line break after
+the character. This works only in combination with flags 256 and 512
+(see below) and has no effect otherwise.
+
+@item 256
+Prohibit a line break after the character, but allow a line break before
+the character. This works only in combination with flags 128 and 512
+(see below) and has no effect otherwise.
+
+@item 512
+Allow line break before or after the character. This works only in
+combination with flags 128 and 256 and has no effect otherwise.
+
+Contrary to flag values 2 and@tie{}4, the flags 128, 256, and 512 work
+pairwise. If, for example, the left character has value 512, and the
+right character 128, no line break gets inserted. If we use
+value@tie{}6 instead for the left character, a line break after the
+character can't be suppressed since the right neighbour character
+doesn't get examined.
@end table
@endDefreq