Mantis Bugtracker

Viewing Issue Simple Details Jump to Notes ] View Advanced ] Issue History ] Print ]
ID Category Severity Reproducibility Date Submitted Last Update
0003817 [Squeak] Collections minor always 06-17-06 13:27 06-18-06 23:01
Reporter mathk View Status public  
Assigned To
Priority normal Resolution open  
Status new   Product Version 3.9
Summary 0003817: Nil value of fontNumber in TextFontReference
Description When TextFontNumber is initialize with #toFont: methode, it let fontNumber atribut to nil.
So some other code, like #openHtmlOn don't work.

The file fix this but I use pointSize to initialise fontNumber. May be pixelSize is better?
Additional Information
Attached Files  TestFontReferenceToFont.1.cs [^] (1,380 bytes) 06-17-06 13:27

- Relationships

- Notes
(0005276 - 911 - 1107 - 1107 - 1107 - 1107 - 1107)
06-18-06 23:01

The correct name of the class is TextFontReference. fontNumber is an inherited instance variable, it is not referenced by the methods of TextFontReference.

In the superclass TextFontchange the value of fontNumber is an index into the fontArray of a TextStyle. Recommended values are in the range from 1 to fontAray size. (TextStyle maps all indices that are not in that range to reasonable defaults, look at TextStyle>>fontAt: and SequenceableCollection>>atPin:)

Perhaps one shoult redefine openHtmlOn: for TextFontReference:

  openHtmlOn: aStream
 "put on the given stream the tag to open the html
 representation of the receiver"
 font openHtmlOn: aStream

closeHtmlOn: aStream
 "put on the given stream the tag to close the html
 representation of the receiver"
 font closeHtmlOn: aStream

As an aside, I think that TextFontReference should be a subclass of TextAttribute.

- Issue History
Date Modified Username Field Change
06-17-06 13:27 mathk New Issue
06-17-06 13:27 mathk File Added: TestFontReferenceToFont.1.cs
06-17-06 18:57 mathk Issue Monitored: mathk
06-18-06 23:01 BGaertner Note Added: 0005276
07-19-06 00:17 mathk Issue End Monitor: mathk

Mantis 1.0.8[^]
Copyright © 2000 - 2007 Mantis Group
38 total queries executed.
27 unique queries executed.
Powered by Mantis Bugtracker