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 閱讀(277) 評論(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
          主站蜘蛛池模板: 东山县| 滨海县| 双鸭山市| 仁怀市| 台北县| 大足县| 克山县| 广汉市| 杂多县| 台州市| 确山县| 丽江市| 南木林县| 尚志市| 上栗县| 兰考县| 怀集县| 依兰县| 阳曲县| 宁晋县| 南华县| 大关县| 商南县| 正宁县| 仁寿县| 鹿邑县| 山阴县| 留坝县| 潍坊市| 潞城市| 慈利县| 东丰县| 南川市| 翼城县| 方城县| 刚察县| 兰坪| 睢宁县| 高密市| 南溪县| 定日县|