swf的详细介绍??
swf(shock wave flash)æ¯Macromediaï¼ç°å·²è¢«ADOBEå
¬å¸æ¶è´ï¼å
¬å¸çå¨ç»è®¾è®¡è½¯ä»¶Flashçä¸ç¨æ ¼å¼ï¼æ¯ä¸ç§æ¯æç¢éåç¹éµå¾å½¢çå¨ç»æä»¶æ ¼å¼ï¼è¢«å¹¿æ³åºç¨äºç½é¡µè®¾è®¡ï¼å¨ç»å¶ä½çé¢åï¼swfæ件é常ä¹è¢«ç§°ä¸ºFlashæ件ã ãã swfï¼Shock Wave Flashçç®ç§°ï¼è¯»ä½swif)ï¼æ¯Adobe Flashæ±åºåçæ¡£æ¡æ ¼å¼ãå®çæ®åç¨åº¦å¾é«ï¼ç°å¨è¶
è¿99%çç½ç»ä½¿ç¨è
é½å¯ä»¥è¯»åswfæ¡£æ¡ï¼å³ä½¿ä»»å¤©å Wiiï¼ä½¿ç¨Operaæµè§å¨çè¯ï¼ãSonyçPSPä¹å¯ä»¥è½çå°ã
ããè¿ä¸ªæ¡£æ¡æ ¼å¼ç±FutureWaveå建ï¼åæ¥ä¼´éçä¸ä¸ªä¸»è¦çç®æ åå°Macromediaçæ¯æ´ï¼åä½å°æ¡£æ¡ä»¥ææ¾å¨ç»ãè¿ä¸ªè®¡åçç念æ¯å¯ä»¥å¨ä»»ä½æä½ç³»ç»åæµè§å¨ä¸è¿è¡ï¼å¹¶ä¸è®©ç½ç»è¾æ ¢ç人ä¹è½é¡ºå©æµè§ã[1]
ããswf æ¯shock wave flashç缩åï¼æ£å¦rm = real media mp3 = MPEG Layer 3 wma = Windows Media Audio ä¸æ ·
ããå¯ä»¥ç¨ Adobe Flash Player 10.0.32.18软件æå¼
ããSWFæ件ç»æï¼
ããswfæ件çæ´ä½ç»ææ¯ header + bodyçç»æã
ããæ件çå¼å§æ¯ä¸ä¸ª[æ件头]
ããå®çç»æå¦ä¸ï¼
ããåè å称 说æ
ãã1 Signature
ããâFâ表示éå å¯æ ¼å¼ï¼âCâ表示å å¯æ ¼å¼
ãã1 Signature âWâæ ç¹æ®æä¹
ãã1 Signature âSâæ ç¹æ®æä¹
ãã1 Version çæ¬å·ï¼å®è¡¨ç¤ºå¯¹åºææ¾å¨çæ¬
ãã4 FileLength æ´ä¸ªæ件é¿åº¦ï¼ä½ä½å¨å
ããN FrameSize
ããRECTç»æä½ï¼è¡¨ç¤ºå±å¹å¤§å°ï¼å ·ä½ç»æåé¿åº¦æ ¹æ®æ°æ®ååï¼åææ¹æ³å¦å¤è®¨è®ºã
ãã2 FrameRate 帧é¢ï¼é»è®¤ä¸º12ï¼é«ä½å¨å
ãã2 FrameCount
ãã帧æ°ï¼è¡¨ææä»¶æ ¹ä¸ç帧æ°ï¼ä½ä½å¨å
ãã以ä¸æ¯swfä¸ï¼æç®åçä¸ä¸ªtagï¼ä¸ä¸ªå®æ´çswfæ件æ¯ç±å¾å¤ç¬ç«çtagç»æçãæ¯ä¸ä¸ªtagé½å æ¬ä¸ä¸ªå¤´åä¸ä¸ªæ°æ®ä½ï¼å¤´æ2ç§ç±»åï¼çtagååé¿tagåã
ããçtagåç±2byteææï¼å10个bit表示tagç±»åï¼å6个bit表示tagé¿åº¦ã
ããé¿tagåç±6byteææï¼å10个bit表示tagç±»åï¼å6个bitåºå®ä¸ºå ¨1ï¼å4个byte代表tagé¿åº¦ã
ããtagçé¿åº¦ä¸åäºæ件头çé¿åº¦FileLength,å®æ¯é¤å»tag头åçé¿åº¦ã
ããï¼å¦å¤ï¼åªæéå å¯çswfæ件å¯ä»¥ç´æ¥ç¨ä»¥ä¸çæ¹æ³è§£æï¼å å¯çæ件éè¦å¦å¤å¢å ä¸æ¥å¤çãå ·ä½æ¹æ³ç±äºçµæ¶å°çæé®é¢ï¼è¿éæä¸å 说æã
ããè¿ä»½èµæå¯è½å¯¹flash设计æä¹ä¸å¤§ï¼ä½å¦ææ人ç¨ççï¼æä¼ç»§ç»åæä¸ä¸ï¼å¦ææ人ä¹å¨åè¿æ¹é¢çè°æ¥ï¼æ¬¢è¿åæä¸èµ·è®¨è®ºã
ãã第2è
ããåè说æäºswfæ件æ¯ç±1个headå1个bodyææçã
ãã并ä¸è§£æäºheaderçç»æï¼åä¸ä¸ªtagçheaderé¨åçç®å说æã
ããä¸é¢ä½ä¸çå°±æ¯swfæ件çbodyäºã
ããæ´ä¸ªæ件bodyæ¯ç±å¤§éçtagç»æçï¼éè¿åætagçheadé¨åï¼å¯ä»¥ç«å»ç¥éè¿ä¸ªtagçç±»å代ç åé¿åº¦ã
ããå¦æä½ æ æ³è¯å«è¿ä¸ªtagçç±»åï¼ä¹å¯ä»¥å©ç¨tagçé¿åº¦ï¼ç´æ¥è·³è¿è¿ä¸ªtagã
ããè¿ç§æ¹å¼ä¿è¯äºçæ¬çå ¼å®¹æ§ï¼å³ä½¿åºç°äºæ°çtagï¼èçæ¬çææ¾å¨è¿æ¯è½å¤è§£æå®æ´ä¸ªswfæ件èä¸åºç°é误ï¼å¤§ä¸äºå°±æ¯ä¸è½æä¾æ°çåè½èå·²ã
ãã以ä¸å°±æ¯swfæ件ç»æçä¸ä¸ªå½¢è±¡æ¦å¿µã
ãã(æ件header)(æ件body)
ãã|
ãã(tag 1)(tag 2)(tag 3)(â¦â¦)
ãã|
ãã(tag header)(tag body)
ãã|
ãã(tag ç±»å代ç )(tag é¿åº¦)
ããè¿æ ·å¤§å®¶æ¯å¦å¯¹swfæ件çç»ææäºä¸ä¸ªåºæ¬ç认è¯ï¼
ããä¸ä¸èæä¼åæä¸ä¸å 个swfå¿ æçtagï¼å æ¬
ããbackgroundColor tag,showFrame tagåend tag
ãã第3è
ããsetBackgroundColor tag
ããè¿ä¸ªtagæ¯ç´æ¥è·å¨æ件headåé¢ç第ä¸ä¸ªtagï¼æ¯æ件ä¸å¿ ç¶åå¨çã
ããå®çç»æå¦ä¸ï¼
ããé¿åº¦ï¼bitï¼ å称 说æ
ãã16 header tag头ï¼çtagå
ããç±»åç 为9
ãã24 BackgroundColor
ããRGBç±»åï¼å³3个åèï¼åå«è¡¨ç¤ºçº¢ã绿ãè
ããshowFrame tag
ããè¿æ¯æ件æå第2个tagï¼å®æ¯å¿ ç¶åå¨çã
ããç»æå¦ä¸ï¼
ããé¿åº¦ï¼bitï¼ å称 说æ
ãã16 header tag头ï¼çtagå
ããç±»åç 为1
ããend tag
ããç»ætagï¼å®çä½ç¨ä¸ç¨æ说äºï¼å¿ ç¶æ¯æ件çæåä¸ä¸ªtagã
ããé¿åº¦ï¼bitï¼ å称 说æ
ãã16 header tag头ï¼çtagå
ããç±»åç 为0
ããä¸ä¸èæå°è®²çæ¯character ID
ããåDepthçæä¹åtextFieldçåºæ¬tagç»æã
ããï¼å¦å¤ï¼æè°¢AOLçè¡¥å å解éã
ãã第4è
ããä¸ä¸ªtextFieldå°±æ¯ä¸ä¸ªææ¬æ¡ï¼ææ¬æ¡æ3ç§ï¼éæçï¼å¨æçï¼åè¾å ¥åãä½ä¸ºtagçè¯ï¼å®åªæ2ç§ï¼éæçåå¨æçï¼è¾å ¥åä¸è¿æ¯å¨æçä¸ç§ç¹å«å½¢å¼ã
ããè¿é讨论å¨æææ¬æ¡çç»æã
ããå®ç±3个tagç»æï¼2个å®ä¹tagåä¸ä¸ªæ§å¶tag
ããåå«æ¯ï¼
ããå®ä¹tag DefineFont2 DefineEditText (é对player 7.0
ããå¦æä¸åæ åµè¯·æ£æ¥ææ¾å¨çæ¬)
ããæ§å¶tag PlaceObject2
ããDefineFont2 å®ä¹äºä¸ä¸ªåä½ä¿¡æ¯ï¼
ããDefineEditTextå¼ç¨äºå®ä¹çåä½ï¼å¹¶å®ä¹äºæ¾ç¤ºçæåä¿¡æ¯ï¼èPlaceObjectå¼ç¨äºå®ä¹çæåä¿¡æ¯ï¼å¹¶æ§å¶äºæåçæ¾ç¤ºã
ããä»ä»¬ä¹é´çå¼ç¨å°±æ¯ä¾é character IDè¿è¡çã
ããcharacter
ããIDå°±æ¯ä¸ä¸ªä»1å¼å§çæ°åæ 示ï¼å¦æä¸é´åºç°ç¼ºæ¼ï¼ä»ç¼ºæ¼å¼å§çææcharacter
ããIDé½è¢«å¿½ç¥ï¼èéå¤çè¯ï¼ååºç°çå°è¦çå åºç°çtagã
ããDefineFont2ç¨ä¸ä¸ªcharacter ID
ããæ¥æ 示èªå·±ï¼DefineEditTextåPlaceObject2ä¹åæ ·å¦æ¤ãä½å¹¶ä¸æ¯ææçtagé½æcharacter
ããIDã
ããå¦å¤ï¼PlaceObject2è½ç¶ä¹æcharacter
ããIDï¼ä½å®å¹¶ä¸æ¯ç¨æ¥æ 示èªå·±çï¼èæ¯ç¨æ¥è°ç¨çã
ããè深度Depthå¨3个tagä¸åªæPlaceObject2æ¥æã
ããè¿3个tagçå ³ç³»å°±æ¯è¿æ ·ãè¿3个tagçç»ææä¼å¨ä¸èä¸è¯´æãï¼æ±æï¼æ¯æ¬¡é½è¯´ä¸ç¹ç¹ï¼ï¼
ãã第5è
ããDefineFont2
ããè¿ä¸ªtagçä½ç¨æ¯å®ä¹ä¸ä¸ªåä½ï¼æè ä¸ç»éæè½®å»åï¼ç¨ä»¥ç»DefineEditText使ç¨ã
ããå ³äºæåçå ä¹ææä¿¡æ¯ï¼é½å¯ä»¥å¨è¿ä¸ªtagä¸è¿è¡è®¾ç½®ï¼å æ¤ï¼è¿ä¹æ¯ä¸ä¸ªç¸å½å¤æçtagã
ããå®çç»æå¦ä¸ï¼
ããé¿åº¦ï¼bitï¼ å称
ãã说æ
ããheaderLength header
ããtag头ï¼ç±»åç 为48
ãã16 FontID character
ããIDï¼å¯ä¸çæ 示
ãã1 FontFlagsHasLayout
ããæ ¹æ®åé¢è§£éï¼å¤ææ¯å¦æååçæ è®°
ãã1 FontFlagsShiftJIS
ããæ¯å¦ä½¿ç¨ShiftJISç¼ç
ãã1 FontFlagsSmallText
ããæ¯å¦ä½¿ç¨å°åä½æ¾ç¤º
ãã1 FontFlagsANSI æ¯å¦ä½¿ç¨ANSIç¼ç
ãã1 FontFlagsWideOffsets
ããæ¯å¦ä½¿ç¨32ä½å移é
ãã1 FontFlagsWideCodes
ããæ¯å¦ä½¿ç¨16ä½æåç¼ç
ãã1 FontFlagsItalic
ããæåæ¯å¦æ¯æä½
ãã1 FontFlagsBold
ããæåæ¯å¦æ¯ç²ä½
ãã8 LanguageCode
ããè¯è¨ç¼ç ï¼æç¸åºçç¼ç 表对åº
ãã8 FontNameLen æ件åé¿åº¦
ããFontNameLen*8 FontName
ããæ件å称ï¼ä½¿ç¨utf8ç¼ç ï¼
ãã16 NumGlyphs è½®å»å个æ°
ãã32/16 OffsetTable
ããæ ¹æ®FontFlagsWideOffsetsï¼ä¸º32ä½ï¼å¦å为16ä½
ãã32/16 CodeTableOffset åä¸
ããä¸å®*NumGlyphs GlyphShapeTable
ããè½®å»åä¿¡æ¯ï¼ä¸ºshapeç»æï¼åæ¯ä¸ä¸ªå¤æç»æï¼
ãã16/8 CodeTable
ããæ ¹æ®FontFlagsWideCodesï¼ä¸º16ä½ãç¼ç 表ï¼ä¸ºåºå®å¼UCS-2
ãã16/0 FontAscent
ããæ ¹æ®FontFlagsHasLayoutï¼ä¸º16ä½ï¼å¦å没æ该å段
ãã16/0 FontDescent
ããæ ¹æ®FontFlagsHasLayoutï¼ä¸º16ä½ï¼å¦å没æ该å段
ãã16/0 FontLeading
ããæ ¹æ®FontFlagsHasLayoutï¼ä¸º16ä½ï¼å¦å没æ该å段
ãã16/0*NumGlyphs FontAdvanceTable
ããæ ¹æ®FontFlagsHasLayoutï¼ä¸º16ä½ï¼å¦å没æ该å段
ããRECT*NumGlyphs FontBoundsTable
ããæ ¹æ®FontFlagsHasLayoutï¼ä¸º16ä½ï¼å¦å没æ该å段
ãã16/0 KerningCount
ããæ ¹æ®FontFlagsHasLayoutï¼ä¸º16ä½ï¼å¦å没æ该å段
ããKERNINGRECORD*KerningCount
ããFontKerningTable
ããæ ¹æ®FontFlagsHasLayoutï¼ä¸º16ä½ï¼å¦å没æ该å段
ããå¦æå纯åæå¨æææ¬çè¿ä¸ªtagçä¿¡æ¯ï¼åªéè¦åæå°ä¸é¢çfontNameé¨å就足å¤äºï¼å ¶ä»ä¿¡æ¯åªå¯¹è½®å»åï¼ä¹å°±æ¯éææåææã
ããè¿ä¸ªæ¡£æ¡æ ¼å¼ç±FutureWaveå建ï¼åæ¥ä¼´éçä¸ä¸ªä¸»è¦çç®æ åå°Macromediaçæ¯æ´ï¼åä½å°æ¡£æ¡ä»¥ææ¾å¨ç»ãè¿ä¸ªè®¡åçç念æ¯å¯ä»¥å¨ä»»ä½æä½ç³»ç»åæµè§å¨ä¸è¿è¡ï¼å¹¶ä¸è®©ç½ç»è¾æ ¢ç人ä¹è½é¡ºå©æµè§ã[1]
ããswf æ¯shock wave flashç缩åï¼æ£å¦rm = real media mp3 = MPEG Layer 3 wma = Windows Media Audio ä¸æ ·
ããå¯ä»¥ç¨ Adobe Flash Player 10.0.32.18软件æå¼
ããSWFæ件ç»æï¼
ããswfæ件çæ´ä½ç»ææ¯ header + bodyçç»æã
ããæ件çå¼å§æ¯ä¸ä¸ª[æ件头]
ããå®çç»æå¦ä¸ï¼
ããåè å称 说æ
ãã1 Signature
ããâFâ表示éå å¯æ ¼å¼ï¼âCâ表示å å¯æ ¼å¼
ãã1 Signature âWâæ ç¹æ®æä¹
ãã1 Signature âSâæ ç¹æ®æä¹
ãã1 Version çæ¬å·ï¼å®è¡¨ç¤ºå¯¹åºææ¾å¨çæ¬
ãã4 FileLength æ´ä¸ªæ件é¿åº¦ï¼ä½ä½å¨å
ããN FrameSize
ããRECTç»æä½ï¼è¡¨ç¤ºå±å¹å¤§å°ï¼å ·ä½ç»æåé¿åº¦æ ¹æ®æ°æ®ååï¼åææ¹æ³å¦å¤è®¨è®ºã
ãã2 FrameRate 帧é¢ï¼é»è®¤ä¸º12ï¼é«ä½å¨å
ãã2 FrameCount
ãã帧æ°ï¼è¡¨ææä»¶æ ¹ä¸ç帧æ°ï¼ä½ä½å¨å
ãã以ä¸æ¯swfä¸ï¼æç®åçä¸ä¸ªtagï¼ä¸ä¸ªå®æ´çswfæ件æ¯ç±å¾å¤ç¬ç«çtagç»æçãæ¯ä¸ä¸ªtagé½å æ¬ä¸ä¸ªå¤´åä¸ä¸ªæ°æ®ä½ï¼å¤´æ2ç§ç±»åï¼çtagååé¿tagåã
ããçtagåç±2byteææï¼å10个bit表示tagç±»åï¼å6个bit表示tagé¿åº¦ã
ããé¿tagåç±6byteææï¼å10个bit表示tagç±»åï¼å6个bitåºå®ä¸ºå ¨1ï¼å4个byte代表tagé¿åº¦ã
ããtagçé¿åº¦ä¸åäºæ件头çé¿åº¦FileLength,å®æ¯é¤å»tag头åçé¿åº¦ã
ããï¼å¦å¤ï¼åªæéå å¯çswfæ件å¯ä»¥ç´æ¥ç¨ä»¥ä¸çæ¹æ³è§£æï¼å å¯çæ件éè¦å¦å¤å¢å ä¸æ¥å¤çãå ·ä½æ¹æ³ç±äºçµæ¶å°çæé®é¢ï¼è¿éæä¸å 说æã
ããè¿ä»½èµæå¯è½å¯¹flash设计æä¹ä¸å¤§ï¼ä½å¦ææ人ç¨ççï¼æä¼ç»§ç»åæä¸ä¸ï¼å¦ææ人ä¹å¨åè¿æ¹é¢çè°æ¥ï¼æ¬¢è¿åæä¸èµ·è®¨è®ºã
ãã第2è
ããåè说æäºswfæ件æ¯ç±1个headå1个bodyææçã
ãã并ä¸è§£æäºheaderçç»æï¼åä¸ä¸ªtagçheaderé¨åçç®å说æã
ããä¸é¢ä½ä¸çå°±æ¯swfæ件çbodyäºã
ããæ´ä¸ªæ件bodyæ¯ç±å¤§éçtagç»æçï¼éè¿åætagçheadé¨åï¼å¯ä»¥ç«å»ç¥éè¿ä¸ªtagçç±»å代ç åé¿åº¦ã
ããå¦æä½ æ æ³è¯å«è¿ä¸ªtagçç±»åï¼ä¹å¯ä»¥å©ç¨tagçé¿åº¦ï¼ç´æ¥è·³è¿è¿ä¸ªtagã
ããè¿ç§æ¹å¼ä¿è¯äºçæ¬çå ¼å®¹æ§ï¼å³ä½¿åºç°äºæ°çtagï¼èçæ¬çææ¾å¨è¿æ¯è½å¤è§£æå®æ´ä¸ªswfæ件èä¸åºç°é误ï¼å¤§ä¸äºå°±æ¯ä¸è½æä¾æ°çåè½èå·²ã
ãã以ä¸å°±æ¯swfæ件ç»æçä¸ä¸ªå½¢è±¡æ¦å¿µã
ãã(æ件header)(æ件body)
ãã|
ãã(tag 1)(tag 2)(tag 3)(â¦â¦)
ãã|
ãã(tag header)(tag body)
ãã|
ãã(tag ç±»å代ç )(tag é¿åº¦)
ããè¿æ ·å¤§å®¶æ¯å¦å¯¹swfæ件çç»ææäºä¸ä¸ªåºæ¬ç认è¯ï¼
ããä¸ä¸èæä¼åæä¸ä¸å 个swfå¿ æçtagï¼å æ¬
ããbackgroundColor tag,showFrame tagåend tag
ãã第3è
ããsetBackgroundColor tag
ããè¿ä¸ªtagæ¯ç´æ¥è·å¨æ件headåé¢ç第ä¸ä¸ªtagï¼æ¯æ件ä¸å¿ ç¶åå¨çã
ããå®çç»æå¦ä¸ï¼
ããé¿åº¦ï¼bitï¼ å称 说æ
ãã16 header tag头ï¼çtagå
ããç±»åç 为9
ãã24 BackgroundColor
ããRGBç±»åï¼å³3个åèï¼åå«è¡¨ç¤ºçº¢ã绿ãè
ããshowFrame tag
ããè¿æ¯æ件æå第2个tagï¼å®æ¯å¿ ç¶åå¨çã
ããç»æå¦ä¸ï¼
ããé¿åº¦ï¼bitï¼ å称 说æ
ãã16 header tag头ï¼çtagå
ããç±»åç 为1
ããend tag
ããç»ætagï¼å®çä½ç¨ä¸ç¨æ说äºï¼å¿ ç¶æ¯æ件çæåä¸ä¸ªtagã
ããé¿åº¦ï¼bitï¼ å称 说æ
ãã16 header tag头ï¼çtagå
ããç±»åç 为0
ããä¸ä¸èæå°è®²çæ¯character ID
ããåDepthçæä¹åtextFieldçåºæ¬tagç»æã
ããï¼å¦å¤ï¼æè°¢AOLçè¡¥å å解éã
ãã第4è
ããä¸ä¸ªtextFieldå°±æ¯ä¸ä¸ªææ¬æ¡ï¼ææ¬æ¡æ3ç§ï¼éæçï¼å¨æçï¼åè¾å ¥åãä½ä¸ºtagçè¯ï¼å®åªæ2ç§ï¼éæçåå¨æçï¼è¾å ¥åä¸è¿æ¯å¨æçä¸ç§ç¹å«å½¢å¼ã
ããè¿é讨论å¨æææ¬æ¡çç»æã
ããå®ç±3个tagç»æï¼2个å®ä¹tagåä¸ä¸ªæ§å¶tag
ããåå«æ¯ï¼
ããå®ä¹tag DefineFont2 DefineEditText (é对player 7.0
ããå¦æä¸åæ åµè¯·æ£æ¥ææ¾å¨çæ¬)
ããæ§å¶tag PlaceObject2
ããDefineFont2 å®ä¹äºä¸ä¸ªåä½ä¿¡æ¯ï¼
ããDefineEditTextå¼ç¨äºå®ä¹çåä½ï¼å¹¶å®ä¹äºæ¾ç¤ºçæåä¿¡æ¯ï¼èPlaceObjectå¼ç¨äºå®ä¹çæåä¿¡æ¯ï¼å¹¶æ§å¶äºæåçæ¾ç¤ºã
ããä»ä»¬ä¹é´çå¼ç¨å°±æ¯ä¾é character IDè¿è¡çã
ããcharacter
ããIDå°±æ¯ä¸ä¸ªä»1å¼å§çæ°åæ 示ï¼å¦æä¸é´åºç°ç¼ºæ¼ï¼ä»ç¼ºæ¼å¼å§çææcharacter
ããIDé½è¢«å¿½ç¥ï¼èéå¤çè¯ï¼ååºç°çå°è¦çå åºç°çtagã
ããDefineFont2ç¨ä¸ä¸ªcharacter ID
ããæ¥æ 示èªå·±ï¼DefineEditTextåPlaceObject2ä¹åæ ·å¦æ¤ãä½å¹¶ä¸æ¯ææçtagé½æcharacter
ããIDã
ããå¦å¤ï¼PlaceObject2è½ç¶ä¹æcharacter
ããIDï¼ä½å®å¹¶ä¸æ¯ç¨æ¥æ 示èªå·±çï¼èæ¯ç¨æ¥è°ç¨çã
ããè深度Depthå¨3个tagä¸åªæPlaceObject2æ¥æã
ããè¿3个tagçå ³ç³»å°±æ¯è¿æ ·ãè¿3个tagçç»ææä¼å¨ä¸èä¸è¯´æãï¼æ±æï¼æ¯æ¬¡é½è¯´ä¸ç¹ç¹ï¼ï¼
ãã第5è
ããDefineFont2
ããè¿ä¸ªtagçä½ç¨æ¯å®ä¹ä¸ä¸ªåä½ï¼æè ä¸ç»éæè½®å»åï¼ç¨ä»¥ç»DefineEditText使ç¨ã
ããå ³äºæåçå ä¹ææä¿¡æ¯ï¼é½å¯ä»¥å¨è¿ä¸ªtagä¸è¿è¡è®¾ç½®ï¼å æ¤ï¼è¿ä¹æ¯ä¸ä¸ªç¸å½å¤æçtagã
ããå®çç»æå¦ä¸ï¼
ããé¿åº¦ï¼bitï¼ å称
ãã说æ
ããheaderLength header
ããtag头ï¼ç±»åç 为48
ãã16 FontID character
ããIDï¼å¯ä¸çæ 示
ãã1 FontFlagsHasLayout
ããæ ¹æ®åé¢è§£éï¼å¤ææ¯å¦æååçæ è®°
ãã1 FontFlagsShiftJIS
ããæ¯å¦ä½¿ç¨ShiftJISç¼ç
ãã1 FontFlagsSmallText
ããæ¯å¦ä½¿ç¨å°åä½æ¾ç¤º
ãã1 FontFlagsANSI æ¯å¦ä½¿ç¨ANSIç¼ç
ãã1 FontFlagsWideOffsets
ããæ¯å¦ä½¿ç¨32ä½å移é
ãã1 FontFlagsWideCodes
ããæ¯å¦ä½¿ç¨16ä½æåç¼ç
ãã1 FontFlagsItalic
ããæåæ¯å¦æ¯æä½
ãã1 FontFlagsBold
ããæåæ¯å¦æ¯ç²ä½
ãã8 LanguageCode
ããè¯è¨ç¼ç ï¼æç¸åºçç¼ç 表对åº
ãã8 FontNameLen æ件åé¿åº¦
ããFontNameLen*8 FontName
ããæ件å称ï¼ä½¿ç¨utf8ç¼ç ï¼
ãã16 NumGlyphs è½®å»å个æ°
ãã32/16 OffsetTable
ããæ ¹æ®FontFlagsWideOffsetsï¼ä¸º32ä½ï¼å¦å为16ä½
ãã32/16 CodeTableOffset åä¸
ããä¸å®*NumGlyphs GlyphShapeTable
ããè½®å»åä¿¡æ¯ï¼ä¸ºshapeç»æï¼åæ¯ä¸ä¸ªå¤æç»æï¼
ãã16/8 CodeTable
ããæ ¹æ®FontFlagsWideCodesï¼ä¸º16ä½ãç¼ç 表ï¼ä¸ºåºå®å¼UCS-2
ãã16/0 FontAscent
ããæ ¹æ®FontFlagsHasLayoutï¼ä¸º16ä½ï¼å¦å没æ该å段
ãã16/0 FontDescent
ããæ ¹æ®FontFlagsHasLayoutï¼ä¸º16ä½ï¼å¦å没æ该å段
ãã16/0 FontLeading
ããæ ¹æ®FontFlagsHasLayoutï¼ä¸º16ä½ï¼å¦å没æ该å段
ãã16/0*NumGlyphs FontAdvanceTable
ããæ ¹æ®FontFlagsHasLayoutï¼ä¸º16ä½ï¼å¦å没æ该å段
ããRECT*NumGlyphs FontBoundsTable
ããæ ¹æ®FontFlagsHasLayoutï¼ä¸º16ä½ï¼å¦å没æ该å段
ãã16/0 KerningCount
ããæ ¹æ®FontFlagsHasLayoutï¼ä¸º16ä½ï¼å¦å没æ该å段
ããKERNINGRECORD*KerningCount
ããFontKerningTable
ããæ ¹æ®FontFlagsHasLayoutï¼ä¸º16ä½ï¼å¦å没æ该å段
ããå¦æå纯åæå¨æææ¬çè¿ä¸ªtagçä¿¡æ¯ï¼åªéè¦åæå°ä¸é¢çfontNameé¨å就足å¤äºï¼å ¶ä»ä¿¡æ¯åªå¯¹è½®å»åï¼ä¹å°±æ¯éææåææã
温馨提示:答案为网友推荐,仅供参考