The Artima Developer Community
Sponsored Link

Agile Buzz Forum
About Resetting Font Attributes

0 replies on 1 page.

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 0 replies on 1 page
James Robertson

Posts: 29924
Nickname: jarober61
Registered: Jun, 2003

David Buck, Smalltalker at large
About Resetting Font Attributes Posted: Oct 21, 2009 10:45 AM
Reply to this message Reply

This post originated from an RSS feed registered with Agile Buzz by James Robertson.
Original Post: About Resetting Font Attributes
Feed Title: Cincom Smalltalk Blog - Smalltalk with Rants
Feed URL: http://www.cincomsmalltalk.com/rssBlog/rssBlogView.xml
Feed Description: James Robertson comments on Cincom Smalltalk, the Smalltalk development community, and IT trends and issues in general.
Latest Agile Buzz Posts
Latest Agile Buzz Posts by James Robertson
Latest Posts From Cincom Smalltalk Blog - Smalltalk with Rants

Advertisement

A few minutes ago, Arden mentioned to me that it might be useful to make the code I was demonstrating on today's screencast available. That's a good idea, so here it is:


attrs := TextAttributes styleNamed: #systemDefault.
(attrs characterAttributes defaultQueryFor: nil) pixelSize: 14.
size := (attrs characterAttributes defaultQueryFor: nil) pixelSize.
attrs scalingFactor: ((size max: 1) /Screen default defaultFontPolicy defaultFont pixelSize).

To get the other defined fonts, just swap in the right symbolic name (you can find all the symbolic names with this):


styleNames := TextAttributes styles.

If you muck around in the FontDescription class, you can look into other changes you can make as well.

Technorati Tags: ,

Read: About Resetting Font Attributes

Topic: ObjectStudio On Track for Windows 7 Certification Previous Topic   Next Topic Topic: Rolling ownership of stories through the team

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use