By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
440,454 Members | 1,804 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 440,454 IT Pros & Developers. It's quick & easy.

Fractional Font Size? e.g. 8.5

P: n/a
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
Share this Question
Share on Google+
4 Replies


P: n/a
'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

P: n/a
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

P: n/a
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

P: n/a
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 discussion thread is closed

Replies have been disabled for this discussion.