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: </text>
- <text class="title2">http ttf: </text>
- <text class="title3">http woff: </text>
- <text class="title4">file: </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: </text>
+ <text class="title3" style='margin-top:50px;width:500px'>http woff: </text>
+
+ <div style='flex-direction:row;margin-top:50px'>
+ <text style='font-family:iconfont4;font-size:50;color:green'></text>
+ <text style='font-family:iconfont4;font-size:50;'></text>
+ <text style='font-family:iconfont4;font-size:60;color:blue'></text>
+ <text style='font-family:iconfont4;font-size:60;color:green'></text>
+ </div>
+ <div style='flex-direction:row;margin-top:50px'>
+ <text style='font-family:iconfont4;font-size:50;color:green'></text>
+ <text style='font-family:iconfont4;font-size:50;'></text>
+ <text style='font-family:iconfont4;font-size:60;color:blue'></text>
+ <text style='font-family:iconfont4;font-size:60;color:green'></text>
+ </div>
+ <div>
+ <text style='font-family:iconfont4;font-size:100; margin-top:50px'></text>
+ </div>
+ <div>
+ <text style='font-family:iconfont4;font-size:100;color:green;margin-top:50px'></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'></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>