Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Report Design
Message Icon Topic: Max Font Size Post Reply Post New Topic
Author Message
Lord Yorkshire
Newbie
Newbie
Avatar

Joined: 04 Jul 2010
Online Status: Offline
Posts: 28
Quote Lord Yorkshire Replybullet Topic: Max Font Size
     Posted: 01 May 2013 at 5:38am
I have to design a pallet label to cover product form many customer with many different products.
 
I only have so much space available on the pallet label but want to make each product description as big as possible.
For for example a description of "ABC" I could go to a font size of 100, but a description of "123456 Achme Window Cleaner" i could only go to a font of 25.
 
I could do if Len = 32 then font = 25 and do that for every possible length but i was thinking maybe there is a more elgant solution that someone has already discovered.
 
Any advise would be appreciated.
IP IP Logged
hilfy
Admin Group
Admin Group
Avatar

Joined: 20 Nov 2006
Online Status: Offline
Posts: 3702
Quote hilfy Replybullet Posted: 01 May 2013 at 6:01am
Rather than using every possible size individually, I would do it with size ranges - something like this:
 
if len(field) >= 24 and len(field) < 27 then 25...etc.
 
Also, you'll want to use a non-proportional font, like Courier New - that way every letter will be the same width.  With proportional fonts, each letter has its own width - for example, "i" is much narrower than "O".
 
-Dell
IP IP Logged
Lord Yorkshire
Newbie
Newbie
Avatar

Joined: 04 Jul 2010
Online Status: Offline
Posts: 28
Quote Lord Yorkshire Replybullet Posted: 01 May 2013 at 9:51pm
Originally posted by hilfy

Rather than using every possible size individually, I would do it with size ranges - something like this:
 
if len(field) >= 24 and len(field) < 27 then 25...etc.
 
Also, you'll want to use a non-proportional font, like Courier New - that way every letter will be the same width.  With proportional fonts, each letter has its own width - for example, "i" is much narrower than "O".
 
-Dell
 
That makes sense. I have experianced a little difficulty where a certain string length will fix perfectly, then the same string length will be too big. This is obviosuly down to the structure of the characters, so IIIIII would fit but OOOOOO would be too big.
 
IP IP Logged
Lord Yorkshire
Newbie
Newbie
Avatar

Joined: 04 Jul 2010
Online Status: Offline
Posts: 28
Quote Lord Yorkshire Replybullet Posted: 02 May 2013 at 3:11am

I have encountered a further problem. The length of the words makes a difference. So "Yorkshire Lamb 9" might fit perfectly but "10 Lamb Yorkshire" would require Yorkshire to go on a second line. So even though it is only 1 character extra, it affects 9 characters of the word.

 
Any suggestions for an elegant solution.
IP IP Logged
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum