[Cuis] Updates: Smart underscores & BouncingAtomsMorph performance

Juan Vuletich juan at jvuletich.org
Wed Aug 19 07:51:06 CDT 2015


On 8/17/2015 6:34 PM, David T. Lewis wrote:
>>
>> I'm a bit surprised nobody commented on the attach. I'm quite happy
>> about not having to give up our traditional assignment symbol, and at
>> the same time, handle and display correctly underscores in names. These
>> are sometimes useful when dealing with external code and stuff. I won't
>> deny it, I'm also a bit proud of the idea to make it possible. Looking
>> at the screenshot, doesn't it make you think "how the hell did he do it?"
>> ?
> Well, that's what *I* was wondering. So how did you do that???
>
> :-)
>
> Dave
>

Well, the first idea was that it given that a StrikeFont can already 
swap glyphs (#useUnderscores, #useLeftArrow), then it is possible to 
build cheap derivative fonts that do that, and TextStyles for them. 
Then, Shout parses code and sets TextEmphasis like italics or colors for 
differenc code elements. I just made it set a TextEmphasis with 
underscores for identifiers.

It is so simple that I find it surprising that nobody (including me) 
thought about this years ago!

Cheers,
Juan Vuletich




More information about the Cuis mailing list