#BUGFIX by cg
class: ListView
comment/format in: #colOfX:inVisibleLine:
changed: #getFontParameters
a fontWidht of zero will kill me.
treat as width 1 then.
--- a/ListView.st Fri Oct 14 19:04:07 2016 +0200
+++ b/ListView.st Fri Oct 14 19:25:27 2016 +0200
@@ -2713,8 +2713,7 @@
for fix fonts, this is easy ...
"
(fontIsFixedWidth
- and:[lineString isNil
- or:[lineString hasChangeOfEmphasis not]]) ifTrue:[
+ and:[lineString isNil or:[lineString hasChangeOfEmphasis not]]) ifTrue:[
^ (xRel // fontWidth) + 1
].
@@ -2931,6 +2930,11 @@
"/ fontAscent := font maxAscent "ascent". "/ maxAscent. -- see SelectionInListViews selection in motif style
"/ fontAscent := (font maxAscent + font ascent) // 2. "/ maxAscent. -- see SelectionInListViews selection in motif style
fontWidth := newDeviceFont width.
+ fontWidth == 0 ifTrue:[
+ "/ should not happen, but some bad fonts seem to have it
+ ('ListView [info]: font says, it has zero width: ', newDeviceFont printString) infoPrintCR.
+ fontWidth := 1.
+ ].
fontIsFixedWidth := newDeviceFont isFixedWidth.
"Modified: 3.7.1997 / 12:24:25 / cg"