Shout & Fonts

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Shout & Fonts

Casey Ransberger
The default grey italic for an incomplete identifier seems
horizontally squished to me, making it hard to read.

Inspecting:

SHTextStylerST80 styleTable

...shows me that the fonts are configured with symbols. Is there a
symbol I can add like #wider ? And where would I look to see what
these symbols mean?

--
Ron

Reply | Threaded
Open this post in threaded view
|

Re: Shout & Fonts

Andreas.Raab
Ronald Spengler wrote:

> The default grey italic for an incomplete identifier seems
> horizontally squished to me, making it hard to read.
>
> Inspecting:
>
> SHTextStylerST80 styleTable
>
> ...shows me that the fonts are configured with symbols. Is there a
> symbol I can add like #wider ? And where would I look to see what
> these symbols mean?

The comment in #defaultStyleTable says:

        "color can be a valid argument to Color class>>colorFrom: , or nil to
        use the editor text color.
        Multiple emphases can be specified using an array e.g. #(bold italic).
        If emphasis is not specified, #normal will be used.
        if pixel height is not specified , then the editor font size will be used.
        "

If you get into it (i.e., browse sender chains and read some code[*1]),
you'll find that it will ultimately do a #perform: of the symbol on
TextEmphasis so if you look at the class side of TextEmphasis you can
see that valid symbols would be #bold, #italic, #narrow, #normal,
#struckOut, #underlined. And if you need additional ones just implement
the proper method ;-)

[*1] Browse senders of styleTable which gets you into
#initialTextAttributesForPixelHeight: where you can see that
#attributeArrayForColor:emphasis:font: is called for the text emphasis
symbol. Browsing the implementors of
#attributeArrayForColor:emphasis:font: shows that the actual attribute
is created via "TextEmphasis perform: each" which leads you straight to
TextEmphasis and its class methods.

Cheers,
   - Andreas



Reply | Threaded
Open this post in threaded view
|

Re: Shout & Fonts

Juan Vuletich-4
In reply to this post by Casey Ransberger
Ronald Spengler wrote:
> The default grey italic for an incomplete identifier seems
> horizontally squished to me, making it hard to read.
Fixed.

Cheers,
Juan Vuletich