Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Z
zhichan
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
蒋勇
zhichan
Commits
954466e7
Commit
954466e7
authored
Jun 30, 2025
by
曹玉玺
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加思源宋体字库
parent
342d263b
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
5 deletions
+6
-5
scratch-web/app/base/api/impl/fonts/SourceHanSerif-Regular.ttc
+0
-0
scratch-web/app/base/api/impl/imghandle.js
+6
-5
No files found.
scratch-web/app/base/api/impl/fonts/SourceHanSerif-Regular.ttc
0 → 100644
View file @
954466e7
File added
scratch-web/app/base/api/impl/imghandle.js
View file @
954466e7
...
@@ -101,7 +101,7 @@ async png2jpg (srcPng, dstJpg) {
...
@@ -101,7 +101,7 @@ async png2jpg (srcPng, dstJpg) {
})
})
})
})
return
p
return
p
}
}
//商标营业执照处理,大小小于2M,宽高10-50cm
//商标营业执照处理,大小小于2M,宽高10-50cm
//身份证同营业执照处理(调整上传至oss的执照文件,通过文件名称下载至本地调整)
//身份证同营业执照处理(调整上传至oss的执照文件,通过文件名称下载至本地调整)
async
bzLicenseForTM
(
obj
)
{
async
bzLicenseForTM
(
obj
)
{
...
@@ -121,7 +121,7 @@ async png2jpg (srcPng, dstJpg) {
...
@@ -121,7 +121,7 @@ async png2jpg (srcPng, dstJpg) {
var
result
=
await
this
.
ossClient
.
downfile
(
jpgpath
);
var
result
=
await
this
.
ossClient
.
downfile
(
jpgpath
);
console
.
log
(
result
)
console
.
log
(
result
)
//检查是否是png
//检查是否是png
if
(
await
this
.
isPng
(
jpgpathtmp
)){
if
(
await
this
.
isPng
(
jpgpathtmp
)){
let
pngPath
=
"/tmp/"
+
basename
+
".png"
let
pngPath
=
"/tmp/"
+
basename
+
".png"
...
@@ -307,8 +307,8 @@ async png2jpg (srcPng, dstJpg) {
...
@@ -307,8 +307,8 @@ async png2jpg (srcPng, dstJpg) {
}
}
/**
/**
* 类型判断
* 类型判断
* @param {*} headerTypeStr
* @param {*} headerTypeStr
* @param {*} fileType
* @param {*} fileType
*/
*/
async
fileTypeConfig
(
headerTypeStr
,
fileType
)
{
async
fileTypeConfig
(
headerTypeStr
,
fileType
)
{
var
file_header
=
[
var
file_header
=
[
...
@@ -382,7 +382,8 @@ async png2jpg (srcPng, dstJpg) {
...
@@ -382,7 +382,8 @@ async png2jpg (srcPng, dstJpg) {
//.font(__dirname+"/fonts/heiti.otf")
//.font(__dirname+"/fonts/heiti.otf")
var
p
=
new
Promise
(
function
(
resv
,
reject
)
{
var
p
=
new
Promise
(
function
(
resv
,
reject
)
{
imageMagick
(
bs
,
bs
,
"#fff"
)
imageMagick
(
bs
,
bs
,
"#fff"
)
.
font
(
__dirname
+
"/fonts/songti.TTC"
)
// .font(__dirname + "/fonts/songti.TTC")
.
font
(
__dirname
+
"/fonts/SourceHanSerif-Regular.ttc"
)
.
fontSize
(
fs
)
.
fontSize
(
fs
)
.
drawText
(
0
,
0
,
word
,
"center"
)
.
drawText
(
0
,
0
,
word
,
"center"
)
.
write
(
destfile
,
function
(
err
)
{
.
write
(
destfile
,
function
(
err
)
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment