You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@weex.apache.org by ac...@apache.org on 2017/05/17 02:40:35 UTC

[3/7] incubator-weex git commit: * [ios] update iconfont case

* [ios] update iconfont case


Project: http://git-wip-us.apache.org/repos/asf/incubator-weex/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-weex/commit/5036db95
Tree: http://git-wip-us.apache.org/repos/asf/incubator-weex/tree/5036db95
Diff: http://git-wip-us.apache.org/repos/asf/incubator-weex/diff/5036db95

Branch: refs/heads/0.13-dev
Commit: 5036db95d5c4e1ddbf97891a95301606b3150ae9
Parents: 3272a23
Author: acton393 <zh...@gmail.com>
Authored: Tue May 16 15:45:58 2017 +0800
Committer: acton393 <zh...@gmail.com>
Committed: Tue May 16 15:45:58 2017 +0800

----------------------------------------------------------------------
 examples/iconfont.we | 63 ++++++++++++++++++++++++++++++++++++-----------
 1 file changed, 48 insertions(+), 15 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/5036db95/examples/iconfont.we
----------------------------------------------------------------------
diff --git a/examples/iconfont.we b/examples/iconfont.we
index 82c4f78..094063f 100644
--- a/examples/iconfont.we
+++ b/examples/iconfont.we
@@ -1,11 +1,38 @@
 <template>
-  <div>
-    <text class="title1">Assets: &#xe606;&#xe605;&#xe604;&#xe603;&#xe602;&#xe601;&#xe600;</text>
-    <text class="title2">http ttf: &#xe606;&#xe605;&#xe604;&#xe603;&#xe602;&#xe601;&#xe600;</text>
-    <text class="title3">http woff: &#xe606;&#xe605;&#xe604;&#xe603;&#xe602;&#xe601;&#xe600;</text>
-    <text class="title4">file: &#xe606;&#xe605;&#xe604;&#xe603;&#xe602;&#xe601;&#xe600;</text>
-  </div>
+  <scroller style='align-items:center'>
+    <div style='margin-top:20px'>
+      <text style="color:red;font-size:50px">only support font for ttf and woff</text>
+    </div>
+    <text class="title2" style='margin-top:50px;width:500px'>http ttf: &#xe606;&#xe605;&#xe604;&#xe603;&#xe602;&#xe601;&#xe600;</text>
+    <text class="title3" style='margin-top:50px;width:500px'>http woff: &#xe606;&#xe605;&#xe604;&#xe603;&#xe602;&#xe601;&#xe600;</text>
+    
+    <div style='flex-direction:row;margin-top:50px'>
+      <text style='font-family:iconfont4;font-size:50;color:green'>&#xe614;&#xe612;&#xe613;</text>
+      <text style='font-family:iconfont4;font-size:50;'>&#xe614;&#xe612;&#xe613;&#xe61d;&#xe714;</text>
+      <text style='font-family:iconfont4;font-size:60;color:blue'>&#xe711;</text>
+      <text style='font-family:iconfont4;font-size:60;color:green'>&#xe71c;&#xe60b;</text>
+    </div>
+    <div style='flex-direction:row;margin-top:50px'>
+      <text style='font-family:iconfont4;font-size:50;color:green'>&#xe71b;</text>
+      <text style='font-family:iconfont4;font-size:50;'>&#xe713;</text>
+      <text style='font-family:iconfont4;font-size:60;color:blue'>&#xe714;</text>
+      <text style='font-family:iconfont4;font-size:60;color:green'>&#xe71f;&#xe602;&#xe715;&#xe60a;&#xe606;&#xe717;&#xe657;&#xe654;&#xe64f;&#xe637;</text>
+    </div>
+    <div>
+      <text style='font-family:iconfont4;font-size:100; margin-top:50px'>&#xe631;&#xe630;&#xe627;&#xe63e;&#xe649;&#xe641;&#xe643;</text>
+    </div>
 
+    <div>
+      <text style='font-family:iconfont4;font-size:100;color:green;margin-top:50px'>&#xe61e;&#xe600;&#xe62b;&#xe646;</text>
+      <text style='font-family:iconfont4;font-size:100;margin-top:50px'> </text>
+    </div>
+
+    <div style='flex-direction:row'>
+      <text style='font-family:iconfont4;font-size:70;width:750px'>&#xe748;&#xe747;&#xe746;&#xe746;&#xe745;&#xe744;&#xe742;&#xe740;&#xe73f;&#xe73a;&#xe731;&#xe6e0;&#xe72c;&#xe730;&#xe740;&#xe6e1;&#xe6d7;&#xe739;&#xe73d;&#xe735;&#xe72a;&#xe6e3;&#xe738;</text>
+    </div>
+    
+  </scroller>
+  
 </template>
 <style>
   .title1 {
@@ -15,13 +42,13 @@
   }
 
   .title2 {
-    color: red;
+    color: gray;
     font-size: 36;
     font-family: iconfont2;
   }
 
   .title3 {
-    color: red;
+    color: pink;
     font-size: 36;
     font-family: iconfont3;
   }
@@ -37,11 +64,8 @@
   module.exports = {
     created: function() {
       var domModule = require('@weex-module/dom');
-      //目前支持ttf、woff文件,不支持svg、eot类型
-      domModule.addRule('fontFace', {
-        'fontFamily': "iconfont1",
-        'src' : "url('iconfont.ttf')"
-      });
+      //目前支持ttf、woff文件,不支持svg、eot类型,moreItem at http://www.iconfont.cn/
+      
       domModule.addRule('fontFace', {
         'fontFamily': "iconfont2",
         'src': "url('http://at.alicdn.com/t/font_1469606063_76593.ttf')"
@@ -50,10 +74,19 @@
         'fontFamily': "iconfont3",
         'src': "url('http://at.alicdn.com/t/font_1469606522_9417143.woff')"
       });
-      domModule.addRule('fontFace', {
+      
+       domModule.addRule('fontFace', {
         'fontFamily': "iconfont4",
-        'src': "url('file:///storage/emulated/0/Android/data/com.alibaba.weex/cache/http:__at.alicdn.com_t_font_1469606063_76593.ttf')"
+        'src': "url('http://at.alicdn.com/t/font_zn5b3jswpofuhaor.ttf')"
       });
+
+
+      // you can use the absolute path or the local:// scheme path
+      //  domModule.addRule('fontFace', {
+      //   'fontFamily': "iconfont4",
+      //   'src': "url('file:///storage/emulated/0/Android/data/com.alibaba.weex/cache/http:__at.alicdn.com_t_font_1469606063_76593.ttf')"
+      // });
+      
     }
   }
 </script>