压缩字体
This commit is contained in:
@@ -107,90 +107,86 @@ onMounted(() => {
|
||||
|
||||
const createPoster = (event) => {
|
||||
let e = event.target;
|
||||
debounceTap(
|
||||
e,
|
||||
() => {
|
||||
// 海报生成
|
||||
posterCreate(
|
||||
{ width: 750, height: 1500 }, //海报尺寸
|
||||
// 海报素材,按顺序依次渲染
|
||||
[
|
||||
// 背景
|
||||
{
|
||||
name: "bg",
|
||||
src: posterBg[bgId.value - 1],
|
||||
pos: { w: 750, h: 1500, x: 0, y: 0 },
|
||||
debounceTap(e, () => {
|
||||
// 海报生成
|
||||
posterCreate(
|
||||
{ width: 750, height: 1500 }, //海报尺寸
|
||||
// 海报素材,按顺序依次渲染
|
||||
[
|
||||
// 背景
|
||||
{
|
||||
name: "bg",
|
||||
src: posterBg[bgId.value - 1],
|
||||
pos: { w: 750, h: 1500, x: 0, y: 0 },
|
||||
},
|
||||
// 产品
|
||||
{
|
||||
name: "product",
|
||||
src: mbtiObj.value.productPic,
|
||||
pos: { w: 469, h: 102, x: 137, y: 911 },
|
||||
},
|
||||
// 二维码
|
||||
{
|
||||
name: "eqcode",
|
||||
src: eqcodePic.value,
|
||||
pos: { w: 140, h: 140, x: 66, y: 1070 },
|
||||
},
|
||||
],
|
||||
// 字体素材
|
||||
[
|
||||
// mbti title及职业
|
||||
{
|
||||
content: mbtiObj.value.type + " " + mbtiObj.value.job,
|
||||
style: {
|
||||
font: "normal 80px HYYakuHei",
|
||||
pos: { x: 70, y: 340 },
|
||||
},
|
||||
// 产品
|
||||
{
|
||||
name: "product",
|
||||
src: mbtiObj.value.productPic,
|
||||
pos: { w: 469, h: 102, x: 137, y: 911 },
|
||||
},
|
||||
// mbti 描述
|
||||
{
|
||||
content: mbtiObj.value.des[0],
|
||||
style: {
|
||||
font: "normal 30px fzzy",
|
||||
color: "#af6f49",
|
||||
pos: { x: 70, y: 470 },
|
||||
},
|
||||
// 二维码
|
||||
{
|
||||
name: "eqcode",
|
||||
src: eqcodePic.value,
|
||||
pos: { w: 140, h: 140, x: 66, y: 1070 },
|
||||
},
|
||||
{
|
||||
content: mbtiObj.value.des[1],
|
||||
style: {
|
||||
font: "normal 30px fzzy",
|
||||
color: "#af6f49",
|
||||
pos: { x: 70, y: 520 },
|
||||
},
|
||||
],
|
||||
// 字体素材
|
||||
[
|
||||
// mbti title及职业
|
||||
{
|
||||
content: mbtiObj.value.type + " " + mbtiObj.value.job,
|
||||
style: {
|
||||
font: "normal 80px HYYakuHei",
|
||||
pos: { x: 70, y: 330 },
|
||||
},
|
||||
},
|
||||
// 新年寄语
|
||||
{
|
||||
content: mbtiObj.value.blessings[0],
|
||||
style: {
|
||||
font: "normal 50px fzcy",
|
||||
pos: { x: 70, y: 650 },
|
||||
},
|
||||
// mbti 描述
|
||||
{
|
||||
content: mbtiObj.value.des[0],
|
||||
style: {
|
||||
font: "normal 30px fzzy",
|
||||
color: "#af6f49",
|
||||
pos: { x: 70, y: 470 },
|
||||
},
|
||||
},
|
||||
{
|
||||
content: mbtiObj.value.blessings[1],
|
||||
style: {
|
||||
font: "normal 50px fzcy",
|
||||
pos: { x: 70, y: 725 },
|
||||
},
|
||||
{
|
||||
content: mbtiObj.value.des[1],
|
||||
style: {
|
||||
font: "normal 30px fzzy",
|
||||
color: "#af6f49",
|
||||
pos: { x: 70, y: 520 },
|
||||
},
|
||||
},
|
||||
// 产品
|
||||
{
|
||||
content: mbtiObj.value.product,
|
||||
style: {
|
||||
font: "normal 50px fzcy",
|
||||
pos: { x: 70, y: 876 },
|
||||
},
|
||||
// 新年寄语
|
||||
{
|
||||
content: mbtiObj.value.blessings[0],
|
||||
style: {
|
||||
font: "normal 50px fzcy",
|
||||
pos: { x: 70, y: 650 },
|
||||
},
|
||||
},
|
||||
{
|
||||
content: mbtiObj.value.blessings[1],
|
||||
style: {
|
||||
font: "normal 50px fzcy",
|
||||
pos: { x: 70, y: 725 },
|
||||
},
|
||||
},
|
||||
// 产品
|
||||
{
|
||||
content: mbtiObj.value.product,
|
||||
style: {
|
||||
font: "normal 50px fzcy",
|
||||
pos: { x: 70, y: 876 },
|
||||
},
|
||||
},
|
||||
],
|
||||
// 主题配色
|
||||
theme[bgId.value - 1]
|
||||
);
|
||||
},
|
||||
0.4
|
||||
);
|
||||
},
|
||||
],
|
||||
// 主题配色
|
||||
theme[bgId.value - 1]
|
||||
);
|
||||
});
|
||||
};
|
||||
|
||||
const goDraw = (event) => {
|
||||
|
||||
Reference in New Issue
Block a user