[liblouis-liblouisxml] Expanding the typeforrm parameter

  • From: "John J. Boyer" <john.boyer@xxxxxxxxxxxxxxxxx>
  • To: liblouis-liblouisxml@xxxxxxxxxxxxx
  • Date: Mon, 14 Oct 2013 06:09:17 -0500

Let me know if you have comments on the folowing.

At present the typeform parameter can handle only four kinds of 
emphasis, bold, italic, underline and computer Braille. Although this 
parameter is a character array the high-order bits are used for the 
ascii numeric code, -x30. This is because at the beginning loblouis 
functions were called from Visual Basic. 

However, four types of emphasis are not enough to handle the Braille 
indicators required by modern textbooks, where it may be necessary to 
indicate colored type, script, etc.

Therefore, I am proposing to use all eight bits of the typeforrm 
parameter. To preserve backward compatibility an additional bit in the 
mode parameter will be defined, extTypoeform . Since the spacing 
parameter is used only by ViewPlus and they may stop using it, I propose 
to make it an extension of the typeform parameter. This will provide 12 
additional ways to indicate things in the text. It will also be 
controlled by the extTypeform bit.

The present system of defining opcodes for things like beginning of 
phrase, end of phrase, etc for each type of emphasis is unworkable for 
an extended typeform parameter because it would result in a huge number 
of opcodes.

The present algorithm for handling Braille indicators cannot be expanded 
for the same reason. Therefore, the correct-context-multipass feature 
will be extended with a scripting language. The base of this language 
already exists.

John

-- 
John J. Boyer; President, Chief Software Developer
Abilitiessoft, Inc.
http://www.abilitiessoft.com
Madison, Wisconsin USA
Developing software for people with disabilities

For a description of the software, to download it and links to
project pages go to http://www.abilitiessoft.com

Other related posts: