From cec60604aff63953dc927d995d6804acd645cfdc Mon Sep 17 00:00:00 2001 From: nyamatongwe Date: Mon, 13 Mar 2000 06:33:34 +0000 Subject: Fixed printing problems including putting line numbers in correct position and flushing state when switching surfaces in case surfaces are encapsulating a shared underlying graphics context. --- src/ViewStyle.cxx | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/ViewStyle.cxx') diff --git a/src/ViewStyle.cxx b/src/ViewStyle.cxx index 976593de3..d5c36981b 100644 --- a/src/ViewStyle.cxx +++ b/src/ViewStyle.cxx @@ -53,6 +53,8 @@ ViewStyle::ViewStyle(const ViewStyle &source) { Init(); for (unsigned int sty=0;sty<(sizeof(styles)/sizeof(styles[0]));sty++) { styles[sty] = source.styles[sty]; + // Can't just copy fontname as its lifetime is relative to its owning ViewStyle + styles[sty].fontName = fontNames.Save(source.styles[sty].fontName); } for (int mrk=0;mrk<=MARKER_MAX;mrk++) { markers[mrk] = source.markers[mrk]; @@ -166,9 +168,9 @@ void ViewStyle::RefreshColourPalette(Palette &pal, bool want) { void ViewStyle::Refresh(Surface &surface) { selbar.desired = Platform::Chrome(); selbarlight.desired = Platform::ChromeHighlight(); - maxAscent = 1; - maxDescent = 1; styles[STYLE_DEFAULT].Realise(surface, zoomLevel); + maxAscent = styles[STYLE_DEFAULT].ascent; + maxDescent = styles[STYLE_DEFAULT].descent; for (unsigned int i=0;i<(sizeof(styles)/sizeof(styles[0]));i++) { if (i != STYLE_DEFAULT) { styles[i].Realise(surface, zoomLevel, &styles[STYLE_DEFAULT]); -- cgit v1.2.3