Mantis - Squeak
Viewing Issue Advanced Details
7144 Multilingual minor always 08-03-08 17:56 08-03-08 18:02
wiz  
 
normal  
new  
open  
none    
none  
0007144: In Sq 7159 TTCFontSet>>pointSize is poorly coded
The code for this method hardwires parameter constants into the method rather than refering to the authoritative settngs.

It also floors the answer. Since this message is used for other computaions this can lead to truncation/roundoff errors. And I have seen other evidence that other code seems to have been writen to get around this codes poor behavior.

'From Squeak3.10.2 of ''5 June 2008'' [latest update: 0007179] on 2 August 2008 at 11:58:13 pm'!

!TTCFontSet methodsFor: 'as yet unclassified' stamp: 'yo 11/16/2002 01:17'!
pointSize

    ^ fontArray first pixelSize * 72 // 96.
! !
hardwires the constants for points/inch and pixels per inch.

This is WRONG.
child of 0006570assigned tim A Mother for font and font test problems 

Notes
(0012438)
wiz   
08-03-08 18:02   
point size
pixel size
ascent
descent
height

are various measures for font glyphs used in different ways thru out the code.

There is major code tangle and confusion as to there use.
And I have been finding inconsistances as I review (and try to understand) the code. This is another one.

What is needed is a documentation of the rules that need to govern the meaning and use of the above terms.