1 2 Previous Next 21 Replies Latest reply on Aug 6, 2014 7:27 PM by philmodjunk

    Text into a repeating field to simulate kerning

    RobMacy

      Title

      Text into a repeating field to simulate kerning

      Post

           So I'm printing onto a government document and some of the fields(like name) have to have each letter positioned in a box.

           I've heard a rumor that you can somehow take the letters from a field and put them into a repeating field in order and then you can position the fields exactly.  

           Is this nonsense?  If not then how would one(this one) do such a thing??

        • 1. Re: Text into a repeating field to simulate kerning
          philmodjunk

               As I understand the term "Kerning", it's the ability to fine tune the spacing between individual letters. Is that what you want to do?

               I don't see why/how you would use a repeating field for that.

               With the letters in individual fields or as layout text where each letter is in its own text object, you could manually, while in layout mode, adjust the spacing between each field and layout object.

               But that's a static, layout change--not something that can automatically adjust for different settings for different text.

               

                    So I'm printing onto a government document and some of the fields(like name) have to have each letter positioned in a box.

               But if this is a case of printing on preprinted forms where the text must fit within the boundaries of the box, I'd change the text size specified for the text to better fit it to the box. There are several ways to do this  that I can think of and none use a repeating field.

          • 2. Re: Text into a repeating field to simulate kerning
            RobMacy

                 Hey PhilmodJunk, thanks for your response!!!  I may not have done a good job explaining the problem.  Most often just regular spacing will do.  If you look at the pic, there are some times when specific and wide spacing is needed(such as "last Name" in the pic) and I cant find a way to do it.

                 What are your thoughts

            • 3. Re: Text into a repeating field to simulate kerning
              philmodjunk

                   Ok, that makes sense.

                   Yes I can see the value of using a repeating field as you can resize the repeating field to fit the space requirements of your letter for letter boxes on the form.

                   Do you need to know how to take text in a field and fill a repeating field's repetitions with individual letters?

                   Do you have FileMaker Advanced? (this is not necessary, but offers a very nice option to do this with a custom function.)

              • 4. Re: Text into a repeating field to simulate kerning
                RobMacy

                     I've got filemaker pro advanced 12.01 and I do need to know how  to take text in a field and fill a repeating field's repetitions with individual letters :)

                • 5. Re: Text into a repeating field to simulate kerning
                  philmodjunk

                       Hmmm, I was all set to do this as a custom function and just realized that what I had in mind would require executing a script step inside a custom function and that doesn't work...

                       After further thought, let's go with a looping script but generalized so that you can pass it both the field name reference and the text to be parsed into repetitions of the specified field:

                       Set Variable [$FieldRef ; value: GetValue ( Get ( ScriptParameter ) ; 1 ) ]
                       Set Variable [$Text ; value ; GetValue ( Get ( ScriptParameter ) ; 2 ) ]
                       Loop
                          Set Variable [$K ; value: $K + 1 ]
                         Exit Loop If [ $K > Length ( $Text ) ]
                         Set Field By Name [ $FieldRef & "[" & $K & "]" ; Middle ( $Text ; $K ; 1 ) ]
                       End Loop

                       to use the script, use a button, script trigger or perform script script step with a script parameter.

                       To set the repetitions of a field named Form::LastNameRepeating to the letters from Form::LastName, your script parameter expression would look like:

                       List ( GetFieldName ( Form::LastNameRepeating ) ; Form::LastName )

                  • 6. Re: Text into a repeating field to simulate kerning
                    raybaudi

                     I do need to know how  to take text in a field and fill a repeating field's repetitions with individual letters

                         No script is required, only a calculated repeating field with calc:

                         Middle ( Extend ( text ) ; Get ( CalculationRepetitionNumber ) ; 1 )

                    • 7. Re: Text into a repeating field to simulate kerning
                      philmodjunk

                           Great Solution!

                      • 8. Re: Text into a repeating field to simulate kerning
                        raybaudi

                             Old formula !

                        • 9. Re: Text into a repeating field to simulate kerning
                          RobMacy

                               @ raybaudi

                               Hi and thanks for your response.  I'm trying it and it works for the firts letter but the second field gives me the first and second letters rather than just the second.

                          • 10. Re: Text into a repeating field to simulate kerning
                            raybaudi

                                 Which is the name of your text field ?
                                 Have you created a calculation field with how many reps ?

                            it works for the firts letter but the second field gives me the first and second letters  

                                 That result may apply if you changed my calculation with this which is wrong:

                                 Middle ( Extend ( text ) ; 1 ; Get ( CalculationRepetitionNumber ) )

                            • 11. Re: Text into a repeating field to simulate kerning
                              RobMacy

                                   I dont understand what a repetition field is.  I had just created a text field ( ie firstName1 for the first letter of the first name and firstName2 etc)

                                   The calculation fort firstName2 is   Middle ( Extend ( Last Name) ; Get ( CalculationRepetitionNumber ) ; 2 )

                              • 12. Re: Text into a repeating field to simulate kerning
                                RobMacy

                                     I dont understand what a repetition field is.  I had just created a text field ( ie firstName1 for the first letter of the first name and firstName2 etc)

                                     The calculation fort firstName2 is   Middle ( Extend ( Last Name) ; Get ( CalculationRepetitionNumber ) ; 2 )

                                • 13. Re: Text into a repeating field to simulate kerning
                                  raybaudi

                                  "I dont understand what a repetition field is"

                                       So we go to create one... see the picture

                                        

                                  • 14. Re: Text into a repeating field to simulate kerning
                                    RobMacy

                                         OK Ive got the repition field set to text with 10 reps, Just in case ive missed something, that still leaves me with one field with the first lestter (C) i it.

                                    1 2 Previous Next