gembin

          OSGi, Eclipse Equinox, ECF, Virgo, Gemini, Apache Felix, Karaf, Aires, Camel, Eclipse RCP

          HBase, Hadoop, ZooKeeper, Cassandra

          Flex4, AS3, Swiz framework, GraniteDS, BlazeDS etc.

          There is nothing that software can't fix. Unfortunately, there is also nothing that software can't completely fuck up. That gap is called talent.

          About Me

           

          Excluding font outlines in Flex can shave off over 200kb!

          Often when you need to embed a font you also need to include ‘bold’ and sometimes ‘italic’ styles. Sometimes you need more than one fontFamily. Flex by default will embed all glyphs of a fontFamily. Embedding every glyph if generally unnecessary. By restricting the character set (’unicode-range’) you can shave off between 50-100kb or more per font style (FontFamilies have varying amounts of glyphs and obviously varying complexities of outlines which effects how much you can save). Anyway by setting unicode-range for fonts we managed to shave 300kb off our application, I wasn’t expecting it to be so much so thought worth a blog ;)

          @font-face {
          src: url("assets/Arial.ttf");
          fontFamily: Arial;
          advancedAntiAliasing: true;
          unicode-range: U+0030-U+0039, /* 0-9 */
          U+0041-U+005A, /* Uppercase A-Z */
          U+0061-U+007A, /* Lowercase a-z */
          U+0021-U+002F, /* !"#$%&'()*+,-./ */
          U+003A-U+0040, /* :;<=>?@ */
          U+005B-U+0060, /* [\]^_ */
          U+00A3-U+00A3, /* £ */
          U+00A9-U+00A9, /* © */
          U+00AE-U+00AE /* ® */
          /* U+00BF-U+0259 FOREIGN CHRS */
          }
          Further reading:
          http://livedocs.adobe.com/flex/3/html/help.html?content=fonts_07.html

          if anyone knows of other ranges you think can be generally useful please let me know ;)

          posted on 2008-09-18 13:50 gembin 閱讀(295) 評論(0)  編輯  收藏 所屬分類: Flex

          導航

          統計

          常用鏈接

          留言簿(6)

          隨筆分類(440)

          隨筆檔案(378)

          文章檔案(6)

          新聞檔案(1)

          相冊

          收藏夾(9)

          Adobe

          Android

          AS3

          Blog-Links

          Build

          Design Pattern

          Eclipse

          Favorite Links

          Flickr

          Game Dev

          HBase

          Identity Management

          IT resources

          JEE

          Language

          OpenID

          OSGi

          SOA

          Version Control

          最新隨筆

          搜索

          積分與排名

          最新評論

          閱讀排行榜

          評論排行榜

          free counters
          主站蜘蛛池模板: 邵东县| 皮山县| 旌德县| 周口市| 长葛市| 东方市| 奈曼旗| 宜章县| 古蔺县| 德清县| 盐池县| 壶关县| 江城| 饶阳县| 赤城县| 屏南县| 淳安县| 济阳县| 望江县| 大冶市| 建平县| 沙河市| 油尖旺区| 墨脱县| 大埔县| 宁晋县| 博兴县| 丰镇市| 乐至县| 太仆寺旗| 屏山县| 仙居县| 淮阳县| 府谷县| 长子县| 阿荣旗| 无极县| 永丰县| 静安区| 宝丰县| 黄浦区|