4 Replies Latest reply on Mar 19, 2016 1:13 AM by samhawkens

    GetAsCSS export - "Arial Bold" instead of "Arial"

    samhawkens

      With FM Pro 14 GetAsCSS exported code for text that is formatted as "Arial" and "bold" looks like that:

      </SPAN><SPAN STYLE=\"font-family: \&#39;Arial Bold\&#39;\;font-weight: bold\;\" ><BR></SPAN>

       

      ... instead of that (as it worked with FM 13):

      </SPAN><SPAN STYLE=\"font-family: \&#39;Arial\&#39;\;font-weight: bold\;\" ><BR></SPAN>

       

      Because web browsers usually don't recognize a font named "Arial Bold" this text is displayed with a replacement font - e. g. Times New Roman bold - in the browser.

       

      Can anyone reproduce this behaviour?

      Is this a bug in FM Pro 14?

      Will this be fixed?

       

      Thanks for any ideas

      Chris

        • 1. Re: GetAsCSS export - "Arial Bold" instead of "Arial"
          CamelCase_data

          I can't reproduce this, neither on Mac (OS X, 10.10.5; FMPA 14.0.5) or on Windows (Windows 8.1; FMPA 14.0.4).

           

          How was the text entered into the field?

          • 2. Re: GetAsCSS export - "Arial Bold" instead of "Arial"
            samhawkens

            Many thanks for answering so quickly!

             

            <<<How was the text entered into the field?>>>

            Just by typing the text into the field and formatting the text "bold" as "bold" (right-click -> style -> bold) - without choosing any font before:

            ------------

            normal

            bold

            normal

            ------------

             

            This produces this exported code in FM Pro 14:

            ---------------------------------------------------------------

            <span style=\"\" >normal<br/></span><span style=\"font-family: \&#39;Arial Bold\&#39;\;font-weight: bold\;\" >bold<br/></span><span style=\"\" >normal</span>

            ---------------------------------------------------------------

             

            By first selecting all the text, assigning "Arial/normal" for all and then marking the text "bold" and assigning style "bold" I get from FMP 14:

            ---------------------------------------------------------------

            <span style=\"font-family: \&#39;Arial\&#39;\;\" >normal<br/></span><span style=\"font-family: \&#39;Arial Bold\&#39;\;font-weight: bold\;\" >bold<br/></span><span style=\"font-family: \&#39;Arial\&#39;\;\" >normal</span>

            ---------------------------------------------------------------

             

            FM 13 (Runtime) produces this code when starting from scratch (only assigning "bold" to text "bold")

            ---------------------------------------------------------------------------------------

            <SPAN STYLE=\"\" >normal<BR></SPAN><SPAN STYLE=\"font-weight: bold\;\" >bold<BR></SPAN><SPAN STYLE=\"\" >normal</SPAN>

            ---------------------------------------------------------------------------------------

             

            and FM 13 (Runtime) produces this code if first assigning "Arial" to the all the text an the "bold" to text "bold"

            ---------------------------------------------------------------------------------------

            <SPAN STYLE=\"font-family: \&#39;Arial\&#39;\;\" >normal<BR></SPAN><SPAN STYLE=\"font-family: \&#39;Arial\&#39;\;font-weight: bold\;\" >bold<BR></SPAN><SPAN STYLE=\"font-family: \&#39;Arial\&#39;\;\" >normal</SPAN>

            ---------------------------------------------------------------------------------------

             

            One more note:

            If I view the field with the text I created in FMP14 in FM 13 Runtime the bold text is a kind of "double"-bold in FM 13. If I then remove the style "bold" in FM13 it's still looking "single"-bold. If I then choose "Arial" it looks "normal".

             

            This all must have something to do with the way FM font selection has changed in FM14 ...

            • 3. Re: GetAsCSS export - "Arial Bold" instead of "Arial"
              TSGal

              samhawkens:

               

              Thank you for your posts.

               

              I am also unable to replicate the issue.  This is what I have done:

               

              1. I created a Text field named "TEXT".

              2. In the first record, I entered "TSGal" as plain text.

              3. In the second record, I entered "TSGal" as bold text.

              4. I created a button that executes the script step "Show Custom Dialog" with the calculation:

              GetAsCSS ( TEXT )

              5. In the first record, I clicked the button and the dialog shows:  <span style="" >TSGal</span>

              6. Clicking the button in the second record displays:

                <span style="font-family: 'Arial';font-weight: bold;" >TSGal</span>

               

              Let me know what I'm doing differently than you.

               

              Since it appears to be double-bolded in 13, check to see if you selected an "Arial Bold" font, and then applied Bold style.

               

              TSGal

              FileMaker, Inc.

              • 4. Re: GetAsCSS export - "Arial Bold" instead of "Arial"
                samhawkens

                TSGal:

                 

                Thanks for the simple example. I copied that and I get the same results as you (everything OK). So my conclusion is that the unwanted behaviour cannot be caused by the GetAsCSS function.

                 

                At this point I have to tell you that the FM solution I have the problem with is a self-contained ERP system that has not been programmed by me (I am not a developer) and therefore I don't have access to the FM code.

                 

                When I told the developer about the problem he said that it may be caused by a different behaviour of the GetAsCSS function in FM14. But the issue isn't important enough for him and because nobody else using his solution reported this problem, he will not investigate this issue any further. I cannot say if anyone else using this solution definitely has the problem, but I suppose that.

                 

                I must say that I have great respect for him because I like his solution very much, but it's a pity that he is not willing to find the reason for this misbehaviour in FM14. What remains is, that something must be different in the font handling of FM14, because up to FM13 it has never been a problem.

                 

                For now I will create a workaround by converting the exported code (replacing "Arial Bold" by "Arial") with an external script before uploading it to the web server.

                 

                I thank you all very much for your help!

                Chris