BRLTTY uses two translation tables to govern the mapping from bytes to dot combinations.
The first, and most important, is the text translation table. BRLTTY is initially configured to use the North American Braille Computer Code (NABCC). In addition to this default text translation table, several alternatives are provided:
Danish
Spanish
French
German
Italian
Norwegian and German
Norwegian
Polish (iso-8859-2)
American English
Swedish
Swedish
United Kingdom English
American English
The attributes translation table is used when BRLTTY is displaying screen attributes rather than screen content (see the DISPMD command). Each of the eight braille dots represents one of the eight attribute bits. Two attributes translation tables are provided:
The lefthand column represents the background colours:
Red
Green
Blue
Blink
Red
Green
Blue
Bright
The lefthand column represents the background colours:
Red
Green
Blue
Blink
Red
Green
Blue
Bright
A translation table is a 256-byte binary file. It's indexed with either a character or an attributes byte, and the byte at that position contains the corresponding dot combination. The mapping from bit to dot is as follows:
Dot 1
Dot 4
Dot 2
Dot 5
Dot 3
Dot 6
Dot 7
Dot 8
These utilities reside within the BrailleTables
subdirectory,
and aren't built as part of the regular procedure.
To build them,
first ensure that BRLTTY has been configured
(see section
Build Options),
and then run make
within the BrailleTables
subdirectory.
cd BrailleTables
make
This utility converts (uncompiles) a translation table into a text file for readability and/or modification.
tbl2txt -option ... table-file text-file
The translation table which is to be converted.
The file into which the text representing the table content is to be written.
-c
name --code-page=
nameThe character set used to annotate each line of the text file.
The generated text file can, without modification, be recompiled back into a translation table with the txt2tbl utility. Each of its lines contains lots of interesting information.
If the -c
option isn't specified, each line looks like this:
cc xx ddd (73214568)tt B+bbbb name
If the -c
option is specified, each line looks like this:
cc xx ddd (73214568)tt B+bbbb U+uuuu description
The character itself.
Unprintable characters are represented canonically.
Control characters are flagged with a circumflex,
e.g. Control-A (character 1) is ^A
.
Meta control characters are flagged with a tilde,
e.g. Meta-Control-A (character 129) is ~A
.
The hexadecimal value of the character.
The decimal value of the character.
(73214568)
The braille dot numbers.
If a dot isn't to be raised,
then its number is replaced with a blank.
The English letter y
, for example, would be
( 3 1456 )
.
The dot numbers appear in the same order
as on a standard braille keyboard
so as to make it easier to visualize the braille character.
The hexadecimal value of the byte representing the dot combination which is in the translation table.
The hexadecimal value of the unicode number corresponding to the dot combination.
The ASCII name of the character
(only shown if the -c
option isn't specified).
The hexadecimal value of the unicode number
corresponding to the character
(only shown if the -c
option is specified).
The formal unicode description for the character
(only shown if the -c
option is specified).
This utility compiles a translation table.
txt2tbl -option ... text-file table-file
The source file describing the table content.
The file into which the translation table is to be written.
-d
--duplicates
Display a warning for each dot combination which has been used more than once.
-m
--missing
Display a warning for each dot combination which hasn't been used.
A line which assigns a dot combination to a character
must contain that dot combination within parenthesis, e.g. (12)
.
The text file must contain exactly 256 such lines, each one, in order,
defining the braille representation for its corresponding character.
The dot numbers may be specified in any order,
but each must only be specified once.
It's valid to specify no number at all, e.g. ()
(for a space).
Any number of spaces may occur any number of times anywhere between the parentheses.
All characters before the left parenthesis and after the right parenthesis are ignored.
All lines which don't contain a left parenthesis are ignored.
The algorithm for locating the dot numbers is actually a bit more complicated
because a line may contain more than one left and/or right parenthesis
(the
tbl2txt utility does this).
The first right parenthesis which is preceded by at least one left parenthesis is used.
The nearest left parenthesis to the left of that right parenthesis is used.
The line )((12)
, for example, is valid.
This utility converts a binary translation table from one dot mapping to another.
tbl2tbl input-mapping output-mapping
The dot mapping used within the source table.
The dot mapping to be used within the table being generated.
BRLTTY's native mapping (described above).
The mapping used by Tieman B.V..
Dot 1
Dot 2
Dot 3
Dot 7
Dot 8
Dot 6
Dot 5
Dot 4
The mapping used by Alva B.V. and Telesensory Systems Inc..
Dot 1
Dot 2
Dot 3
Dot 4
Dot 5
Dot 6
Dot 7
Dot 8