私のアプリはSDK> = 5.2.0.GAのフォントファイルを認識しません。 SDK < = 5.1.2.GAでAppcelerator:SDK 5.2.0.GAからフォントが認識されません
インクルードは、ドキュメントを読ん
問題ありません私はこの問題に関連する何かを見つけることができませんでした、または私は間違っていますか?
TiApp.xml
<ios>
<plist>
<dict>
<key>UIAppFonts</key>
<array>
<string>/fonts/icons.ttf</string>
</array>
....
</dict>
</plist>
</ios>
フォントディレクトリ
アイコンの例
var IconicFont = require('/icon/IconicFont');
var Icons = new IconicFont({
font : '/icon/ListIcons'
});
var myBtn = Ti.UI.createButton({
height : 50,
width : 50,
color : 'white',
font : {
fontSize : 30,
fontFamily : Icons.fontfamily
},
title : Icons.icon("nameicon"),
textAlign : Ti.UI.TEXT_ALIGNMENT_CENTER,
verticalAlign : Ti.UI.TEXT_VERTICAL_ALIGNMENT_CENTER
});
IconicFont.js
function IconicFont(params) {
params = params || {};
this._font = require(params.font);
}
Object.defineProperties(IconicFont.prototype, {
font: {
set: function(param){
this._font = require(param);
},
get: function(){
return this._font;
}
},
fontfamily: {
get: function(){
return this._font.fontfamily;
}
}
});
IconicFont.prototype.icon = function(param){
var result = [];
if (!Array.isArray(param)) {
param = [param];
}
for (var i = 0; i < param.length; i++) {
result.push(String.fromCharCode(this._font.charcode[param[i]]));
}
return result.join('');
};
module.exports = IconicFont;
ListIcons.js
exports.fontfamily = 'FontName';
exports.charcode = {
'image':0xf11a,
'.....':......
};
確かにAppceleratorフォーラムがあなたの質問のためのより良い場所になるでしょうか? – trojanfoe
SOは新しいAppceleratorフォーラムです。 http://www.appcelerator.com/blog/2016/01/embracing-stack-overflow-for-appcelerator-community-support/ – WhiteLine
ハハ、何か冗談。 – trojanfoe