Font quality differences v4.31 vs v4.51 ?

Just starting out? Need help? Post your questions and find answers here.
freezer
New User
New User
Posts: 5
Joined: Thu Dec 10, 2009 10:52 am

Font quality differences v4.31 vs v4.51 ?

Post 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
Trond
Always Here
Always Here
Posts: 7446
Joined: Mon Sep 22, 2003 6:45 pm
Location: Norway

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

Post 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.
Trond
Always Here
Always Here
Posts: 7446
Joined: Mon Sep 22, 2003 6:45 pm
Location: Norway

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

Post 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
User avatar
STARGÅTE
Addict
Addict
Posts: 2227
Joined: Thu Jan 10, 2008 1:30 pm
Location: Germany, Glienicke
Contact:

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

Post 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
PB 6.01 ― Win 10, 21H2 ― Ryzen 9 3900X, 32 GB ― NVIDIA GeForce RTX 3080 ― Vivaldi 6.0 ― www.unionbytes.de
Lizard - Script language for symbolic calculations and moreTypeface - Sprite-based font include/module
freezer
New User
New User
Posts: 5
Joined: Thu Dec 10, 2009 10:52 am

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

Post by freezer »

Thanks for your help guys, I will pick the codes apart and learn a lot from this !
User avatar
DoubleDutch
Addict
Addict
Posts: 3220
Joined: Thu Aug 07, 2003 7:01 pm
Location: United Kingdom
Contact:

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

Post by DoubleDutch »

Hadn't noticed this problem before. It should be moved to the bugs section I think?
https://deluxepixel.com <- My Business website
https://reportcomplete.com <- School end of term reports system
User avatar
Rook Zimbabwe
Addict
Addict
Posts: 4322
Joined: Tue Jan 02, 2007 8:16 pm
Location: Cypress TX
Contact:

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

Post 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!
Binarily speaking... it takes 10 to Tango!!!

Image
http://www.bluemesapc.com/
Post Reply