xijword里边字母字体的宽度是不一样的,比如i和a明显是不一样的,iiii和aaaa,同样4个明显4个a宽,找不到具体每个字符的宽度。笨办法,自己做了个实验。
--宋体里边英文字符展位是一样的,宋12大概69个
实验条件,在Arial这个字体, 10磅测试的,初步测试一下,字体大小*每行字数=行距。
所以有了10磅的,11磅的就是*10除以11;
结果写给了:js2是标点符号的(有些已经转义了),js1是字母和数字
let js2={".":"150"," ":"82",",":"150","?":"75","/":"149","\\":"149","[":"149","]":"150",";":"149",":":"149","!":"150","(":"124",")":"124","*":"106","&":"62","^":"88","%":"46","$":"74","#":"74","@":"40","{":"124","}":"124","“":"124","”":"124","<":"71",">":"71","`":"124","~":"71","+":"71","=":"71","_":"74","-":"124",'"':"116","'":"217"}
let js1={a:"74",b:"74",c:"83",d:"74",e:"74",f:"159",g:"74",h:"74",i:"186",j:"186",k:"83",l:"186",m:"49",n:"74",o:"74",p:"74",q:"74",r:"124",s:"83",t:"149",u:"74",v:"83",w:"57",x:"83",y:"83",z:"83",1:"86",2:"74",3:"74",4:"74",5:"74",6:"74",7:"74",8:"74",9:"74",0:"74",A:"62",B:"62",C:"57",D:"57",E:"62",F:"67",G:"53",H:"57",I:"149",J:"83",K:"62",L:"74",M:"49",N:"57",O:"53",P:"62",Q:"53",R:"57",S:"62",T:"67",U:"57",V:"62",W:"44",X:"62",Y:"62",Z:"67"}
??
具体思路是
let str='abcdefghijklmnopqrstuvwxyz'
let str2='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
let num='1234567890'
let zifu='. ,?/\\[];:!()*&^%$#@{}|“”<>`~+=-_'+'"'+"'"
inarr=str+str2+num+zifu
for(let m=0;m<inarr.length;m++)
{
for(let i=0;i<100;i++)
{
outstr=outstr+inarr[m]
}
outstr=outstr+'\r\n';
}
//把最终outstr复制到word中
// word中眼睛看,不够的在复制,知道多了,多了几个不知道,复制到excle
下面是100个字符,可以复制到word,空格复制过去可能有问题?
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa100结束
bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb100结束
cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc100结束
dddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd100结束
eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee100结束
ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff100结束
gggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggg100结束
hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh100结束
iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii100结束
jjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjj100结束
kkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk100结束
llllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllll100结束
mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm100结束
nnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn100结束
oooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo100结束
pppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppp100结束
qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq100结束
rrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr100结束
ssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssss100结束
tttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttt100结束
uuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuu100结束
vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv100结束
wwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwww100结束
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx100结束
yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy100结束
zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz100结束
1111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111100结束
2222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222100结束
3333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333100结束
4444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444100结束
5555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555100结束
6666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666100结束
7777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777100结束
8888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888100结束
9999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999100结束
0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000100结束
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA100结束
BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB100结束
CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC100结束
DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD100结束
EEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEE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YYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYY100结束
ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ100结束
....................................................................................................100结束
100结束
,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,100结束
????????????????????????????????????????????????????????????????????????????????????????????????????100结束
100结束
\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\100结束
[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[100结束
]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]100结束
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;100结束
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::100结束
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!100结束
((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((100结束
))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))100结束
****************************************************************************************************100结束
&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&100结束
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^100结束
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%100结束
$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$100结束
####################################################################################################100结束
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@100结束
{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{100结束
}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}100结束
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||100结束
““““““““““““““““““““““““““““““““““““““““““““““““““““““““““““““““““““““““““““““““““““““““““““““““““““100结束
””””””””””””””””””””””””””””””””””””””””””””””””””””””””””””””””””””””””””””””””””””””””””””””””””””100结束
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<100结束
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>100结束
````````````````````````````````````````````````````````````````````````````````````````````````````100结束
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~100结束
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++100结束
====================================================================================================100结束
----------------------------------------------------------------------------------------------------100结束
____________________________________________________________________________________________________100结束
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""100结束
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''100结束
符号 | 标准 | 倍数 | 多余 | 实际 | .................................................. | 100 | 2 | 50 | 150 | ,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, | 100 | 2 | 50 | 150 | ????????????????????????? | 100 | 1 | 25 | 75 | /// | 100 | 2 | 51 | 149 |
获得字符实际数字列;
然后用一下拼装成为js
//获取拼装一下
let app=this
let copyStr=app.data.copyArr[0]//获取剪贴板数据
let inarr=copyStr.split("\r\n")
let str=''
let num=''
let out1='{'
for(let m=0;m<inarr.length;m++)
{
str='"'+inarr[m].charAt(0)+'"';
num=app.leftNum(inarr[m]);
out1=out1+str+':'+'"'+num+'",';
if(m==inarr.length-2){
out1=out1+'"'+inarr[m].charAt(0)+'"'+':'+'"'+app.leftNum(inarr[m+1])+'"';
m++;
}
}
out1=out1+"}"
wx.setClipboardData({
data:out1,
success: function(res) {
},
fail: function(res) {
}
});
下面是测试一下结果,注意加了个1,这样看起来明显一点?
let str='abcdefghijklmnopqrstuvwxyz'
let str2='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
let num='1234567890'
let inarr=str+num+str2
let outstr=''
let js2={".":"150",",":"150","?":"75","/":"149","\\":"149","[":"149","]":"150",";":"149",":":"149","!":"150","(":"124",")":"124","*":"106","&":"62","^":"88","%":"46","$":"74","#":"74","@":"40","{":"124","}":"124","“":"124","”":"124","<":"71",">":"71","`":"124","~":"71","+":"71","=":"71","_":"74","-":"124",'"':"116","'":"217"}
let js={a:"74",b:"74",c:"83",d:"74",e:"74",f:"159",g:"74",h:"74",i:"186",j:"186",k:"83",l:"186",m:"49",n:"74",o:"74",p:"74",q:"74",r:"124",s:"83",t:"149",u:"74",v:"83",w:"57",x:"83",y:"83",z:"83",1:"86",2:"74",3:"74",4:"74",5:"74",6:"74",7:"74",8:"74",9:"74",0:"74",A:"62",B:"62",C:"57",D:"57",E:"62",F:"67",G:"53",H:"57",I:"149",J:"83",K:"62",L:"74",M:"49",N:"57",O:"53",P:"62",Q:"53",R:"57",S:"62",T:"67",U:"57",V:"62",W:"44",X:"62",Y:"62",Z:"67"}
inarr='.,?/\\[];:!()*&^%$#@{}|“”<>`~+=-_'+'"'+"'"
for(let m=0;m<inarr.length;m++)
{
str=inarr[m]
for(let i=0;i-1<js2[str];i++)
{
outstr=outstr+inarr[m]
}
outstr=outstr+'\r\n';
}
wx.setClipboardData({
data:outstr,
success: function(res) {
},
fail: function(res) {
}
});
|