Hello,
Here is a change set to make it possible to put 'underlined' and 'struckOut' emphasis to the TrueType font.
It works fine with 3.6, and sort of works with 3.7b. The problem with 3.7b is that the handling of multiple text attributes is broken.
-- Yoshiki
"Yoshiki Ohshima" Yoshiki.Ohshima@acm.org wrote: (at May 07)
Hello,
Here is a change set to make it possible to put 'underlined' and 'struckOut' emphasis to the TrueType font.
It works fine with 3.6, and sort of works with 3.7b. The problem with 3.7b is that the handling of multiple text attributes is broken.
"Martin Drautzburg" martin.drautzburg@web.de wrote (at May 21)
squeak 3.7beta
Is there are way to change the font/size/emphasis in Class comments to make them look nicer and more structured. I remember I used to do this but either forgot or it no longer works in 3.7. Could also be a problem of "shout".
Regrettably I was unable to immediately look into this problem, but now I think that I understand what happens. Here are my findings (for Squeak 3.7 beta #5923) :
1. In the Morphic environment, you cannot change the size of a piece of text when you work in the code view of the browser. In the MVC environment, you can change the size of a selected piece of text (with alt+1 .. alt+ 5).
2. When you explore the PluggableTextMorph that holds the method text, you find, that its textMorph (an instance of TextMorphForEditView) has a text style with a font array of size 1. This explains why it is not possible to change the text size: To display glyphs of various size, we need the full text style (the fontArray of such a TextStyle contains StrikeFonts for all available glyph sizes), not one that is restricted to one font size.
As a general rule, TextStyles with exactly one font should be created only for use with visual elements that are not designed to display glyphs of different height. (PopUpMenu is such a visual element)
Attached you find: 1. Additions to Preferences class that give you the possibility to select a font family and a default font size. (I left the #chooseCodeFont as it is and added a new method #chooseCodeStyle)
2. A change in Text class>>fromString: that I proposed earlier: I really think that we should create instances of Text not with attribute (TextFontChange fontNumber: TextStyle default defaultFontIndex) but with TextEmphasis normal. TextEmphasis normal is no emphasis at all, and the display machinery uses the default font size of a text style when it has to display a piece of text that has no TextFontChange attribute and no TextFontReference attribute.
I remember that I was told some time ago that Texts without a TextFontChange attribute may cause problems but I do not know why or where. Anyway, I will try to identify and to fix problems that will berported on this list.
Greetings, Boris
Hi boris
could you check your changes against 3.8 unstable 6206. Because there is a conflict.
Thanks
Stef
Checking CodeStyleFix.1.cs (#5923) for method conflicts with changesets after The Worlds of Squeak ... ...checking TextMorph>>beAllFont: ...checking Preferences class>>fontConfigurationMenu CONFLICT found for Preferences>>fontConfigurationMenu with newer changesets 6111-0290fontMenuFixes-nk 6137-0322HaloFontInMenu-dgd ...checking CodeHolder>>buildMorphicCodePaneWith: ...checking Text>>unembellished ...checking Text class>>fromString: 1 conflict found.
squeak-dev@lists.squeakfoundation.org