Skip to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Size of Printed Text Field

Featured Replies

I think I know the answer to this but ....

Does anyone know of a way to determine how long a printed text field would be when using a variable pitch font?

I have a situation where we are printing a company name on a pre-printed certificate, along with a bit of other slightly variable text.

The problem is that the names vary enormously in length. Most fit quite well but some would run to two lines and there just isn't room. What I'd like to do is reduce the font size if, and only if, the name is too big.

(Using a smaller font size in a shrinking field is not an option because it looks weird for the majority of companies who have small names. Nor is the option adopted by one user - just let the name get truncated!)

Do a pattern count an all the characters? (I'm just kidding, you know the answer.)

You might employ a CF like this one to determine how much space the text takes up, and adjust the size if necessary:

http://www.clevelandconsulting.com/support/viewtopic.php?t=510

OMG, someone took this seriously...

Well, at least let's be efficient about it. How about:

2 * Length ( Filter ( text ; "i" ) ) +

3 * Length ( Filter ( text ; "I./:;" ) ) +

4 * Length ( Filter ( text ; "0123456789jt" ) ) +

etc....

One way I did this years ago was to create a layout with huge headers and footers so that one line of text in the body part was one page.

Preview the layout, count the number of pages, use this to work out how many lines of test there are, then use this info to change to the appropriate layout.

  • Author

Vaughan, that is really kludgey. I like it! Thanks. :party:

Sorry, Ender but thanks anyway. Where do you find the sizes of the various letters?

Edited by Guest

  • 4 weeks later...
  • Author

Thought I'd throw in my eventual solution. Your idea was a bit far out, Vaughan.

I ended up with names like 'Murrurundi Heights North R.S.L.' having just "L." on the second line - not quite the look we wanted.

What I've done is, on the screen that shows customer details where you go to enter new or look and/or edit, set up replicas of the two fields where size matters and use V8's TextSize() to provide the user with Up and Down arrows to increase or decrease the pitch. Customer's happy so so am I.

Create an account or sign in to comment

Important Information

By using this site, you agree to our Terms of Use.

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.