[Last Call] Learn about multicloud storage options and how to improve your company's cloud strategy. Register Now

x
?
Solved

fontsize

Posted on 2002-07-23
3
Medium Priority
?
457 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 400 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

[Webinar] Lessons on Recovering from Petya

Skyport is working hard to help customers recover from recent attacks, like the Petya worm. This work has brought to light some important lessons. New malware attacks like this can take down your entire environment. Learn from others mistakes on how to prevent Petya like worms.

Question has a verified solution.

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

Have you ever wanted to restrict the users input in a textbox to numbers, and while doing that make sure that they can't 'cheat' by pasting in non-numeric text? Of course you can do that with code you write yourself but it's tedious and error-prone …
This article describes some techniques which will make your VBA or Visual Basic Classic code easier to understand and maintain, whether by you, your replacement, or another Experts-Exchange expert.
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
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…
Suggested Courses

650 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