Page 1 of 1

Font quality differences v4.31 vs v4.51 ?

Posted: Mon Oct 11, 2010 10:31 pm
by freezer
Since changing from PB v4.31 to 4.51
I have found that my fonts look rougher. Is there a setting I can change in 4.51 to make
the fonts look as smooth as they were in 4.31 ?

I'm running XP SP2 32bit.

The same code was used in both versions (with just the version no changed).

Thanks.

Code: Select all

EnableExplicit
Define event,img,xPos
InitSprite()
OpenWindow(0,100,100,800,300,"XP - PB v4.51")
OpenWindowedScreen(WindowID(0),0,0,800,300,0,0,0)

img = CreateImage(#PB_Any,800,300)
LoadFont(1,"Times New Roman",200)
LoadFont(2,"Times New Roman",60)

StartDrawing(ImageOutput(img))

 DrawingFont(FontID(1))
  Box(0,0,800,300,#White)
  xPos = DrawText(60,0,"XP",#Black,#White )
  DrawingFont(FontID(2))
  DrawText(xPos,110," - PB v4.51",#Black,#White)
StopDrawing()

Repeat
  StartDrawing(ScreenOutput())
    DrawImage(ImageID(img),0,0)
  StopDrawing()
  FlipBuffers()
  event = WaitWindowEvent(1)
  
Until event = #PB_Event_CloseWindow

Image

Re: Font quality differences v4.31 vs v4.51 ?

Posted: Mon Oct 11, 2010 10:43 pm
by Trond
I know, I don't know why didn't fix this (pretty severe IMO) bug yet. The only workaround is to use TextOut_() or DrawText_() api function.

Re: Font quality differences v4.31 vs v4.51 ?

Posted: Mon Oct 11, 2010 10:48 pm
by Trond

Code: Select all

;EnableExplicit
Define event,img,xPos
InitSprite()
OpenWindow(0,100,100,800,300,"XP - PB v4.51")
OpenWindowedScreen(WindowID(0),0,0,800,300,0,0,0)

img = CreateImage(#PB_Any,800,300)
LoadFont(1,"Times New Roman",200)
LoadFont(2,"Times New Roman",60)

hDC = StartDrawing(ImageOutput(img))

  ;DrawingFont(FontID(1))
  SelectObject_(hDC, FontID(1))
  Box(0,0,800,300,#White)
  TextOut_(hDC, 60,0,"XP",2 )
  xPos = 401
  S.s = " - PB v4.51"
  SelectObject_(hDC, FontID(2))
  TextOut_(hDC, xPos,110,@S,Len(S))
StopDrawing()

Repeat
  StartDrawing(ScreenOutput())
    DrawImage(ImageID(img),0,0)
  StopDrawing()
  FlipBuffers()
  event = WaitWindowEvent(1)
  
Until event = #PB_Event_CloseWindow

Re: Font quality differences v4.31 vs v4.51 ?

Posted: Mon Oct 11, 2010 10:49 pm
by STARGĂ…TE
or PB DrawText with ClearType Font:

Code: Select all

Procedure LoadClearTypeFont(Name$, Size.i, Style=0)
  Protected LogFont.LOGFONT 
  With LogFont
   \lfHeight         = Size
   \lfWidth          = 0
   \lfEscapement     = 0
   \lfOrientation    = 0 
   If Style & #PB_Font_Bold       : \lfWeight = 700 : Else : \lfWeight = 400 : EndIf
   If Style & #PB_Font_Italic     : \lfItalic = #True : Else : \lfItalic = #False : EndIf  
   If Style & #PB_Font_Underline  : \lfUnderline = #True : Else : \lfUnderline = #False : EndIf  
   If Style & #PB_Font_StrikeOut  : \lfStrikeOut = #True : Else : \lfStrikeOut = #False : EndIf  
   \lfCharSet        = #DEFAULT_CHARSET
   \lfOutPrecision   = #OUT_DEFAULT_PRECIS	
   \lfClipPrecision  = #CLIP_DEFAULT_PRECIS 
   \lfQuality        = #CLEARTYPE_QUALITY
   \lfPitchAndFamily = #DEFAULT_PITCH | #FF_DONTCARE 
   PokeS(@\lfFaceName[0], Name$) 
  EndWith
  ProcedureReturn CreateFontIndirect_(@LogFont) 
EndProcedure

Re: Font quality differences v4.31 vs v4.51 ?

Posted: Mon Oct 11, 2010 11:02 pm
by freezer
Thanks for your help guys, I will pick the codes apart and learn a lot from this !

Re: Font quality differences v4.31 vs v4.51 ?

Posted: Wed Nov 17, 2010 4:18 pm
by DoubleDutch
Hadn't noticed this problem before. It should be moved to the bugs section I think?

Re: Font quality differences v4.31 vs v4.51 ?

Posted: Wed Nov 17, 2010 4:43 pm
by Rook Zimbabwe
I see it too... Of couse I don't see it in as bumpy a detail.

Updating to XP Pro SP3 might ease this as well... but the isssue of forced updates is maddening!

(I ussed the update disk I had to borrow from a friend...) But to upgrade to Win7/32bit I paid a legal $29.00 for the upgrade disks for my IBM fully registered and legal now!