Solved

fontsize

Posted on 2002-07-23
3
438 Views
Last Modified: 2010-05-02
How do i print with at fontsize between 9 and 10?

fontsize =9.9
print "test"
fontsize =9.8
print "test"
fontsize =9.7
print "test"
fontsize =9.6
print "test"
fontsize =9.5
print "test"
fontsize =9.4
print "test"
fontsize =9.3
print "test"
fontsize =9.2
print "test"
fontsize =9.1
0
Comment
Question by:stigc
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 20

Expert Comment

by:hes
ID: 7173013
Basically you can't
Visual Basic doesn't raise an error when you assign an unsupported size of a font, but silently uses the closest valid font size that is less than the requested size.
So in your case if 9 and 10 are valid font Sizes VB will
convert it to 9 in each of your cases.
0
 

Author Comment

by:stigc
ID: 7174487
Is it possible from other language?
0
 

Accepted Solution

by:
paulll earned 100 total points
ID: 7175689
The screen is a virtual size, not an actual size. Since you have a fixed number of pixels, you cannot print a font size of 9 and a font size of 9.1.  It would occupy the same pixels and would not show a difference even though a printer which has higher resolution would show the difference with no problem using the same code as you have.
If you used a font size of:
fontsize =9.9 * 4  
print "test"
fontsize =9.8 * 4
print "test"
fontsize =9.7 * 4
print "test"
fontsize =9.6 * 4
print "test"
fontsize =9.5 * 4
print "test"
fontsize =9.4 * 4
print "test"
fontsize =9.3 * 4
print "test"
fontsize =9.2 * 4
print "test"
fontsize =9.1 * 4
you could see a difference even though windows would still set it to the nearest legal size.  Even then, there will still be some fonts that still show no difference.
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I was working on a PowerPoint add-in the other day and a client asked me "can you implement a feature which processes a chart when it's pasted into a slide from another deck?". It got me wondering how to hook into built-in ribbon events in Office.
Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…

739 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question