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) 評(píng)論(0)  編輯  收藏 所屬分類: Flex

          導(dǎo)航

          統(tǒng)計(jì)

          常用鏈接

          留言簿(6)

          隨筆分類(440)

          隨筆檔案(378)

          文章檔案(6)

          新聞檔案(1)

          相冊(cè)

          收藏夾(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

          最新隨筆

          搜索

          積分與排名

          最新評(píng)論

          閱讀排行榜

          評(píng)論排行榜

          free counters
          主站蜘蛛池模板: 葫芦岛市| 绵竹市| 黄平县| 古田县| 静乐县| 瑞丽市| 资阳市| 桃园县| 清流县| 福泉市| 商南县| 榆林市| 海淀区| 彩票| 清河县| 广水市| 邛崃市| 定安县| 嵩明县| 内乡县| 海宁市| 佛教| 汝州市| 长葛市| 新晃| 安阳县| 拜泉县| 万山特区| 肇州县| 白朗县| 开化县| 乡城县| 财经| 上杭县| 兴业县| 东乡族自治县| 刚察县| 富蕴县| 泊头市| 玛纳斯县| 澳门|