2015-02-03 16:01 GMT+01:00 KasperOsterbye <kasper@itu.dk>:
And no, I do not want to restart the discussion of the (lack of) qualities
regarding such fonts.

It is just not clear to me how to get hold of a font.
It seems like at the one hand it is all 'Bitmap deja vu sans regular'.

I�� think it is because, the default fonts were StrikeFonts only, but
Bitmap deja vu is the only StrikeFont in the image nowadays.
��

In the settings browser I can pick all kinds of fonts, but it is unclear how
I get a reference to them as I do not want to install the font as default or
code fonts, but just need to apply the font to a few words in a Text object.

StringMorph new font:(LogicalFont familyName: 'Courier New' pointSize: 22); openInHand
or for a TextMorph

| font1 font2 t1 t2 tMorph|
tMorph := TextMorph new.
font1 := (TextFontReference toFont: (LogicalFont familyName: 'Source Code Pro' pointSize: 22)).
font2 := (TextFontReference toFont: (LogicalFont familyName: 'Source Code Pro' pointSize: 11)).
t1 := 'this is font1' asText addAttribute: font1.
t2 := ' and this is font2' asText addAttribute: font2.
tMorph contents: (t1,t2).
tMorph openInWorld.


��

If I try to ask for StrikeFont for say 'Courier' I get 'Bitmap deja vu sans
regular'.

Where is the magic hidden?

A perhaps related question is if one can apply subscript and superscript to
the regular Text attributes - I have not been able to find that either.

I am not sure, but I thnk, it is not possible.


nicolai

��

Best, Kasper



--
View this message in context: http://forum.world.st/Monospaced-font-tp4803396.html
Sent from the Pharo Smalltalk Developers mailing list archive at Nabble.com.