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

Re: [StrongED] Display of Tabs and Ctrls



In message <56e159d052.martin@xxxxxxxxxxxxxxxx>
          Martin Bazley <martin.bazley@xxxxxxxxxxxxxxxx> wrote:

> The following bytes were arranged on 16 Sep 2012 by Fred Graute :
>
> [snips]
>
> > As the format of the font files is to be altered anyway I'm considering
> > of moving the special glyphs for Ctrl/Tab. The glyphs for 'dotted line'
> > tabs are moved to character positions 256-259 in all font styles.
> >
> > The glyphs for non-alphabetic control codes are placed at the first 32
> > character positions in a font style. Currently we don't use these and
> > this is how things were before the CtrlTab style was introduced.
> >
> > The CtrlTab style is removed, the Ctrl/Tab options all remain the same.
> > An additional option is added to Mode Choices -> Font which allows you
> > to choose a special representation for Ctrl/Tab. Which will default to
> > small hex numbers for Ctrl and a dotted line for Tab. Representations
> > for Tab will use tables so as to allow the old, 4 char, dotted line.
>
> > That's the plan (well part of it anyway, there's more). Any thoughts?
>
> That sounds even better than my plan!  If altering the existing bitmap
> fonts is on the table, then the CtrlTab style can be dispensed with
> entirely, just as I wanted all those posts ago.

Well it's just a plan and I've already found a snag; I forgot to factor
in ASCII 127. Not a showstopper, I think, but it's going to be slightly
more complicated then I had hoped for.

> One question, though: will expanding the number of glyphs in a single
> font beyond 256 cause any internal problems?  Does the redraw engine
> assume that the character at a given position can be represented by a
> single byte?

Yes, the redraw engine, and all the rest of StrongED, expects each
character to be one byte big. To allow the glyphs for Tab to be above
255 we need to cheat a bit. When preparing for a redraw the syntax
colouring is copied from the mode in use to a work area, this includes
colours and font. When using a bitmap font and Tabs being shown as a
dotted line the pointer to the bitmap is adjusted so it points to char
256. The representation table will refer to characters \x00 - \x03.

> Of course, if it doesn't, then that paves the way for... Unicode
> StrongED!! :-)

Sorry, not for a while as I know little about the intricacies of Unicode
so unless someone wants to provide me with 'Unicode for Dummies' it's
not likely to happen any time soon.

Cheers,
Fred.

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

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