1826 The code below uses the fonts average height parameters - these |
1826 The code below uses the fonts average height parameters - these |
1827 are not OK for some oversized national characters (such as A-dieresis). |
1827 are not OK for some oversized national characters (such as A-dieresis). |
1828 Therefore, this method should be redefined in views which will be used |
1828 Therefore, this method should be redefined in views which will be used |
1829 with national characters (i.e. editTextViews)." |
1829 with national characters (i.e. editTextViews)." |
1830 |
1830 |
|
1831 |hMax| |
|
1832 |
1831 font := font on:device. |
1833 font := font on:device. |
|
1834 hMax := font height. |
|
1835 |
1832 includesNonStrings == true ifTrue:[ |
1836 includesNonStrings == true ifTrue:[ |
1833 |el| |
1837 "/ |
1834 |
1838 "/ find maximum height of lines |
1835 "/ for now, we do not support variable height entries ... |
1839 "/ |
1836 el := list first. |
1840 hMax := list inject:hMax into:[:maxSoFar :thisLine | |
1837 el isNil ifTrue:[ |
1841 thisLine isNil ifTrue:[ |
1838 list findFirst:[:e | e notNil |
1842 maxSoFar |
1839 ifTrue:[el := e. true] |
1843 ] ifFalse:[ |
1840 ifFalse:[false]]. |
1844 (thisLine isMemberOf:String) ifTrue:[ |
1841 ]. |
1845 maxSoFar |
1842 el isNil ifTrue:[ |
1846 ] ifFalse:[ |
1843 fontHeight := font height. "/ maxHeight. |
1847 maxSoFar max:(thisLine heightOn:self) |
1844 ] ifFalse:[ |
1848 ] |
1845 fontHeight := el heightOn:self |
1849 ] |
1846 ] |
1850 ]. |
1847 ] ifFalse:[ |
1851 |
1848 fontHeight := font height. "/ maxHeight. |
1852 ]. |
1849 ]. |
1853 fontHeight := hMax + lineSpacing. |
1850 fontHeight := fontHeight + lineSpacing. |
|
1851 fontAscent := font ascent. "/ maxAscent. |
1854 fontAscent := font ascent. "/ maxAscent. |
1852 fontWidth := font width. |
1855 fontWidth := font width. |
1853 fontIsFixedWidth := font isFixedWidth. |
1856 fontIsFixedWidth := font isFixedWidth. |
1854 |
1857 |
1855 "Modified: 3.7.1997 / 12:24:25 / cg" |
1858 "Modified: 3.7.1997 / 12:24:25 / cg" |