473,326 Members | 2,813 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,326 software developers and data experts.

Fractional Font Size? e.g. 8.5

I am still using Access 97 which is very stubborn about using a whole
number for font size - even in code. Wondering if 2000 will let you
do otherwise?
Nov 13 '05 #1
4 2620
'fraid not:

? TypeName(Forms(0).Surname.FontSize)
Integer

--
Allen Browne - Microsoft MVP. Perth, Western Australia.
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

"Penguin" <pe***********@aol.com> wrote in message
news:2a************************@posting.google.com ...
I am still using Access 97 which is very stubborn about using a whole
number for font size - even in code. Wondering if 2000 will let you
do otherwise?

Nov 13 '05 #2
If you are that pushed for space, try some different fonts like Arial
Narrow. Different fonts physically take more or less space for a given
letter at a given size.
For example Tahoma and Arial both take about 72mm to type 20 "m"s, while
Arial Narrow takes about 55mm and Times New Roman about 67mm

Phil
"Penguin" <pe***********@aol.com> wrote in message
news:2a************************@posting.google.com ...
I am still using Access 97 which is very stubborn about using a whole
number for font size - even in code. Wondering if 2000 will let you
do otherwise?

Nov 13 '05 #3
Sounds like it would be useful to create a table of fonts names &
widths. How might I calculate them?

My issue is actually not space but aesthetics. My application is a
database used by schools. Each school can enter preferences for their
stationery (logo centered, to side, text on letterhead centered or to
side, line at bottom etc.)

My own school, for whom I originally developed it, has it's letterhead
as follows:

L O SCHOOL NAME
G O Address
H E City State
R E Phone etc.

In a real graphics program, or even in Word, you can play with font
sizes and use condensed/expanded text to get the address, city & phone
to all end up the same widht. (You can also adjust leading whereas I
use Schoolname.top + schoolname.height - SomeNumber and use trial and
error to get them as close as I want).

Ideally, if I could calculate the width of average text for a font,
and use that number / len(address) to assign a font size, I could get
the address in, say, 10 or 12 point, to match the school name in 18
point. I did try playing with fontweight as well. (I found a reference
to me.textwidth(controlname) but it didn't seem to get me anywhere)

For the first two clients (we're just starting out) we coded a few
types of letterheads (small to fit the addressee into window envelope,
receipt which is even smaller, fax which uses larger fonts for better
legibility etc.). When the client's preference is to have the text
all centered, I don't care so much about the sizes, but my own
school's letterhead, as originally designed by a graphic artist, does
seem to look much nicer when all the text has the same approximate
width. Thus my frustration with font sizes being forced to whole
numbers.

I did actually find a nice narrow font in some Corel Resources,
Windsor LtCn BT, which gave me more flexibility. (It also has a very
decorative ampersand which considerably enhances my "Phone & Fax:"
type of labels....

Anyhow, thanks to all (two) who responded. Any more ideas?
"Phil Stanton" <di********@stantonfamily.co.uk> wrote in message news:<41***********************@mercury.nildram.ne t>...
If you are that pushed for space, try some different fonts like Arial
Narrow. Different fonts physically take more or less space for a given
letter at a given size.
For example Tahoma and Arial both take about 72mm to type 20 "m"s, while
Arial Narrow takes about 55mm and Times New Roman about 67mm

Phil
"Penguin" <pe***********@aol.com> wrote in message
news:2a************************@posting.google.com ...
I am still using Access 97 which is very stubborn about using a whole
number for font size - even in code. Wondering if 2000 will let you
do otherwise?

Nov 13 '05 #4
A couple of options:

1) You could use the fTextWidthHeight function on my site to calculate
the exact width of the text in the current font and then reduce/enlarge
the font to achieve the best fit.

2) Use the Print method of the Report object to output the text one
character at a time. THis would achieve better results than #1 but
require more complex coding. Have a look at the JustiDirect solution on
my site that does exactly what you are trying to accomplish but for Memo
fields.
http://www.lebans.com/justidirect.htm

3) Use the Justification ActiveX control here:
http://www.lebans.com/xjustifytext.htm

4) Use a Rich Text ActiveX control.
http://www.lebans.com/richtext.htm

--

HTH
Stephen Lebans
http://www.lebans.com
Access Code, Tips and Tricks
Please respond only to the newsgroups so everyone can benefit.
"Penguin" <pe***********@aol.com> wrote in message
news:2a*************************@posting.google.co m...
Sounds like it would be useful to create a table of fonts names &
widths. How might I calculate them?

My issue is actually not space but aesthetics. My application is a
database used by schools. Each school can enter preferences for their
stationery (logo centered, to side, text on letterhead centered or to
side, line at bottom etc.)

My own school, for whom I originally developed it, has it's letterhead
as follows:

L O SCHOOL NAME
G O Address
H E City State
R E Phone etc.

In a real graphics program, or even in Word, you can play with font
sizes and use condensed/expanded text to get the address, city & phone
to all end up the same widht. (You can also adjust leading whereas I
use Schoolname.top + schoolname.height - SomeNumber and use trial and
error to get them as close as I want).

Ideally, if I could calculate the width of average text for a font,
and use that number / len(address) to assign a font size, I could get
the address in, say, 10 or 12 point, to match the school name in 18
point. I did try playing with fontweight as well. (I found a reference
to me.textwidth(controlname) but it didn't seem to get me anywhere)

For the first two clients (we're just starting out) we coded a few
types of letterheads (small to fit the addressee into window envelope,
receipt which is even smaller, fax which uses larger fonts for better
legibility etc.). When the client's preference is to have the text
all centered, I don't care so much about the sizes, but my own
school's letterhead, as originally designed by a graphic artist, does
seem to look much nicer when all the text has the same approximate
width. Thus my frustration with font sizes being forced to whole
numbers.

I did actually find a nice narrow font in some Corel Resources,
Windsor LtCn BT, which gave me more flexibility. (It also has a very
decorative ampersand which considerably enhances my "Phone & Fax:"
type of labels....

Anyhow, thanks to all (two) who responded. Any more ideas?
"Phil Stanton" <di********@stantonfamily.co.uk> wrote in message

news:<41***********************@mercury.nildram.ne t>...
If you are that pushed for space, try some different fonts like Arial Narrow. Different fonts physically take more or less space for a given letter at a given size.
For example Tahoma and Arial both take about 72mm to type 20 "m"s, while Arial Narrow takes about 55mm and Times New Roman about 67mm

Phil
"Penguin" <pe***********@aol.com> wrote in message
news:2a************************@posting.google.com ...
I am still using Access 97 which is very stubborn about using a whole number for font size - even in code. Wondering if 2000 will let you do otherwise?


Nov 13 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

115
by: J | last post by:
I've run CSSCheck on my style sheets and I always get a warning similar to this: "font: bold 9pt/100% sans-serif Warning: Absolute length units should not generally be used on the Web ..." ...
9
by: Dr John Stockton | last post by:
Assuming default set-ups and considering all reasonable browsers, whatever that may mean, what should an author expect that his readers in general will see (with visual browsers) for a page with...
4
by: tshad | last post by:
I am having trouble with links in my DataGrid. I have Links all over my page set to smaller and they are consistant all over the page in both Mozilla and IE, except for the DataGrid. Here is a...
7
by: Sakharam Phapale | last post by:
Hi All, How to preserve the old font properties while changing new one? I posted same question 2 months back, but I had very small time then. eg. "Shopping for" is a text in RichTextBox and...
7
by: Daniel Kaplan | last post by:
I have the item below at the top of my style sheet. And it seems that the font-szie is ignored. I know that my linked style sheet is being read, and used because if I remove the font-family line,...
16
by: maya | last post by:
I have heard so much preaching here about how font sizes should be set as percentages so users can change font-sizes on their browsers... ok, so now at work am working on a site where we need to do...
2
by: djzbor | last post by:
Any who can help!! let i have a number 16.0230045 i want to count the fractional part of this number means i want to get the number of digits of the fractional part of this number and store each...
18
by: Diogenes | last post by:
Hi All; I, like others, have been frustrated with designing forms that look and flow the same in both IE and Firefox. They simply did not scale the same. I have discovered, to my chagrin,...
2
by: kheitmann | last post by:
OK, so I have a blog. I downloaded the "theme" from somewhere and have edited a few areas to suit my needs. There are different font themes within the page theme. Long story short, my "Text Posts"...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.