2015-04-29 21:40 GMT+02:00 Nicolas Cellier < nicolas.cellier.aka.n...@gmail.com>:
> > > 2015-04-29 21:32 GMT+02:00 Nicolai Hess <nicolaih...@web.de>: > >> >> >> 2015-04-29 18:04 GMT+02:00 Sean P. DeNigris <s...@clipperadams.com>: >> >>> Nicolai Hess wrote >>> > Assign the proper Attribute? >>> >>> Well AFAICT there is no bold attribute, >> >> >> Ah yes, I mix up this with TextMorph and addAttribute:TextEmphasis.... >> >> >>> but I tried setting the font to bold >>> via "(LogicalFont familyName: 'Tahoma' pointSize: 9 + i) emphasis: 1; >>> yourself." but it was rendered the same as before... >>> >>> >> If the font is in the system, this should work. >> >> | text font1 font2 font3 string1 | >> font1 := (LogicalFont familyName: 'Tahoma' pointSize: 25) emphasis: >> TextEmphasis normal emphasisCode. >> font2 := (LogicalFont familyName: 'Tahoma' pointSize: 25) emphasis: >> TextEmphasis bold emphasisCode. >> font3 := (LogicalFont familyName: 'Tahoma' pointSize: 25) emphasis: >> TextEmphasis italic emphasisCode. >> > > If an emphasisCode is used at low level, that's fine, but shouldn't the > API be more straight like: > > emphasis: aTextEmphasis > or: > emphasisCode: anIntegerOrSymbolOrLetterOrAnyOtherWayToCodeAnEmphasis > > Nicolas > > +1 Sadly, we have quite some places in pharo where just the code is used, for example: .. aWindow isActive ifTrue: [ lab emphasis: 1 "1 -> bold" ]. ..