comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Font differences between IDL 5.6 and IDL 6.0
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Font differences between IDL 5.6 and IDL 6.0 [message #38247] Fri, 27 February 2004 06:32
lwhanigan is currently offline  lwhanigan
Messages: 1
Registered: February 2004
Junior Member
There seems to be a difference in which IDL5.6 and 6.0 handles fonts.
IDL6.0 does not appear to be consistant when displaying characters in
size and alignment. For me, new lines do not always line up
vertically. In addition, lines with only text, (i.e. no numbers),
seem to appear smaller than do lines with text and numbers. Has
anyone else encountered this? And if so, have you found a way to fix
these problems? Or maybe know what IDL is doing differently? I've
appended a small test program which illustrates my problem.

Lynn


PRO zTestFont

printjob=1 ; allow printing-change to 0 to skip printing
if (printjob) then begin
quality=2
oPrinter=OBJ_NEW('IDLgrPrinter',PRINT_QUALITY=quality,UNITS= 2)
iRet=DIALOG_PRINTERSETUP(oPrinter)
IF iRet THEN printjob=1 ;print job cancelled
oPrinter->getProperty,DIMENSIONS=pageSize,RESOLUTION=resolution
endif

oPrintModel=OBJ_NEW('IDLgrModel')
dxsize=1000
dysize=1000
oWindow = OBJ_NEW('IDLgrWindow', DIMENSIONS=[dxsize,dysize], $
RETAIN=0, RENDERER=1)

oView = OBJ_NEW('IDLgrView')
oFont = OBJARR(4)
oText = OBJARR(16)
oModel = OBJARR(16)
yPos = FLTARR(16)
str = STRARR(4)
fontstr = STRARR(4)
fontsize = INTARR(4)

xPos=-.9
newypos=.98

fontstr[0]='Courier'
fontstr[1]='Courier*bold'

fontsize[0]=8
fontsize[1]=10
fontsize[2]=12
fontsize[3]=14

for k=0,3 do begin
for j=0,1 do begin
for i=0,3 do begin
offset=(FLOAT(fontsize)-5)/100
yPos[i+j]= newypos-offset
str[0]='Test of '+fontstr[j]+' of size '+ $
strtrim(string(fontsize[k]),1)
str[1]='Image Type:JPEG-lines seem to not'+$
' line up vertically in IDL6.0'
str[2]='0123456789 : Test - 012x345x678'
str[3]='Lines with numbers/text seem larger'+$
' in font size text only'
oFont[k]=OBJ_NEW('IDLgrFont',NAME=fontstr[j],SIZE=fontsize[k ])
oText[i+j]=OBJ_NEW('IDLgrText',STRING=str[i], FONT=oFont[k])
oModel[i+j]=OBJ_NEW('IDLgrModel')
oModel[i+j]->translate,xPos,yPos[i+j],0
oModel[i+j]->add, oText[i+j]
oPrintModel->add,oModel[i+j]
newypos=yPos[i+j]
endfor
endfor
endfor

oView->add, oPrintModel
oWindow->draw, oView

if (printjob) and (iRet) then begin
oPrinter->draw, oView
oPrinter->newDocument
endif

OBJ_DESTROY, oText
OBJ_DESTROY, oModel
OBJ_DESTROY, oPrintModel
OBJ_DESTROY, oView

if (printjob) then begin
OBJ_DESTROY, oPrinter
endif
END
[Message index]
 
Read Message
Previous Topic: Displaying Programs
Next Topic: Re: Similar to a Widget_Container

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Sat Oct 11 07:11:45 PDT 2025

Total time taken to generate the page: 3.03689 seconds