[Cuis-dev] TrueType Fonts assignment

stes@PANDORA.BE stes at telenet.be
Thu Apr 29 09:36:02 PDT 2021



----- Op 29 apr 2021 om 1:01 schreef cuis-dev cuis-dev at lists.cuis.st:

> On 28/04/2021 16:39, Juan Vuletich via Cuis-dev wrote:
>> Some clarifications:
>> - There are no specifically "supported fonts". You can use any
>> TrueType font you like. We include a few with Cuis for convenience.
>> You can add others. Different TrueType fonts will vary in the range of
>> glyphs they include.
>> - We always use Character 94 for return ( ^ in the keyboard). We just
>> display it as an up arrow when it is a return (but not when it is used
>> a a binary selector, or in a comment).
>> - You can use := or left arrow ( _ in the keyboard) for assignment.
>> Your choice. We display _ as a left arrow when it is used for
>> assignment (but not when it is used as part of a variable name or
>> selector, or in a comment).
> 
> 
> I have to say that I love seeing Cuis get this kind of fancy, context
> dependant typography. None of this ancient fixed width terminal stuff
> that other languages have to deal with. :)


I like the way Cuis is displaying _ as a left arrow.

However this is not really TrueType or Unicode specific as I think it is precisely a remnant from "ancient fixed width terminal stuff", although on those ancient fixed width terminals you had not the choice of displaying left-arrow and underscore in a mixed way, as Cuis is doing.

It's true that it's nice that Cuis is using context-dependant typography as underscore is allowed in variables or identifiers which was probably not possible on ancient fixed-width terminals although it may have been possible perhaps (but was of no use as perhaps early Smalltalk did not allow underscore in identifiers anyway?).

According to some research that I did on this, because I do not use Smalltalk for such a long time,
the left arrow is likely a remnant from early ASCII codemaps for terminals the so-called ASCII 1963.

My guess is that the XEROX fixed-width terminals had the left-arrow and up-arrow characters as in ASCII 1963.

https://en.wikipedia.org/wiki/ASCII

the article on ASCII also mentions "left-arrow symbol (from ASCII-1963, which had this character instead of underscore)"

Also, what I do remember, is that Commodore PET machines used a PET-ASCII which was a branch from ASCII 1963 with,
up-arrow on the position of the caret ^ and left-arrow on the position of the underscore _.

on the wikipedia article there is a screenshot of PRINT CHR$(94) and PRINT CHR$(95),
and how it looked on old VIC-20 or Commodore-64 ancient fixed width fonts,
indeed the Commodore-64 and VIC-20 have/had on the keyboard these symbols.

The left-arrow is on the position of the 'ESC' left-top on the Commodore-64 and the up-arrow above-left of the return key.

However, all of this is of course just to say that left-arrow was probably not unusual for character terminals,
but the implementation of Cuis is nice because it maps this to Unicode/modern TrueType fonts.

It can be done perfectly well with bitmap fonts and fixed-width terminals ... which is exactly where it comes from (ASCII 1963) I think.

In Squeak the StrikeFont (for bitmap fonts) which is also still in Cuis, has  messages

  useLeftarrow
  useUnderscore

I tried it in plain Squeak 4.6 and there I can toggle with useLeftarrow and useUnderscore whether _ is displayed as left-arrow (as in Cuis) or as a plain underscore.


More information about the Cuis-dev mailing list