[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [StrongED] show invisible characters



In message <dff0407c52.jim@xxxxxxxxxxxxxxxxxxxx> you wrote:

> Is this an argument in favour of Fred's first suggestion, of using an 
> ersatz font where spaces are visible?  Will StrongEd still wrap lines 
> at character 32 even if it contains a visible glyph?

Interpreters, and presumably text-editors, usually set up a 256-element
array of integers (one for each ASCII code), with each bit of the integer
interpretable as an attribute of the corresponding character: for
example, is-a-digit, is-invisible, is-white-space, is-punctuation, etc.
In our case this leaves room for 32 different attributes.
The program can then use this when reading a stream of characters to 
look up quickly what sort of a character it is dealing with. I have 
not looked at the StrongED sources to see if it uses such an array,
but I would be surprised if it did not. Most C sources that I have
looked at, for programs that have to parse text, use this device.
Remember that programs only know about characters by their ASCII code. 
What they look like to human eyes - what glyph is used to depict it - 
is solely the current font's business and I doubt that the program
interrogates the font to find out much more than a glyph's overall 
dimensions.
 
-- 
Gavin Wraith (gavin@xxxxxxxxxxxxxxx)
Home page: http://www.wra1th.plus.com/

-- 
To unsubscribe send a mail to StrongED+unsubscribe@xxxxxxxxxxxxxx