Path: utzoo!attcan!uunet!lll-winken!csd4.milw.wisc.edu!mailrus!tut.cis.ohio-state.edu!ucbvax!gateway.mitre.org!alexis%yummy From: alexis%yummy@gateway.mitre.org Newsgroups: comp.windows.news Subject: Text Scaling in NeWS Message-ID: <8905191857.AA02474@marzipan.mitre.org> Date: 20 May 89 03:55:47 GMT Sender: daemon@ucbvax.BERKELEY.EDU Organization: The Internet Lines: 23 We have a large neural network simulation / modeling system build in NeWS (and X). All of the windows scale, which means that network/layer names, node/arc values, etc have to be scaled if they are currently being displayed. In doing this we saw all of the scaling problems you mentioned. Re centering the font, cshow uses stringwidth which seems to count the space after the last character -- giving a noticable offset for small fonts. Use stringbbox to correct this problem. Re proportion, this could be round off error -- NeWS has a foolishly small amount of precision -- but it could be the fixed font sizes. After creating the string I find the size of the text and scale again if necessary. This catches both of these problems. In general you can't do much with small fonts. Since NeWS (or at least Sun) currently uses only bitmapped fonts, there's a limit to what can be done (on both the large and the small end). We have a last ditch if-you-can't-draw-it-right-then-don't-draw-it-at-all check which turns off the scaled text if the text just can't be generated small enough. alexis wieland alexis%yummy@gateway.mitre.org