Commit b0fe50ab authored by 罗超's avatar 罗超

修正导入

parent b4a2a84d
......@@ -16,7 +16,6 @@ export const ResolveText = (item: any, index: number,offsetLeft:number,offsetTop
const { left, top, width, height, value, font, transform } = f
const { colors, styles, alignment, sizes, names, weights,textDecoration } = font
if(value.indexOf('独家安排')!=-1) console.log(f,font)
let fontSize = 24.0
let newSizes = sizes?sizes:[12]
//if(value=='12980') console.log(newSizes,transform,extractScale(transform))
......@@ -92,6 +91,7 @@ export const ResolveText = (item: any, index: number,offsetLeft:number,offsetTop
const valuesStr = value.split('\r')
let content = ''
valuesStr.forEach((x: any,si:number) => {
if(x!='')
content += `<p><span style="${styleArray[si]}">${HtmlUtil.htmlEncodeByRegExp(x)}</span></p>`
})
......@@ -102,19 +102,18 @@ export const ResolveText = (item: any, index: number,offsetLeft:number,offsetTop
let words = checkWord.match(/[\u3002|\uff1f|\uff01|\uff0c|\u3001|\uff1b|\uff1a|\u201c|\u201d|\u2018|\u2019|\uff08|\uff09|\u300a|\u300b|\u3008|\u3009|\u3010|\u3011|\u300e|\u300f|\u300c|\u300d|\ufe43|\ufe44|\u3014|\u3015|\u2026|\u2014|\uff5e|\ufe4f|\uffe5]/g)
if(words&&words.length>0){
domheight += fontSize*words.length*1.4
domTop -= fontSize
//domTop -= fontSize
}else{
domheight += fontSize*1.4
}
domLeft -= 10+((leading-1)*fontSize/2)
}
}
else {
domwidth +=fontSize+(value[value.length-1]=='】'?fontSize:0)
domTop -= 10+((leading-1)*fontSize/2)
domwidth += fontSize+(value[value.length-1]=='】'?fontSize:0)
}
domTop -= 10 //+((leading-1)*fontSize/2)
domLeft -= 10 //+((leading-1)*fontSize/2)
let fontName = names.filter((x:any)=>x.indexOf('Adobe')==-1)
if(fontName && fontName.length>0){
......@@ -127,7 +126,6 @@ export const ResolveText = (item: any, index: number,offsetLeft:number,offsetTop
fontName[i]=x
}
}
if(value.indexOf('独家安排')!=-1) console.log(styleArray,lineCount)
let element: PPTTextElement = {
id: "text_" + index,
type: 'text',
......
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