let loadFont = function(textlist,list) {
	// var num = 0
	// const source = {
	// 	100: 'url("http://tprint.refinecolor.com/text/CangErXiaoWanZi.ttf")',
	// 	1: 'url("https://tprint.refinecolor.com/text/Qiantu_rabbit.ttf")',
	// 	2: 'url("https://tprint.refinecolor.com/text/Stand_cool_black.ttf")',
	// 	3: 'url("https://tprint.refinecolor.com/text/Standing_cool_happy_body.ttf")',
	// 	4: 'url("https://tprint.refinecolor.com/text/ZhankuQingkeButterBody.ttf")',
	// 	5: 'url("https://tprint.refinecolor.com/text/Font_horizon_method_stick_body.ttf")',
	// }
	uni.showLoading({
		title: '加载字体...',
		mask: true,
	});
	wx.loadFontFace({
		global:true,
		family: textlist.key,
		source: 'url(' + textlist.remark + ')',
		desc: {
			weight: 100
		},
		success: function(message) {
			//console.log('load font-family success:', message)
			textlist.textlong = true
		},
		fail: function(message) {
			textlist.textlong = false
			// console.log('load font-family fail: ', message)
		},
		complete(res) {
			uni.hideLoading();
			//wx.showToast({title: '字体下载完成',icon: 'success',duration: 2000});
			//console.log('complete', res)
			textlist.long = true
			// list.forEach(item=>{
			// 	if(item.long == true){
			// 		num++
			// 	}
			// })
			// uni.showLoading({
			// 	title: num + '/' + list.length + '字体加载中...',
			// 	mask: true,
			// });
			// if(num == 6){
			// 	uni.hideLoading();
			// 	wx.showToast({title: '字体加载完成',icon: 'success',duration: 2000});
			// }
			// num = 0
		}
	})
	
}

export default loadFont
