Trolltech Home | Qt-interest Home | Recent Threads | All Threads | Author | Date
All threads index page 4

Qt-interest Archive, October 2007
RE: Scaling a symbol font doesn't work correctly


Message 1 in thread

Hi Everyone, 

Apparently this is a known 4.3.1 bug, and it occurs when the scaled point size goes from 64 to 65. Also the bug affects all fonts, not just symbol types. 

The issue is fixed in 4.3.2, but when I tried that version, there were other problems when getting the tightBoundingRect during init that displays debug warnings and returns the wrong size. 

Regards, 

> -----Original Message-----
> From: Tony Rietwyk [mailto:tony.rietwyk@xxxxxxxxxxxxxxxx] 
> Sent: Monday, 24 September 2007 10:55
> To: 'qt-interest@xxxxxxxxxxxxx'
> Subject: Scaling a symbol font doesn't work correctly
> 
> 
> Hi Everyone, 
> 
> Qt 4.3.1 compiled using MSVC Standard. 
> 
> I am porting an existing Windows application to Qt. The 
> application uses a symbol font to draw musical notation. The 
> windows version used a transformation matrix to apply 
> zooming, and it worked well from 1% to 1000%. 
> 
> The Qt version applies the zooming to a painter in a QFrame 
> paint event. It only seems to work up to 210%. Over 210% the 
> symbol font characters are drawn at a much smaller size. 
> 
> For example:
> 
> painter.setFont( QFont( "Times New Roman", 30, -1, false );
> painter.scale( iZoom / 100.0, iZoom / 100.0 );
> painter.drawText( 300, 300, "&" );
> 
> The above works well. I can change the iZoom up to 500% and 
> the character draws correctly. 
> 
> If I change it to use "Opus" font, which is a symbol font, 
> then it doesn't. It works OK up to 210%, then jumps to a 
> smaller size at 220%. 
> 
> Windows can transform the font correctly, but Qt painter doesn't. 
> 
> Eventually, I hope to convert to use GraphicsView. But I do 
> not want to spend all that time rewriting, if the font is not 
> going to work anyway. 
> 
> Thanks in advance for any assisstance!  
> 

--
 [ signature omitted ]