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

Re: [StrongED] show invisible characters



In message <7fcb447c52.wra1th@xxxxxxxxxxxxxxx>
          Gavin Wraith <gavin@xxxxxxxxxxxxxxx> wrote:

> 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.

Yes, StrongED does use such an array but only allows for 8 attributes
(1 byte per character).

> 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.

Correct. StrongED uses the ASCII code when wrapping lines, how a
character looks on screen is completely irrelevant to this.

While you can use Replace to make invisible characters visible it
changes the spaces so editing may become an issue as each line is
effectively turned into a single word.
So it's best to use this to only for inspecting the text.

Using a different font to make the characters visible doesn't have
such issues so may be the better option. If you want to change from
invisible-chars-font to visible-chars-font (and back) you could tie
it to a toolbar icon:

  Function
    Icon    <IconName>
    Select  SetOptionValue("Font_BitmapFont","visible-chars-font")

    Adjust  SetOptionValue("Font_BitmapFont","invisible-chars-font")
  End

This is a lot easier/faster than using the Mode Choices to change font.

Cheers,

Fred.

-- 
StrongED developer
http://www.stronged.iconbar.com/

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