org.thdl.tib.text
Class TibetanMachineWeb

java.lang.Object
  |
  +--org.thdl.tib.text.TibetanMachineWeb

public class TibetanMachineWeb
extends Object

Interfaces between Extended Wylie and the TibetanMachineWeb fonts. To do this this must first read the code table, which lives in "tibwn.ini", and which must be found in the same directory as this class. Note that WylieWord has its own copy of this file, so edit both or neither.

In addition, this class optionally loads the TibetanMachineWeb fonts manually via #readInFontFiles().

Author:
Edward Garrett, Tibetan and Himalayan Digital Library

Field Summary
static String A_VOWEL
          the Wylie for the subscript achung vowel
static String ACHEN
          the Wylie for achen
static String ACHUNG
          the Wylie for achung
static String ai_VOWEL
          the Wylie for double drengbu
static String au_VOWEL
          the Wylie for double naro
static char BINDU
          the Wylie for bindu/anusvara
static String e_VOWEL
          the Wylie for drengbu
static int HALF_C
          represents where in an array of DuffCodes you find the half height equivalence of a given glyph
static String i_VOWEL
          the Wylie for gigu
static String I_VOWEL
          the Wylie for the vowel achung + gigu
static String o_VOWEL
          the Wylie for naro
static int REDUCED_C
          represents where in an array of DuffCodes you find the reduced character equivalent of a TMW glyph
static String reverse_i_VOWEL
          the Wylie for log yig gigu
static String reverse_I_VOWEL
          the Wylie for the vowel achung + log yig gigu
static char SPACE
          the Wylie for whitespace
static int TM
          represents where in an array of DuffCodes you find the TibetanMachine equivalence of a glyph
static String[] tmFontNames
           
static int TMW
          represents where in an array of DuffCodes you find the TibetanMachineWeb glyph
static String[] tmwFontNames
           
static char TSHEG
          the Wylie for tsheg
static String u_VOWEL
          the Wylie for zhebju
static String U_VOWEL
          the Wylie for the vowel achung + zhebju
static int UNICODE
          represents where in an array of DuffCodes you find the Unicode equivalence of a given glyph
static int VOWEL_A
          represents where in an array of DuffCodes you find the achung value for a given glyph
static int VOWEL_e
          represents where in an array of DuffCodes you find the drengbu value for a given glyph
static int VOWEL_i
          represents where in an array of DuffCodes you find the gigu value for a given glyph
static int VOWEL_o
          represents where in an array of DuffCodes you find the naro value for a given glyph
static int VOWEL_u
          represents where in an array of DuffCodes you find the zhebju value for a given glyph
static int VOWEL_U
          represents where in an array of DuffCodes you find the achung + zhebju value for a given glyph
static String WYLIE_aVOWEL
          the Wylie for the invisible 'a' vowel
static char WYLIE_DISAMBIGUATING_KEY
          the Wylie disambiguating key, as a char
static char WYLIE_SANSKRIT_STACKING_KEY
          the Sanskrit stacking separator used in Extended Wylie
 
Constructor Summary
TibetanMachineWeb()
           
 
Method Summary
static boolean currentKeyboardIsExtendedWylie()
          Returns true iff the currently active keyboard is the built-in, extended Wylie keyboard.
static SimpleAttributeSet getAttributeSet(int font)
          Gets the AttributeSet for the given TibetanMachineWeb font.
static String getAVowel()
          Gets the invisible 'a' vowel.
static Map getBinduMap()
          Gets the hash for characters that require special bindus.
static char getDisambiguatingKey()
          Gets the disambiguating key.
static org.thdl.tib.text.DuffCode getGlyph(String hashKey)
          Gets a glyph for this hash key.
static org.thdl.tib.text.DuffCode getHalfHeightGlyph(String hashKey)
          Gets the half height character for this hash key.
static String getHashKeyForGlyph(org.thdl.tib.text.DuffCode dc)
          Gets the hash key associated with this glyph.
static String getHashKeyForGlyph(int font, int code)
          Gets the hash key associated with this glyph.
static org.thdl.tib.text.TibetanKeyboard getKeyboard()
          Returns the current keyboard, or, if the current keyboard is the Extended Wylie keyboard, null.
static char getStackingKey()
          Gets the stacking key.
static Map getTibHash()
          Gets the hash with information about each character and stack.
static int getTMWFontNumber(String name)
          Gets the TibetanMachineWeb font number for this font name.
static org.thdl.tib.text.DuffCode getVowel(String hashKey, int vowel)
          Gets the DuffCode required for a vowel, if affixed to the given hashKey.
static String getWylieForChar(String s)
          Converts character to its Extended Wylie correspondence.
static String getWylieForGlyph(org.thdl.tib.text.DuffCode dc)
          Gets the Extended Wylie value for this glyph.
static String getWylieForGlyph(int font, int code)
          Gets the Extended Wylie value for this glyph.
static String getWylieForPunc(String s)
          Converts punctuation to its Extended Wylie correspondence.
static String getWylieForVowel(String s)
          Converts vowel to its Extended Wylie correspondence.
static boolean hasAVowel()
          Returns true iff there is a key for the invisible 'a' vowel in this keyboard.
static boolean hasDisambiguatingKey()
          Returns true iff the keyboard has a disambiguating key.
static boolean hasGlyph(String hashKey)
          Checks to see if a glyph exists for this hash key.
static boolean hasInputPrefix(String s)
          This addresses bug 624133, "Input freezes after impossible character".
static boolean hasSanskritStackingKey()
          Returns true iff the keyboard has a Sanksrit stacking key.
static boolean hasTibetanStackingKey()
          Returns true iff the keyboard has a Tibetan stacking key.
static boolean isAChenRequiredBeforeVowel()
          Returns true iff achen is required before vowels.
static boolean isAChungConsonant()
          Returns true iff achung is treated as a consonant.
static boolean isChar(String s)
          Checks to see if the passed string is a character in the installed keyboard.
static boolean isFormatting(char c)
          Says whether or not the character is formatting.
static boolean isPunc(String s)
          Checks to see if the passed string is punctuation in the installed keyboard.
static boolean isSanskritStack(org.thdl.tib.text.DuffCode dc)
          Says whether or not this glyph involves a Sanskrit stack.
static boolean isSanskritStack(int font, int code)
          Says whether or not this glyph involves a Sanskrit stack.
static boolean isStack(org.thdl.tib.text.DuffCode dc)
          Says whether or not this glyph involves a Tibetan stack.
static boolean isStack(int font, int code)
          Says whether or not this glyph involves a Tibetan stack.
static boolean isStackingMedial()
          Returns true iff stacking is medial.
static boolean isTMWFontCharBreakable(char ch)
          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.
static boolean isTopVowel(org.thdl.tib.text.DuffCode dc)
          Returns true iff this glyph is a top (superscript) vowel.
static boolean isVowel(String s)
          Checks to see if the passed string is a vowel in the installed keyboard.
static boolean isWylieChar(String s)
          Checks to see if the passed string is a character in Extended Wylie.
static boolean isWylieFarRight(String s)
          Returns true iff this Wylie is valid as a leftmost character in a Tibetan syllable.
static boolean isWylieLeft(String s)
          Returns true iff this Wylie is valid as a leftmost character in a Tibetan syllable.
static boolean isWyliePunc(String s)
          This method checks to see if the passed string is punctuation in Extended Wylie.
static boolean isWylieRight(String s)
          Returns true iff this Wylie is valid as a right (post-vowel) character in a Tibetan syllable.
static boolean isWylieVowel(String s)
          Checks to see if the passed string is a vowel in Extended Wylie.
static boolean setKeyboard(org.thdl.tib.text.TibetanKeyboard kb)
          (Re-)sets the keyboard.
static boolean setKeyboard(URL url)
          (Re-)sets the keyboard.
static String wylieForGlyph(String hashKey)
          Gets the Extended Wylie for a given hash key.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

tmFontNames

public static final String[] tmFontNames

tmwFontNames

public static final String[] tmwFontNames

BINDU

public static final char BINDU
the Wylie for bindu/anusvara

See Also:
Constant Field Values

TSHEG

public static final char TSHEG
the Wylie for tsheg

See Also:
Constant Field Values

SPACE

public static final char SPACE
the Wylie for whitespace

See Also:
Constant Field Values

WYLIE_SANSKRIT_STACKING_KEY

public static final char WYLIE_SANSKRIT_STACKING_KEY
the Sanskrit stacking separator used in Extended Wylie

See Also:
Constant Field Values

WYLIE_DISAMBIGUATING_KEY

public static final char WYLIE_DISAMBIGUATING_KEY
the Wylie disambiguating key, as a char

See Also:
Constant Field Values

WYLIE_aVOWEL

public static final String WYLIE_aVOWEL
the Wylie for the invisible 'a' vowel

See Also:
Constant Field Values

ACHUNG

public static final String ACHUNG
the Wylie for achung

See Also:
Constant Field Values

ACHEN

public static final String ACHEN
the Wylie for achen

See Also:
Constant Field Values

i_VOWEL

public static final String i_VOWEL
the Wylie for gigu

See Also:
Constant Field Values

u_VOWEL

public static final String u_VOWEL
the Wylie for zhebju

See Also:
Constant Field Values

e_VOWEL

public static final String e_VOWEL
the Wylie for drengbu

See Also:
Constant Field Values

o_VOWEL

public static final String o_VOWEL
the Wylie for naro

See Also:
Constant Field Values

ai_VOWEL

public static final String ai_VOWEL
the Wylie for double drengbu

See Also:
Constant Field Values

au_VOWEL

public static final String au_VOWEL
the Wylie for double naro

See Also:
Constant Field Values

A_VOWEL

public static final String A_VOWEL
the Wylie for the subscript achung vowel

See Also:
Constant Field Values

reverse_i_VOWEL

public static final String reverse_i_VOWEL
the Wylie for log yig gigu

See Also:
Constant Field Values

I_VOWEL

public static final String I_VOWEL
the Wylie for the vowel achung + gigu

See Also:
Constant Field Values

U_VOWEL

public static final String U_VOWEL
the Wylie for the vowel achung + zhebju

See Also:
Constant Field Values

reverse_I_VOWEL

public static final String reverse_I_VOWEL
the Wylie for the vowel achung + log yig gigu

See Also:
Constant Field Values

TM

public static final int TM
represents where in an array of DuffCodes you find the TibetanMachine equivalence of a glyph

See Also:
Constant Field Values

REDUCED_C

public static final int REDUCED_C
represents where in an array of DuffCodes you find the reduced character equivalent of a TMW glyph

See Also:
Constant Field Values

TMW

public static final int TMW
represents where in an array of DuffCodes you find the TibetanMachineWeb glyph

See Also:
Constant Field Values

VOWEL_i

public static final int VOWEL_i
represents where in an array of DuffCodes you find the gigu value for a given glyph

See Also:
Constant Field Values

VOWEL_u

public static final int VOWEL_u
represents where in an array of DuffCodes you find the zhebju value for a given glyph

See Also:
Constant Field Values

VOWEL_e

public static final int VOWEL_e
represents where in an array of DuffCodes you find the drengbu value for a given glyph

See Also:
Constant Field Values

VOWEL_o

public static final int VOWEL_o
represents where in an array of DuffCodes you find the naro value for a given glyph

See Also:
Constant Field Values

VOWEL_A

public static final int VOWEL_A
represents where in an array of DuffCodes you find the achung value for a given glyph

See Also:
Constant Field Values

VOWEL_U

public static final int VOWEL_U
represents where in an array of DuffCodes you find the achung + zhebju value for a given glyph

See Also:
Constant Field Values

UNICODE

public static final int UNICODE
represents where in an array of DuffCodes you find the Unicode equivalence of a given glyph

See Also:
Constant Field Values

HALF_C

public static final int HALF_C
represents where in an array of DuffCodes you find the half height equivalence of a given glyph

See Also:
Constant Field Values
Constructor Detail

TibetanMachineWeb

public TibetanMachineWeb()
Method Detail

setKeyboard

public static boolean setKeyboard(org.thdl.tib.text.TibetanKeyboard kb)
(Re-)sets the keyboard.

Parameters:
kb - the keyboard to be installed. If null, then the Extended Wylie keyboard is installed
Returns:
true if the keyboard was successfully set, false if there was an error

setKeyboard

public static boolean setKeyboard(URL url)
(Re-)sets the keyboard.

Parameters:
url - the URL of the keyboard to be installed. If null, then the Extended Wylie keyboard is installed
Returns:
true if the keyboard was successfully set, false if there was an error

getAttributeSet

public static SimpleAttributeSet getAttributeSet(int font)
Gets the AttributeSet for the given TibetanMachineWeb font. This information is required in order to be able to put styled text into TibetanDocument.

Parameters:
font - the number of the TibetanMachineWeb font for which you want the SimpleAttributeSet: TibetanMachineWeb = 1, TibetanMachineWeb1 = 2, TibetanMachineWeb = 3, etc. up to 10
Returns:
a SimpleAttributeSet for the given font - that is, a way of encoding the font itself

isFormatting

public static boolean isFormatting(char c)
Says whether or not the character is formatting.

Parameters:
c - the character to be checked
Returns:
true if c is formatting (TAB or ENTER), false if not

isChar

public static boolean isChar(String s)
Checks to see if the passed string is a character in the installed keyboard.

Parameters:
s - the string you want to check
Returns:
true if s is a character in the current keyboard, false if not

isWylieChar

public static boolean isWylieChar(String s)
Checks to see if the passed string is a character in Extended Wylie.

Parameters:
s - the string to be checked
Returns:
true if s is a character in Extended Wylie transliteration, false if not

isPunc

public static boolean isPunc(String s)
Checks to see if the passed string is punctuation in the installed keyboard.

Parameters:
s - the string you want to check
Returns:
true if s is punctuation in the current keyboard, false if not

isWyliePunc

public static boolean isWyliePunc(String s)
This method checks to see if the passed string is punctuation in Extended Wylie.

Parameters:
s - the string to be checked
Returns:
true if s is punctuation in Extended Wylie transliteration, false if not

isVowel

public static boolean isVowel(String s)
Checks to see if the passed string is a vowel in the installed keyboard.

Parameters:
s - the string you want to check
Returns:
true if s is a vowel in the current keyboard, false if not

isWylieVowel

public static boolean isWylieVowel(String s)
Checks to see if the passed string is a vowel in Extended Wylie.

Parameters:
s - the string to be checked
Returns:
true if s is a vowel in Extended Wylie transliteration, false if not

isWylieLeft

public static boolean isWylieLeft(String s)
Returns true iff this Wylie is valid as a leftmost character in a Tibetan syllable. For example, in the syllable 'brgyad', 'b' is the leftmost character. Valid leftmost characters include g, d, b, and m.

Parameters:
s - the (Wylie) string to be checked
Returns:
true if s is a possible leftmost character in a Tibetan syllable, false if not.

isWylieRight

public static boolean isWylieRight(String s)
Returns true iff this Wylie is valid as a right (post-vowel) character in a Tibetan syllable. For example, in the syllable 'lags', 'g' is in the right character position. Valid right characters include g, ng, d, n, b, m, r, l, s, ', and T.

Parameters:
s - the (Wylie) string to be checked
Returns:
true if s is a possible right character in a Tibetan syllable, false if not.

isWylieFarRight

public static boolean isWylieFarRight(String s)
Returns true iff this Wylie is valid as a leftmost character in a Tibetan syllable.

Parameters:
s - the string to be checked
Returns:
true if s is a possible leftmost character in a Tibetan syllable, false if not.

getWylieForChar

public static String getWylieForChar(String s)
Converts character to its Extended Wylie correspondence. This assumes that the passed string is a character in the current keyboard.

Parameters:
s - the string to be converted
Returns:
the Wylie character corresponding to s, or null if there is no such character
See Also:
TibetanKeyboard

currentKeyboardIsExtendedWylie

public static boolean currentKeyboardIsExtendedWylie()
Returns true iff the currently active keyboard is the built-in, extended Wylie keyboard.


getKeyboard

public static org.thdl.tib.text.TibetanKeyboard getKeyboard()
Returns the current keyboard, or, if the current keyboard is the Extended Wylie keyboard, null.


getWylieForPunc

public static String getWylieForPunc(String s)
Converts punctuation to its Extended Wylie correspondence. This assumes that the passed string is punctuation in the current keyboard.

Parameters:
s - the string to be converted
Returns:
the Wylie punctuation corresponding to s, or null if there is no such punctuation
See Also:
TibetanKeyboard

getWylieForVowel

public static String getWylieForVowel(String s)
Converts vowel to its Extended Wylie correspondence. This assumes that the passed string is a vowel in the current keyboard.

Parameters:
s - the string to be converted
Returns:
the Wylie vowel corresponding to s, or null if there is no such vowel
See Also:
TibetanKeyboard

getVowel

public static org.thdl.tib.text.DuffCode getVowel(String hashKey,
                                                  int vowel)
Gets the DuffCode required for a vowel, if affixed to the given hashKey.

Parameters:
hashKey - the key for the character the vowel is to be affixed to
vowel - the vowel you want the DuffCode for
Returns:
the DuffCode for the vowel in the given context, or null if there is no such vowel in the context
See Also:
DuffCode

hasGlyph

public static boolean hasGlyph(String hashKey)
Checks to see if a glyph exists for this hash key.

Parameters:
hashKey - the key to be checked
Returns:
true if there is a glyph corresponding to hashKey, false if not

getGlyph

public static org.thdl.tib.text.DuffCode getGlyph(String hashKey)
Gets a glyph for this hash key. Hash keys are not identical to Extended Wylie. The hash key for a Tibetan stack separates the members of the stack with '-', for example, 's-g-r'. In Sanskrit stacks, '+' is used, e.g. 'g+h+g+h'.

Parameters:
hashKey - the key for which you want a DuffCode
Returns:
the TibetanMachineWeb DuffCode value for hashKey
See Also:
DuffCode

getHalfHeightGlyph

public static org.thdl.tib.text.DuffCode getHalfHeightGlyph(String hashKey)
Gets the half height character for this hash key.

Parameters:
hashKey - the key you want a half height glyph for
Returns:
the TibetanMachineWeb DuffCode of hashKey's reduced height glyph, or null if there is no such glyph
See Also:
DuffCode

getTMWFontNumber

public static int getTMWFontNumber(String name)
Gets the TibetanMachineWeb font number for this font name.

Parameters:
name - a font name
Returns:
between 1 and 10 if the font is one of the TibetanMachineWeb fonts, otherwise 0

getHashKeyForGlyph

public static String getHashKeyForGlyph(int font,
                                        int code)
Gets the hash key associated with this glyph.

Parameters:
font - a TibetanMachineWeb font number
code - an ASCII character code
Returns:
the hashKey corresponding to the character at font, code

getHashKeyForGlyph

public static String getHashKeyForGlyph(org.thdl.tib.text.DuffCode dc)
Gets the hash key associated with this glyph.

Parameters:
dc - a DuffCode denoting a TibetanMachineWeb glyph
Returns:
the hashKey corresponding to the character at dc

wylieForGlyph

public static String wylieForGlyph(String hashKey)
Gets the Extended Wylie for a given hash key. The hash keys in charList and so on may include separating characters. For example, Wylie 'sgr' has the hash key 's-g-r'. This method takes a hash key and converts it its correct Wylie value, and therefore is useful in conversions from TibetanMachineWeb to Wylie.

Parameters:
hashKey - the hash key for a glyph
Returns:
the Wylie value of that hash key

getWylieForGlyph

public static String getWylieForGlyph(int font,
                                      int code)
Gets the Extended Wylie value for this glyph.

Parameters:
font - the font of the TibetanMachineWeb glyph you want the Wylie of
code - the TibetanMachineWeb glyph you want the Wylie of
Returns:
the Wylie value corresponding to the glyph denoted by font, code

getWylieForGlyph

public static String getWylieForGlyph(org.thdl.tib.text.DuffCode dc)
Gets the Extended Wylie value for this glyph.

Parameters:
dc - the DuffCode of the glyph you want the Wylie of
Returns:
the Wylie value corresponding to the glyph denoted by dc

hasInputPrefix

public static boolean hasInputPrefix(String s)
This addresses bug 624133, "Input freezes after impossible character". Returns true iff s is a proper prefix of some legal input for this keyboard. In the extended Wylie keyboard, hasInputPrefix("S") is true because "Sh" is legal input. hasInputPrefix("Sh") is false because though "Sh" is legal input, ("Sh" + y) is not valid input for any non-empty String y.


isSanskritStack

public static boolean isSanskritStack(int font,
                                      int code)
Says whether or not this glyph involves a Sanskrit stack.

Parameters:
font - the font of a TibetanMachineWeb glyph
code - the ASCII value of a TibetanMachineWeb glyph
Returns:
true if this glyph is a Sanskrit stack, false if not

isSanskritStack

public static boolean isSanskritStack(org.thdl.tib.text.DuffCode dc)
Says whether or not this glyph involves a Sanskrit stack.

Parameters:
dc - the DuffCode of a TibetanMachineWeb glyph
Returns:
true if this glyph is a Sanskrit stack, false if not

isStack

public static boolean isStack(int font,
                              int code)
Says whether or not this glyph involves a Tibetan stack.

Parameters:
font - the font of a TibetanMachineWeb glyph
code - the ASCII value of a TibetanMachineWeb glyph
Returns:
true if this glyph is a Tibetan stack, false if not

isStack

public static boolean isStack(org.thdl.tib.text.DuffCode dc)
Says whether or not this glyph involves a Tibetan stack.

Parameters:
dc - the DuffCode of a TibetanMachineWeb glyph
Returns:
true if this glyph is a Tibetan stack, false if not

getTibHash

public static Map getTibHash()
Gets the hash with information about each character and stack.

Returns:
a hash containing a key for each entity defined in Wylie, whose object is the DuffCode for that key

getBinduMap

public static Map getBinduMap()
Gets the hash for characters that require special bindus.

Returns:
a hash whose keys are all vowel glyphs (DuffCodes) that require a special bindu, and whose objects are the vowel+bindu glyph (DuffCode) corresponding to each such vowel glyph

hasDisambiguatingKey

public static boolean hasDisambiguatingKey()
Returns true iff the keyboard has a disambiguating key.

Returns:
true if the installed keyboard has a disambiguating key, false if not
See Also:
TibetanKeyboard

getDisambiguatingKey

public static char getDisambiguatingKey()
Gets the disambiguating key.

Returns:
the disambiguating key for the installed keyboard, or ' ' if there is no such key
See Also:
TibetanKeyboard

hasSanskritStackingKey

public static boolean hasSanskritStackingKey()
Returns true iff the keyboard has a Sanksrit stacking key.

Returns:
true if a stacking key is required to type Sanskrit stacks, false if not
See Also:
TibetanKeyboard

hasTibetanStackingKey

public static boolean hasTibetanStackingKey()
Returns true iff the keyboard has a Tibetan stacking key.

Returns:
true if a stacking key is required to type Tibetan stacks, false if not
See Also:
TibetanKeyboard

isStackingMedial

public static boolean isStackingMedial()
Returns true iff stacking is medial.

Returns:
true if the stacking key is medial, false if not, or if there is no stacking key
See Also:
TibetanKeyboard

getStackingKey

public static char getStackingKey()
Gets the stacking key.

Returns:
the stacking key, or ' ' if there isn't one
See Also:
TibetanKeyboard

isAChenRequiredBeforeVowel

public static boolean isAChenRequiredBeforeVowel()
Returns true iff achen is required before vowels.

Returns:
true if you have to type achen first before you can get a vowel with achen, false if you can just type the vowel by itself (as in Wylie)
See Also:
TibetanKeyboard

isAChungConsonant

public static boolean isAChungConsonant()
Returns true iff achung is treated as a consonant.

Returns:
true if a-chung is considered a consonant for the purposes of stacking, false if not (as in Wylie)
See Also:
TibetanKeyboard

hasAVowel

public static boolean hasAVowel()
Returns true iff there is a key for the invisible 'a' vowel in this keyboard.

Returns:
true if the installed keyboard has a dummy a vowel, false if not
See Also:
TibetanKeyboard

getAVowel

public static String getAVowel()
Gets the invisible 'a' vowel.

Returns:
the dummy 'a'-vowel for the installed keyboard, or "" if there is no such vowel
See Also:
TibetanKeyboard

isTopVowel

public static boolean isTopVowel(org.thdl.tib.text.DuffCode dc)
Returns true iff this glyph is a top (superscript) vowel.

Returns:
true if the glyph is a top-hanging (superscript) vowel (i, u, e, o, ai, or ao) and false if not

isTMWFontCharBreakable

public static boolean isTMWFontCharBreakable(char ch)
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. '-', 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 '-'. Note that ch is not 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. '-', you'll see a tsheg appear. If you open Jskad and type a hyphen, you won't see a tsheg.

Parameters:
ch - the ASCII character "index" into the TMW font
Returns:
true iff this is a tsheg or whitespace or the like


These API docs were created 02/02/2003 08:19 PM.
Copyright © 2001-2002 Tibetan and Himalayan Digital Library. All Rights Reserved.
Hosted by SourceForge_Logo