BBC BASIC for Windows
« Points vs Pixels »

Welcome Guest. Please Login or Register.
Apr 5th, 2018, 9:56pm



ATTENTION MEMBERS: Conforums will be closing it doors and discontinuing its service on April 15, 2018.
Ad-Free has been deactivated. Outstanding Ad-Free credits will be reimbursed to respective payment methods.

If you require a dump of the post on your message board, please come to the support board and request it.


Thank you Conforums members.

BBC BASIC for Windows Resources
Online BBC BASIC for Windows documentation
BBC BASIC for Windows Beginners' Tutorial
BBC BASIC Home Page
BBC BASIC on Rosetta Code
BBC BASIC discussion group
BBC BASIC for Windows Programmers' Reference

« Previous Topic | Next Topic »
Pages: 1  Notify Send Topic Print
 thread  Author  Topic: Points vs Pixels  (Read 217 times)
hellomike
New Member
Image


member is offline

Avatar




PM

Gender: Male
Posts: 46
xx Points vs Pixels
« Thread started on: Jun 25th, 2015, 1:58pm »

Hi,

For PRINT output I want some fancier font. Unfortunately the font doesn't really come out fine.
Code:
      VDU 23,22,512;512;16,16,16,0
      *FONT Courier New,10,B
      PRINT "The Quick Brown Fox Jumps Over The Lazy Dog"
      END
 

Some characters slightly overlap.

I guess it has something to do with my incorrect choice of points or pixels or both.

Strangely enough, after the program ends and I start typing in the same output window, the effect is not there....

What extra do I need to do/consider?
I hope it is not related to my videocard/driver.

Thanks

Mike
User IP Logged

rtr2
Guest
xx Re: Points vs Pixels
« Reply #1 on: Jun 25th, 2015, 3:55pm »

on Jun 25th, 2015, 1:58pm, hellomike wrote:
What extra do I need to do/consider?

Kerning perhaps? This is a complicated area, as has been discussed before (I can't remember whether here or at the Yahoo group). How (and whether) kerning is actioned depends on the version of Windows, on the API call(s) used and on the plotting mode.

Things you can try are to use the VDU 5 mode (plot text at graphics coordinates), or to explicitly set the text background colour to transparent using an API call, or to change the character spacing (again using an API call). You may find relevant information by searching this forum and the Yahoo group for posts mentioning kerning.

Finally I would point out that ClearType can affect this - so maybe try turning it off - as can the automatic scaling applied with high DPI values in recent versions of Windows, which again you can try disabling.

As I said, it's a complex area!

Richard.
User IP Logged

rtr2
Guest
xx Re: Points vs Pixels
« Reply #2 on: Jun 25th, 2015, 5:57pm »

on Jun 25th, 2015, 3:55pm, g4bau wrote:
Things you can try are to use the VDU 5 mode

Code:
      VDU 23,22,512;512;16,16,16,0
      *FONT Courier New,10,B
      VDU 5,30
      PRINT "The Quick Brown Fox Jumps Over The Lazy Dog"
      END 

Quote:
or to explicitly set the text background colour to transparent

Code:
      VDU 23,22,512;512;16,16,16,0
      *FONT Courier New,10,B
      TRANSPARENT = 1
      SYS "SetBkMode", @memhdc%, TRANSPARENT
      PRINT "The Quick Brown Fox Jumps Over The Lazy Dog"
      END 

Quote:
or to change the character spacing

Code:
      VDU 23,22,512;512;16,16,16,0
      *FONT Courier New,10,B
      SYS "SetTextCharacterExtra", @memhdc%, 1
      PRINT "The Quick Brown Fox Jumps Over The Lazy Dog"
      END 

Richard.
User IP Logged

hellomike
New Member
Image


member is offline

Avatar




PM

Gender: Male
Posts: 46
xx Re: Points vs Pixels
« Reply #3 on: Jun 27th, 2015, 11:01am »

Thanks for the replies.

Adding the line:

Code:
 SYS "SetBkMode", @memhdc%, 1 


Seems to solve the issue.

Indeed pretty complex stuff. How I miss the simple RISC OS and its PRM.

Thanks again.

Mike
User IP Logged

Pages: 1  Notify Send Topic Print
« Previous Topic | Next Topic »

| |

This forum powered for FREE by Conforums ©
Terms of Service | Privacy Policy | Conforums Support | Parental Controls