[prev in list] [next in list] [prev in thread] [next in thread] 

List:       osflash-swfmill
Subject:    [swfmill] Ticket#11 "letter spacing with static text fields"
From:       matsuhashi () quick ! co ! jp (matsuhashi () quick ! co ! jp)
Date:       2007-03-16 3:17:06
Message-ID: OFAC4574B0.51F798A2-ON492572A0.00112282-492572A0.00128001 () sup ! quick ! co ! jp
[Download RAW message or body]



Hello,

I have got better understanding of my prolem.

>However, I suppose, the swfmill-0.2.12 does not take the change Macromedia
made at the SWF format version.7 into account.

No, this was not the point, sorry. Though I do not know YES/NO answer to my
guess.

I found another swfmill problem (defect) which is more obvious, possibly
related to my "static text does not show glyphs" problem. I will study this
issue more and come back later to report the detail.


      MATSUHASHI,kazuaki










                                                                           
             ????                                                      
             ???????/?                                             
             ?/?????                                            ?? 
             (????????          swfmill at osflash.org                
             ??????)                                              cc 
                                                                           
             2007/03/15 22:43                                         ?? 
                                        Ticket#11 "letter spacing with     
                                        static text fields"(Document link: 
                                        QCQ0264 Matsuhashi_Kazuaki)        
                                                                           
                                                                           
                                                                           
                                                                           
                                                                           
                                                                           



Hello, list.

I recently experienced a case just similar to the swfmill ticket #11
http://www.swfmill.org/trac/ticket/11.
This problem annoys me a lot so that I started looking at it with hope to
provide a patch.

My problematic swf generated by swfmill 0.2.12 contains a <DefineText> tag
as follows:

-----------------------------<CODE
START>---------------------------------------------
      <DefineText objectID="3">
        <bounds>
          <Rectangle left="23" right="5025" top="82"
bottom="902"></Rectangle>
        </bounds>
        <transform>
          <Transform transX="0" transY="0"></Transform>
        </transform>
        <records>
          <TextRecord>
            <records>
              <TextRecord6 objectID="2" x="860" fontHeight="1000">
                <color>
                  <Color red="255" green="255" blue="255"></Color>
                </color>
              </TextRecord6>
              <TextRecord6>
                <glyphs>
                  <TextEntry glyph="4" advance="712"></TextEntry>
                </glyphs>
              </TextRecord6>
              <TextRecord6>
                <glyphs></glyphs>
              </TextRecord6>
              <TextRecord6>
                <glyphs>
                  <TextEntry glyph="0" advance="333"></TextEntry>
                </glyphs>
              </TextRecord6>
              <TextRecord6>
                <glyphs></glyphs>
              </TextRecord6>
              <TextRecord6>
                <glyphs>
                  <TextEntry glyph="2" advance="860"></TextEntry>
                </glyphs>
              </TextRecord6>
              <TextRecord6>
                <glyphs></glyphs>
              </TextRecord6>
              <TextRecord6>
                <glyphs>
                  <TextEntry glyph="0" advance="333"></TextEntry>
                </glyphs>
              </TextRecord6>
              <TextRecord6>
                <glyphs></glyphs>
              </TextRecord6>
              <TextRecord6>
                <glyphs>
                  <TextEntry glyph="3" advance="700"></TextEntry>
                </glyphs>
              </TextRecord6>
              <TextRecord6>
                <glyphs></glyphs>
              </TextRecord6>
              <TextRecord6>
                <glyphs>
                  <TextEntry glyph="0" advance="333"></TextEntry>
                </glyphs>
              </TextRecord6>
              <TextRecord6>
                <glyphs></glyphs>
              </TextRecord6>
              <TextRecord6>
                <glyphs>
                  <TextEntry glyph="1" advance="278"></TextEntry>
                </glyphs>
              </TextRecord6>
              <TextRecord6>
                <glyphs></glyphs>
              </TextRecord6>
              <TextRecord6>
                <glyphs>
                  <TextEntry glyph="0" advance="333"></TextEntry>
                </glyphs>
              </TextRecord6>
              <TextRecord6>
                <glyphs></glyphs>
              </TextRecord6>
              <TextRecord6>
                <glyphs>
                  <TextEntry glyph="5" advance="771"></TextEntry>
                </glyphs>
              </TextRecord6>
              <TextRecord6>
                <glyphs></glyphs>
              </TextRecord6>
            </records>
          </TextRecord>
        </records>
      </DefineText>
----------------------------<CODE END>-------------------------------------

This <DefineText> shows only one glyph "T" when played. But you can easily
see that there contained 4 more glyphs ("O","P","I","X"). Only the 1st
glyph "T" is displayed and the rest are not showed. Why?

I noticed that strange empty element
"<TextRecord6><glyphs></glyphs></TextRecord6>" tags are inserted in between
glyphs. What is this? --- I wondered. It seems to me that this strange
empty element confuses the Flash Player and let it miss 2nd and following
glyphs.

I read the Alexis' SWF Reference document,  "swf_text_record"section (
http://sswf.sourceforge.net/SWFalexref.html#swf_text_record ). It gave me
an inspiration. It says:

-----------------------------<QUOTE START>--------------------------------
WARNING: it seems that Macromedia didn't think about a file having two
records of type glyph one after another (it makes their plugins crash); you
will have to insert a setup record between each glyph record (the setup can
be empty: i.e. add one byte equal to 0x80). The very first setup has to at
least define the font.

NOTE: this has been corrected by Macromedia it now shows as one structure
including the style and an array of glyphs. This fixes the problem at once.
It however makes the structure look a bit more complicated.

....
      union swf_text_record {
            unsigned          f_flags : 8;
            swf_text_record_end     f_end;
            if(version >= 7) {
                  swf_text_record_string  f_string;
            }
            else {
                  swf_text_record_setup   f_setup;
                  swf_text_record_glyphs  f_glyphs;
            }
      };
------------------------------<QUOTE END>----------------------------------


Now I tell you my thinking.

The strange empty "<TextRecord6><glyphs></glyphs></TextRecord6>" is exactly
what Alexis says "setup record between each glyph". The swfmill-0.2.12
generates those setup records. However, I suppose, the swfmill-0.2.12 does
not take the change Macromedia made at the SWF format version.7 into
account. The swfmill should not insert setup records WHEN the swf format
version>=7. A fix might be found around this aspect.


How do you think, dan?



      ====================
      MATSUHASHI,kazuaki
      QUICK Corp.
      Japan






[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic