Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
h5
/
glsx-posters
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit bf73b870
authored
Aug 07, 2023
by
胡悦
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
修改字体
1 parent
3477ce3c
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
6 deletions
src/assets/styles/dj/warReport.scss
src/views/dj/warReport.vue
src/assets/styles/dj/warReport.scss
View file @
bf73b87
...
@@ -27,7 +27,7 @@
...
@@ -27,7 +27,7 @@
text-align
:
center
;
text-align
:
center
;
font-weight
:
900
;
font-weight
:
900
;
font-size
:
32px
;
font-size
:
32px
;
font-family
:
'獅尾B2加糖宗體SC-Regular'
;
font-family
:
狮尾
B2
加糖宋体
,
Swei
B2
Sugar
CJK
SC
,
獅尾
B2
加糖宋體
SC
,
獅尾
B2
加糖宋體
SC-Regular
;
letter-spacing
:
1px
;
letter-spacing
:
1px
;
color
:
#FFFFFF
;
color
:
#FFFFFF
;
background-image
:
linear-gradient
(
270deg
,
#ff735b
00
0%
,
#F84919
55%
,
#ff735b
00
100%
);
background-image
:
linear-gradient
(
270deg
,
#ff735b
00
0%
,
#F84919
55%
,
#ff735b
00
100%
);
...
...
src/views/dj/warReport.vue
View file @
bf73b87
...
@@ -3,7 +3,7 @@
...
@@ -3,7 +3,7 @@
* @Author: huyue
* @Author: huyue
* @Date: 2023-03-21 17:10:39
* @Date: 2023-03-21 17:10:39
* @LastEditors: huyue
* @LastEditors: huyue
* @LastEditTime: 2023-08-07 17:
37:12
* @LastEditTime: 2023-08-07 17:
51:59
-->
-->
<
template
>
<
template
>
<div
class=
"wrapper-box"
>
<div
class=
"wrapper-box"
>
...
@@ -12,7 +12,7 @@
...
@@ -12,7 +12,7 @@
<div
class=
"header-time"
>
<div
class=
"header-time"
>
2023年12月29日
2023年12月29日
</div>
</div>
<div
class=
"service-name"
>
是否使用了狮尾B2加糖宋体字体:
{{
hasFonts
}}
</div>
<div
class=
"service-name"
>
狮尾B2加糖宋体:
{{
hasFonts
.
font1
}}
;Swei B2 Sugar CJK SC:
{{
hasFonts
.
font2
}}
;獅尾B2加糖宋體SC:
{{
hasFonts
.
font3
}}
;獅尾B2加糖宋體SC-Regular:
{{
hasFonts
.
font4
}}
Microsoft YaHei:
{{
hasFonts
.
font5
}}
;Microsoft YaHei Light:
{{
hasFonts
.
font6
}}
</div>
</div>
</div>
<div
class=
"statics-box"
>
<div
class=
"statics-box"
>
<div
class=
"statics-total"
>
¥10846
</div>
<div
class=
"statics-total"
>
¥10846
</div>
...
@@ -107,9 +107,20 @@ const getImageUrl = (name: any, path = "dj") => {
...
@@ -107,9 +107,20 @@ const getImageUrl = (name: any, path = "dj") => {
.
href
;
.
href
;
};
};
var
isSupportFontFamily
=
function
(
f
)
{
if
(
typeof
f
!=
"string"
)
{
return
false
}
var
h
=
"Arial"
;
if
(
f
.
toLowerCase
()
==
h
.
toLowerCase
())
{
return
true
}
var
e
=
"a"
;
var
d
=
100
;
var
a
=
100
,
i
=
100
;
var
c
=
document
.
createElement
(
"canvas"
);
var
b
=
c
.
getContext
(
"2d"
);
c
.
width
=
a
;
c
.
height
=
i
;
b
.
textAlign
=
"center"
;
b
.
fillStyle
=
"black"
;
b
.
textBaseline
=
"middle"
;
var
g
=
function
(
j
)
{
b
.
clearRect
(
0
,
0
,
a
,
i
);
b
.
font
=
d
+
"px "
+
j
+
", "
+
h
;
b
.
fillText
(
e
,
a
/
2
,
i
/
2
);
var
k
=
b
.
getImageData
(
0
,
0
,
a
,
i
).
data
;
return
[].
slice
.
call
(
k
).
filter
(
function
(
l
)
{
return
l
!=
0
})
};
return
g
(
h
).
join
(
""
)
!==
g
(
f
).
join
(
""
)
};
var
isSupportFontFamily
=
function
(
f
)
{
if
(
typeof
f
!=
"string"
)
{
return
false
}
var
h
=
"Arial"
;
if
(
f
.
toLowerCase
()
==
h
.
toLowerCase
())
{
return
true
}
var
e
=
"a"
;
var
d
=
100
;
var
a
=
100
,
i
=
100
;
var
c
=
document
.
createElement
(
"canvas"
);
var
b
=
c
.
getContext
(
"2d"
);
c
.
width
=
a
;
c
.
height
=
i
;
b
.
textAlign
=
"center"
;
b
.
fillStyle
=
"black"
;
b
.
textBaseline
=
"middle"
;
var
g
=
function
(
j
)
{
b
.
clearRect
(
0
,
0
,
a
,
i
);
b
.
font
=
d
+
"px "
+
j
+
", "
+
h
;
b
.
fillText
(
e
,
a
/
2
,
i
/
2
);
var
k
=
b
.
getImageData
(
0
,
0
,
a
,
i
).
data
;
return
[].
slice
.
call
(
k
).
filter
(
function
(
l
)
{
return
l
!=
0
})
};
return
g
(
h
).
join
(
""
)
!==
g
(
f
).
join
(
""
)
};
let
hasFonts
=
ref
(
false
)
let
hasFonts
=
reactive
({
hasFonts
.
value
=
isSupportFontFamily
(
'獅尾B2加糖宗體SC-Regular'
)
font1
:
false
,
console
.
log
(
hasFonts
.
value
);
font2
:
false
,
font3
:
false
,
font4
:
false
,
font5
:
false
,
font6
:
false
})
hasFonts
.
font1
=
isSupportFontFamily
(
'狮尾B2加糖宋体'
)
hasFonts
.
font2
=
isSupportFontFamily
(
'Swei B2 Sugar CJK SC'
)
hasFonts
.
font3
=
isSupportFontFamily
(
'獅尾B2加糖宋體SC'
)
hasFonts
.
font4
=
isSupportFontFamily
(
'獅尾B2加糖宋體SC-Regular'
)
hasFonts
.
font5
=
isSupportFontFamily
(
'Microsoft YaHei'
)
hasFonts
.
font6
=
isSupportFontFamily
(
'Microsoft YaHei Light'
)
onMounted
(()
=>
{
onMounted
(()
=>
{
if
(
route
.
query
)
{
if
(
route
.
query
)
{
query
=
route
.
query
;
query
=
route
.
query
;
...
...
Write
Preview
Markdown
is supported
Attach a file
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 post a comment