<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META content="text/html; charset=iso-8859-1" http-equiv=Content-Type>
<META content="MSHTML 5.00.2614.3500" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY>
<DIV><BR>Mike Roberts <<A
href="mailto:mike@mjr104.co.uk">mike@mjr104.co.uk</A>> told us about a
problem with fonts<BR>and stylished class comments:<BR><BR>>
Hi,<BR>><BR>> Install AccuFonts in a fresh image and change the default
system font to<BR>> something big like 14pt.<BR>> View the class comments
for a class with hypertext. For example<BR>><BR>> "View the class
comment for Date"<BR>> |br view|<BR>> br _ Browser new.<BR>> br
setClass: Date selector: nil.<BR>> view _ br openEditString:nil.<BR>>
Browser openBrowserView: view label: 'System Browser'.<BR>> view model
plusButtonHit<BR>><BR>> The font remains at the original (Accuny09?) font
that is first setup<BR>after the installation.<BR>><BR>> If you view a
class comment without hypertext then the font is correct.<BR>><BR>Note that a
class comment that contains a hyperlink (or other text style<BR>features)
is stored in a special format that keeps text styles. Other<BR>comments are
stored as strings (that is, without text style information).<BR>The stored style
information takes precedence over default style settings.<BR><BR>This is an
explanation in a nutshell. Now some additional remarks for<BR>the curious
ones:<BR><BR>The style information of the class comment for class Date is the
following</DIV>
<DIV>string that follows the comment as a separate chunk:<BR><BR>]style[(323 58
1
65<BR>304)f1,f1Rhttp://www.magnet.ch/serendipity/hermetic/cal_stud/jdn.htm;,f1,f1R<BR><A
href="http://www.cs.ubc.ca/spider/flinn/docs/scham/primitives/time.html;,f1">http://www.cs.ubc.ca/spider/flinn/docs/scham/primitives/time.html;,f1</A>!<BR><BR><BR>The
methods that create this style description string are
named<BR><STRONG>writeScanOn: </STRONG>You find these methods in RunArray and in
all classes<BR>that represent text style features.<BR><BR>RunArray
class>><STRONG>scanFrom: </STRONG>is executed to read such a style
description and<BR>to reconstruct the text style information. Reading this
method is really<BR>helpful to understand how to interpret a style description
string.<BR><BR>The method
PositionableStream>><STRONG>nextChunkText</STRONG> is used to read a
method<BR>definition or a class comment from either the changes file or the
sources<BR>file.<BR><BR>You find that a definition without text style is read
into a string that is<BR>then converted into an instance of Text by
String>><STRONG>asText</STRONG>.<BR><BR>String>>asText is defined
as<BR><BR>^Text fromString: self<BR><BR>and Text
class>><STRONG>fromString: </STRONG>reads:<BR><BR> ^ self
string: aString attribute: (TextFontChange fontNumber: TextStyle<BR>default
defaultFontIndex)<BR><BR>Here the default text style is used.<BR><BR><BR>For a
definition that is stored with style, the both the string and the<BR>styles are
read and put together as a Text by<BR><BR>Text basicNew <STRONG>setString:
</STRONG>string <STRONG>setRunsChecking: </STRONG>runs<BR><BR>Here we do not use
the default system font. (runs is an instance of<BR>RunArray that contains the
various text attributes)<BR><BR>><BR>> I have started to hunt around
TextAttribute and friends but I'm a bit<BR>lost. Does anyone have the
answer or a direction for me to look in?<BR>><BR>Well, I hope my remarks are
helpful. They are certainly not complete.<BR>My apologies if they areunhelpful
or confusing.<BR><BR>Greetings, Boris<BR></DIV></BODY></HTML>