2569 "get some info of the used font. They are cached since we use them often .. |
2569 "get some info of the used font. They are cached since we use them often .. |
2570 This is redefined here, to use the fonts maxHeight/maxAscent for |
2570 This is redefined here, to use the fonts maxHeight/maxAscent for |
2571 line separation. This is required, to allow for proper handling of |
2571 line separation. This is required, to allow for proper handling of |
2572 national characters, such as A-dieresis ..." |
2572 national characters, such as A-dieresis ..." |
2573 |
2573 |
2574 |italicFont boldFont| |
2574 |italicFont boldFont fA iA bA| |
2575 |
2575 |
2576 font := font onDevice:device. |
2576 font := font onDevice:device. |
2577 italicFont := font asItalic onDevice:device. |
2577 italicFont := font asItalic onDevice:device. |
2578 boldFont := font asBold onDevice:device. |
2578 boldFont := font asBold onDevice:device. |
2579 |
2579 |
2580 includesNonStrings == true ifTrue:[ |
2580 includesNonStrings == true ifTrue:[ |
2581 "/ for now, we do not support variable height entries ... |
2581 "/ for now, we do not support variable height entries ... |
2582 fontHeight := list first heightOn:self |
2582 fontHeight := list first heightOn:self |
2583 ] ifFalse:[ |
2583 ] ifFalse:[ |
2584 fontHeight := font maxHeight max:(italicFont maxHeight max:(boldFont maxHeight)). |
2584 fontHeight := font maxHeight max:(italicFont maxHeight max:(boldFont maxHeight)). |
|
2585 "/ fontHeight := font height "maxHeight" max:(italicFont height "maxHeight" max:(boldFont height "maxHeight")). |
2585 ]. |
2586 ]. |
2586 fontHeight := fontHeight + lineSpacing. |
2587 fontHeight := fontHeight + lineSpacing. |
2587 fontAscent := font maxAscent max:(italicFont maxAscent max:(boldFont maxAscent)). |
2588 "/ fontAscent := font ascent "maxAscent" max:(italicFont ascent "maxAscent" max:(boldFont ascent "maxAscent")). |
|
2589 fA := font ascent. "/ (font maxAscent + font ascent) // 2. |
|
2590 iA := italicFont ascent. "/ (italicFont maxAscent + italicFont ascent) // 2. |
|
2591 bA := boldFont ascent. "/ (boldFont maxAscent + boldFont ascent) // 2. |
|
2592 fontAscent := fA max:(iA max:bA). |
2588 fontWidth := font width. |
2593 fontWidth := font width. |
2589 fontIsFixedWidth := font isFixedWidth and:[ italicFont isFixedWidth and:[ boldFont isFixedWidth ]]. |
2594 fontIsFixedWidth := font isFixedWidth and:[ italicFont isFixedWidth and:[ boldFont isFixedWidth ]]. |
2590 |
2595 |
2591 "Modified: 22.5.1996 / 12:02:47 / cg" |
2596 "Modified: 22.5.1996 / 12:02:47 / cg" |
2592 "Created: 22.5.1996 / 12:18:34 / cg" |
2597 "Created: 22.5.1996 / 12:18:34 / cg" |