Commit 954466e7 by 曹玉玺

添加思源宋体字库

parent 342d263b
......@@ -101,7 +101,7 @@ async png2jpg (srcPng, dstJpg) {
})
})
return p
}
}
//商标营业执照处理,大小小于2M,宽高10-50cm
//身份证同营业执照处理(调整上传至oss的执照文件,通过文件名称下载至本地调整)
async bzLicenseForTM(obj) {
......@@ -121,7 +121,7 @@ async png2jpg (srcPng, dstJpg) {
var result = await this.ossClient.downfile(jpgpath);
console.log(result)
//检查是否是png
if (await this.isPng(jpgpathtmp)){
let pngPath = "/tmp/" + basename + ".png"
......@@ -307,8 +307,8 @@ async png2jpg (srcPng, dstJpg) {
}
/**
* 类型判断
* @param {*} headerTypeStr
* @param {*} fileType
* @param {*} headerTypeStr
* @param {*} fileType
*/
async fileTypeConfig(headerTypeStr, fileType) {
var file_header = [
......@@ -382,7 +382,8 @@ async png2jpg (srcPng, dstJpg) {
//.font(__dirname+"/fonts/heiti.otf")
var p = new Promise(function (resv, reject) {
imageMagick(bs, bs, "#fff")
.font(__dirname + "/fonts/songti.TTC")
// .font(__dirname + "/fonts/songti.TTC")
.font(__dirname + "/fonts/SourceHanSerif-Regular.ttc")
.fontSize(fs)
.drawText(0, 0, word, "center")
.write(destfile, function (err) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment