Lines Matching +full:- +full:f2
1 // abc2svg - ABC to SVG translator
3 // Copyright (C) 2014-2020 Jean-Francois Moine - LGPL3+
4 //grid.js-module to insert a chord grid before or after a tune
5 abc2svg.grid={pl:'<path class="stroke" stroke-width="1" d="M',block_gen:function(of,s){if(s.subtype…
9 function set_chords(){var i,ch,pch='-'
24 abc.out_sxsy(x-wmx/2,' ',yl)
26 wmx.toFixed(1)+' -'+hr.toFixed(1)+'"/>\n')
28 abc.out_sxsy(x-wmx/2,' ',yl+hr)
32 abc.xy_str(x-wmx/3,y,cell[0])
34 abc.xy_str(x-wmx*.2,y+hr/4,cell[0])}
40 abc.xy_str(x,y-hr/3,cell[2])
42 abc.xy_str(x+wmx*.2,y-hr/4,cell[2])}}}else{abc.set_font('grid')
47 if(l.indexOf('-')<0)
50 l=l.split('-')
51 for(k=l[0]-1;k<l[1];k++){if(!chords[k])
55 nc=-nc
62 x0=img.width-img.lm-img.rm
65 yl=-1
66 y=-1+font.size*.6
68 x0=(x0/cfmt.scale-w)/2
69 …i<cells.length;i++){if(i==0||(grid.repbrk&&(bars[i].slice(-1)==':'||bars[i][0]==':'))||k>=nc){y-=hr
70 yl-=hr
77 abc.out_svg('<path class="stroke" stroke-width="1" d="\n')
78 y=-1
82 y-=hr}
85 abc.out_sxsy(x,' ',-1)
89 y=-1+font.size*.7
93 abc.out_sxsy(x-5,'" y="',y)
94 abc.out_svg('" style="font-weight:bold;font-size:'+
96 if(i==0||(grid.repbrk&&(bars[i].slice(-1)==':'||bars[i][0]==':'))||k>=nc){y-=hr;x=x0
99 if(bar.slice(-1)==':'){abc.out_svg('<text class="'+cls+'" x="')
101 abc.out_svg('" style="font-weight:bold;font-size:'+
105 var p_voice,n,font,f2
116 f2=cfmt.gsfont
118 f2.weight=font.weight
120 f2.style=font.style
121 f2.class=font.class
122 abc.add_style("\n.mid {text-anchor:middle}")