6 Replies Latest reply on Nov 3, 2008 6:26 AM by Manno Bult-to3djt

    small u-tilde not showing in textField

    Level 7

      Hi all,

      I have a problem with the u-tilde not showing in a textfield.

      I need to display all sorts of chars with different accents, and they
      all show, except for u-tilde.

      I suppose it is not a widely used char since it isn't even listed in
      HTML latin 1 entity lists (like:
      http://w3schools.com/tags/ref_entities.asp) but, well, some people need
      it...

      Test below show it's really an oddball since all other chars with a
      tilde show.
      Weird thing is: removing the TextFormat (or just the line with
      embedfonts) all together shows all three instances of the u-tilde.

      Anyone have a clue as to how to get it to show?

      (actual used code is with loading an UTF-8 encoded XML file. No show
      either.)

      thanks in advance,
      Manno

      /*
      AS2 code as example
      fontsymbol with linkageID "my_palentino" is in library
      */
      var tf:TextFormat = new TextFormat();
      tf.font = "my_palentino";
      tf.size = 28;

      var t:TextField = this.createTextField( "test_txt", 1, 0, 0, 500, 100 );
      t.embedFonts = true;
      t.html = true;
      t.htmlText = "<p>abc - &#361;Å© - &#227;&#241; - \u0169</p>";
      t.setTextFormat( tf );


      --
      ----------
      Manno Bult
      http://www.aloft.nl
        • 1. Re: small u-tilde not showing in textField
          Manno Bult-to3djt Level 2
          On reading my message in the webforums 'sted of thunderbird I see the actual u-tilde in the samplecode became a capital A and a copyright sign...
          • 2. Re: small u-tilde not showing in textField
            Level 7
            Hi all,

            Not to bumb the thread (well maybe...) but could anybody say something
            conclusive about the following:
            * Is it true that fontsymbols do only include basic latin as stated
            here: http://tekkie.flashbit.net/flash/embedding-fonts-in-flash-cs3
            * Is it true the u-tilde char is not a part of basic latin? (i think I
            can guess this...)


            It seems a solution to my problem is:
            - creating a textfield for each style (bold, italic etc.) to use
            - embed fonts through the properties panel for each field
            - use css to do text formatting

            It requires 'some' changes to the file though :(

            thanks in advance,
            Manno

            Manno Bult wrote:
            >
            > Hi all,
            >
            > I have a problem with the u-tilde not showing in a textfield.
            >
            > I need to display all sorts of chars with different accents, and they
            > all show, except for u-tilde.
            >
            > I suppose it is not a widely used char since it isn't even listed in
            > HTML latin 1 entity lists (like:
            > http://w3schools.com/tags/ref_entities.asp) but, well, some people need
            > it...
            >
            > Test below show it's really an oddball since all other chars with a
            > tilde show.
            > Weird thing is: removing the TextFormat (or just the line with
            > embedfonts) all together shows all three instances of the u-tilde.
            >
            > Anyone have a clue as to how to get it to show?
            >
            > (actual used code is with loading an UTF-8 encoded XML file. No show
            > either.)
            >
            > thanks in advance,
            > Manno
            >
            > /*
            > AS2 code as example
            > fontsymbol with linkageID "my_palentino" is in library
            > */
            > var tf:TextFormat = new TextFormat();
            > tf.font = "my_palentino";
            > tf.size = 28;
            >
            > var t:TextField = this.createTextField( "test_txt", 1, 0, 0, 500, 100 );
            > t.embedFonts = true;
            > t.html = true;
            > t.htmlText = "<p>abc - &#361;Å© - &#227;&#241; - \u0169</p>";
            > t.setTextFormat( tf );
            >
            >


            --
            ----------
            Manno Bult
            http://www.aloft.nl
            • 3. Re: small u-tilde not showing in textField
              Rothrock Level 5
              My guess is that even if you change to your new technique you won't be able to get that character. Sorry to be a downer.

              First you will have to find a font that actually has that character. And for such an odd character. But then I think Flash will only show the character if the user has the font installed and you don't embed. This has been my experience with strange way out there unicode characters.
              • 4. Re: small u-tilde not showing in textField
                Manno Bult-to3djt Level 2

                Hi,

                (a small followup)
                thanks for the effort Rothrock. I think though I got it to work. Never got to implement it though, just research. I've posted a test at:
                http://www.aloft.nl/tests/font_test.rar

                In short:
                Font-symbols don't include complete available charset (just Latin-I if I'm correct). At least less then available with the embed fonts option used with dynamic TextFields where you can pick out of a pretty extensive list as you may well know.

                Come to think of it, file is with dutch comments, but it's fairly self-explanatory...

                Manno
                • 5. Re: small u-tilde not showing in textField
                  Rothrock Level 5
                  So what did you do?
                  • 6. Re: small u-tilde not showing in textField
                    Manno Bult-to3djt Level 2
                    I created textFields for each fontstyle of the font to use, those fields are set to embed needed character sets.

                    The dynamically filled fields are formatted through css including setting the fontFamily applied to the textFields with embedded character sets.

                    At the moment the example I posted uses Palatino and I've only tested on one pc missing that font. For now that'll do. I would suggest better testing before real world implementation... I still plan to, but just not at the moment :)