Jump to content

Consistent Fonts


This topic is 8626 days old. Please don't post here. Open a new topic instead.

Recommended Posts

quote:

Originally posted by Tal:

I have a database with text entries with different fonts and sizes, etc.. Is there an easy way within FMPro to keep all fields consistent in font appearance without going through each field and changing the format.

While there isn't a global preference for field fonts, you can change all of them in a single layout at one time, which might be sufficient.

Click on one field in a layout. Hold down Cmd-Opt-A. All of the fields on the layout will be selected. Now you can use the Format menu to change the font characteristics.

Chuck

Link to comment
Share on other sites

quote:

Originally posted by Chuck:

While there isn't a global preference for field fonts, you can change all of them in a single layout at one time, which might be sufficient.

Click on one field in a layout. Hold down Cmd-Opt-A. All of the fields on the layout will be selected. Now you can use the Format menu to change the font characteristics.

Chuck

While we're on the subject, you can also use cmd-opt-a to select all text blocks in the layout the same way (click on one text block...).

And a question: What do Windows users press to get the same result.

Link to comment
Share on other sites

quote:

Originally posted by Chuck:

Click on one field in a layout. Hold down Cmd-Opt-A. All of the fields on the layout will be selected. Now you can use the Format menu to change the font characteristics.

Chuck

Link to comment
Share on other sites

quote:

Originally posted by Tal:

How would this apply to data which has already been entered. This key combinatiuon does not seem to work in browse mode.


For that you would have to script the reformatting. I've not done it myself, but I think the way it would work would be to find all of the records and then perform a replace on the field, using as the calculated replacement the field itself.

But you might have to loop through the found set, copying and pasting from and to the field that has the custom formatted data.

I think you have to make sure that when you use the Paste script step, that "Include formatting" or something similar, is off.

Chuck

Link to comment
Share on other sites

quote:

find all of the records and then perform a replace on the field, using as the calculated replacement the field itself.

But you might have to loop through the found set, copying and pasting from and to the field that has the custom formatted data.

I think you have to make sure that when you use the Paste script step, that "Include formatting" or something similar, is off.

Chuck

Hmm.. I tried this, and may not fully understand because I'm a liitle confused about the process. Is there not an easy way to just have all the text in a database have consistent fonts

, why should data maintain font information ?

Link to comment
Share on other sites

quote:

Originally posted by Tal:

Hmm.. I tried this, and may not fully understand because I'm a liitle confused about the process. Is there not an easy way to just have all the text in a database have consistent fonts

, why should data maintain font information ?

Sorry for the misinformation. I hadn't tried it myself. I remember seeing how to do this, but I guess it's more complex than I assumed. Someone else here has asked a similar question and I'm trying to find the place I saw the solution to this puzzle.

If I do, I'll be sure to post the information here.

Chuck

Link to comment
Share on other sites

quote:

Originally posted by Chuck:

Instead of looping through the records, a replace will reformat the field to it's original format.

Chuck

Can you be more specific about the exact process of creating this script or "post the example"?

Link to comment
Share on other sites

quote:

Originally posted by Tal:

Can you be more specific about the exact process of creating this script or "post the example"?


Let's say that you have a field called "Title" on a layout called "Entry" that you want to be formatted in red bold. But some of the users of your system have custom formatted the text as green italics. You want to reformat the text to your default. Do I understand the problem (in general) correctly?

OK, here's the script:

Go to Layout [ Entry ]

Show All Records

Replace [ No dialog, "Title", "Title" ]

In other words, replace the data in the "Title" field with the data in the "Title" field. The data doesn't change, but the Replace script step strips any custom formatting from the calculation.

In the script you are using to do this, find the Replace step, and place it in your script. Click on the check box for "Perform without dialog". Click "Specify Field" and select your field to clean up. Click "Specify" and you'll get the Replace dialog. Click the radio button for "Replace with calculated result:" and click the "Specify" button to its right. Find your field (the same field you used in the "Specify Field" parameter) and double-click it so that it is the entire calculation. Click OK to dismiss the calculation dialog and then click OK to dismiss the Replace dialog.

Now run the script. Your data in that field should be back to it's default formatting.

If you follow the instructions here, so that you are replacing data in a field with the data already in that field, you should have no problems, but the Replace script step is dangerous. Just in case there's a mistake, and you lose the data in your field, perform it on a backup to make sure it works. Or perform the script on a found set of one dummy record (taking out the Show All Records step) and see if it works.

Chuck

Link to comment
Share on other sites

quote:

Originally posted by Chuck:

Sorry for the misinformation. I hadn't tried it myself. I remember seeing how to do this, but I guess it's more complex than I assumed. Someone else here has asked a similar question and I'm trying to find the place I saw the solution to this puzzle.

If I do, I'll be sure to post the information here.

Chuck

Instead of looping through the records, a replace will reformat the field to it's original format. I just tested it on my Mac with FMP 5 and it worked. Just replace the field with its own contents.

Chuck

Link to comment
Share on other sites

This topic is 8626 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

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