Re: Locale current preferredFontFamily: #('system' 'gill').
At the time the locale subsystem was changed to incorporate the CLDR, many but not all things on Locale were surfaced at the CompositeLocale level (the Locale replacement). This is of course what you are talking to in a modern VisualWorks image as the result
of sending the message 'Locale current'.
(Class #Locale itself is somewhat vestigial in that it still serves as a place to send several class messages, but you might end up talking to an instance of #Locale or #CompositeLocale, depending upon which is active in your image.)
Assuming that you are using the new locales, you will find #preferredFontFamily on the class #LocaleEncodingComponent. This is accessed by a private message to an instance of #CompositeLocale, #encodingComponent. So your example might be changed to read:
Locale current encodingComponent preferredFontFamily: #('system' 'gill').
It is planned for the legacy Locales (the old set) to be retired to a loadable parcel in VisualWorks 8.0, but until then you might want to test which locale set you are using if you want your code to work with both sets
of locales (although I think most people are using the CLDR ones these days).
Label uses the global default text style, not the widget text style of the look policy.
You can set the text style, though:
(Label with: 'Test') attributes: Screen default defaultWidgetPolicy lookPolicyClass systemWidgetTextStyle
or if you have a UI builder at hand:
(Label with: 'Test') attributes: self builder policy class systemWidgetTextStyle
> > Hi, > > > > Basically the bottom line problem I have is that when setting a DSV label > > to display an Icon with something like: > > > > fixedCostLabel > > > > ^(LabelAndIcon > > with: (UserMessage defaultString: 'Material' key: #materialCost) "astext > > asComposedText" ) > > icon: MyAssets package16 > > > > The font size in the label changes: > > Label uses the global default text style, not the widget text style of the > look policy. > You can set the text style, though: > (Label with: 'Test') attributes: Screen default defaultWidgetPolicy > lookPolicyClass systemWidgetTextStyle > or if you have a UI builder at hand: > (Label with: 'Test') attributes: self builder policy class > systemWidgetTextStyle > > > > > -- > View this message in context: > http://forum.world.st/Locale-current-preferredFontFamily-system-gill-tp4733945p4734506.html > Sent from the VisualWorks mailing list archive at Nabble.com. > _______________________________________________ > vwnc mailing list > [hidden email] > http://lists.cs.uiuc.edu/mailman/listinfo/vwnc >