<!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 &lt;<A 
href="mailto:mike@mjr104.co.uk">mike@mjr104.co.uk</A>&gt; told us about a 
problem with fonts<BR>and stylished class comments:<BR><BR>&gt; 
Hi,<BR>&gt;<BR>&gt; Install AccuFonts in a fresh image and change the default 
system font to<BR>&gt; something big like 14pt.<BR>&gt; View the class comments 
for a class with hypertext.&nbsp; For example<BR>&gt;<BR>&gt; "View the class 
comment for Date"<BR>&gt; |br view|<BR>&gt; br _ Browser new.<BR>&gt; br 
setClass: Date selector: nil.<BR>&gt; view _ br openEditString:nil.<BR>&gt; 
Browser openBrowserView: view label: 'System Browser'.<BR>&gt; view model 
plusButtonHit<BR>&gt;<BR>&gt; The font remains at the original (Accuny09?) font 
that is first setup<BR>after the installation.<BR>&gt;<BR>&gt; If you view a 
class comment without hypertext then the font is correct.<BR>&gt;<BR>Note that a 
class comment that contains a&nbsp; 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 

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&gt;&gt;<STRONG>scanFrom:&nbsp; </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&nbsp; 
PositionableStream&gt;&gt;<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&nbsp; 
String&gt;&gt;<STRONG>asText</STRONG>.<BR><BR>String&gt;&gt;asText is defined 
as<BR><BR>^Text fromString: self<BR><BR>and Text 
class&gt;&gt;<STRONG>fromString:&nbsp; </STRONG>reads:<BR><BR>&nbsp;^ 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>&gt;<BR>&gt; I have started to hunt around 
TextAttribute and friends but I'm a bit<BR>lost.&nbsp; Does anyone have the 
answer or a direction for me to look in?<BR>&gt;<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>