Now breaks the line after the last whitespace, not the first.

I cleaned things up a bit, and I've made logging optional since I don't yet
trust the code fully.

A Wylie underscore at the end of a line is worth looking into further, at the
very least.
This commit is contained in:
dchandler 2002-10-28 04:12:49 +00:00
parent 8433369d60
commit fd1b4dd468
4 changed files with 130 additions and 36 deletions

View file

@ -1117,4 +1117,33 @@ public static boolean isTopVowel(DuffCode dc) {
return false;
}
/** Returns true if and only if ch, which is an ASCII character
that you can think of as an arbitrary index into one of the
Tibetan fonts, is a character that is appropriate for ending a
line of Tibetan. <code>'-'</code>, for example, represents
the tsheg (the little dot after a syllable) in (FIXME: Edward,
is this true?) all of the TMW fonts. Thus, this would return
true for <code>'-'</code>.
Note that ch is <b>not</b> the Wylie transliteration; it is an
arbitrary character (well, not quite, since ' ', '\t', '\n' et
cetera seem to have been wisely chosen to represent Tibetan
whitespace, but pretty arbitrary). If you open up MS Word,
select TibetanMachineWeb1, and type a hyphen,
i.e. <code>'-'</code>, you'll see a tsheg appear. If you open
Jskad and type a hyphen, you won't see a tsheg.
@param ch the ASCII character "index" into the TMW font
@return true iff this is a tsheg or whitespace or the like */
public static boolean isTMWFontCharBreakable(char ch) {
return ('-' == ch /* FIXME: this is the tsheg (i.e., the Wylie is ' '), but we have no constant for it. */
|| ' ' == ch /* FIXME: this is space (i.e., the Wylie is '_'), but we have no constant for it. */
|| '\t' == ch /* FIXME: this is some sort of whitespace */
|| '\n' == ch /* FIXME: this is some sort of whitespace */
);
// FIXME: am I missing anything? tabs etc.?
}
}