[Search for users] [Overall Top Noters] [List of all Conferences] [Download this site]

Conference bulova::decw_jan-89_to_nov-90

Title:DECWINDOWS 26-JAN-89 to 29-NOV-90
Notice:See 1639.0 for VMS V5.3 kit; 2043.0 for 5.4 IFT kit
Moderator:STAR::VATNE
Created:Mon Oct 30 1989
Last Modified:Mon Dec 31 1990
Last Successful Update:Fri Jun 06 1997
Number of topics:3726
Total number of notes:19516

1049.0. "How to scale text ?" by KETJE::DIERICK (BLACK HOLES ARE OUTASIGHT) Mon Jul 03 1989 05:21

My customer has nice transformation routines to scale graphic elements
(icons) consisting of polygons, squares, arcs...
He will be able to port this to Xlib without too big problems, but there
is one tricky thing.
Inside such an icon there can be text. Now we don't want to use region
scaling as a tool, giving a problem on how to scale text.
Decwindows gives us a lot of fonts of four or five different point sizes in
discrete steps.
How could we implement continuous scaling of text inside a graphic icon then ?
Or do we have to be satisfied with using discrete scaling steps (100%,50%...) ?

Dominique

T.RTitleUserPersonal
Name
DateLines
1049.1PDVAX::P_DAVISPeter DavisFri Jul 14 1989 18:0714
    Well, the "right" way to do it would be to see if there's already a
    font for the size of text that would result from the scaling.  If there
    isn't, then you have to scale an existing font using bitmap scaling
    techniques.  
    
    The trick is choosing the bitmap font which would give the best results
    after scaling.  For example, if you had a 6 point font and a 14 point
    font, and you wanted twelve, you could just quadruple every bit in the
    6 point font to get a 12 point version.  This is pretty simple, but the
    results would be pretty jagged.  You could also use sampling techniques
    to get a 12 point font from the 14 point one.
    
    Or, you could wait for Display PostScript.