Lines Matching refs:text

281 function deco_def(nm){var a,dd,dd2,name2,c,i,elts,str,hd,text=decos[nm]
282 if(!text){if(cfmt.decoerr)
285 a=text.match(/(\d+)\s+(.+?)\s+([0-9.,]+)\s+([0-9.]+)\s+([0-9.]+)/)
300 if(h>50||wl>80||wr>80){error(1,null,"%%deco: abnormal h/wl/wr value '$1'",text)
307 dd.wl=wl;dd.wr=wr;str=text.replace(a[0],'').trim()
578 if(s1.text){wh=strwh(s1.text);y2=y_get(p_voice.st,true,s1.x+4,wh[0])+
611 delete p_voice.bar_start.text;p_voice.bar_start.rbstart=1
613 if(s1.text)
614 xy_str(x+4,y2-gene.curfont.size-3,s1.text);xypath(x,y2);if(s1.rbstart==2)
693 x=s.x-w*(s.text?.6:.4)
735 w=strwh(s.text)[0];y=y_get(st,true,s.x-10,w+3)
743 s.x-=10;if(user.anno_start||user.anno_stop){w=strwh(s.text)[0];s.wl=0;s.wr=w;s.ymn=-ht-h;s.ymx=s.ymn+h;anno_start(s)}
744 xy_str(s.x,2-ht-h,s.text);anno_stop(s)
765 delete s.extra;delete s.text
1038 <g transform="translate(X,Y)" text-anchor="middle">\n\
1039 <text y="-12">A</text>\n\
1040 <text>B</text>\n\
1042 <text x="X" y="Y" text-anchor="middle">A</text>\n',x,y+12,m_gl(meter.top))}}}
2217 case C.MREST:set_scale(s);x+=32;anno_start(s);xygl(x,staff_tb[s.st].y+12,"mrest");out_XYAB('<text style="font:bold 15px serif"\n\
2218 x ="X" y="Y" text-anchor="middle">A</text>\n',x,staff_tb[s.st].y+28,s.nmes);anno_a.push(s)
3126 function tosvg(in_fname,file,bol,eof){var i,c,eol,end,select,line0,line1,last_info,opt,text,a,b,s,pscom,txt_add='\n'
3169 text=file.slice(bol)
3171 text=file.slice(bol,eol);a=text.match(/\S+/)
3172 switch(a[0]){default:opt[select].push(uncomment(text,true))
3226 text=file.slice(bol,eol)
3227 a=text.match(/([^\s]+)\s*(.*)/)
3243 select=uncomment(text.slice(7))
3264 text=file.slice(bol)
3266 text=file.slice(bol,eol);a=text.match(/([^\s]+)\s*(.*)/)
3270 default:opt.t_opts.push(uncomment(text,true))
3283 self.do_pscom(uncomment(text,true))
3298 text=uncomment(file.slice(bol,eol),line0)
3306 sav.char_tb=clone(char_tb);sav.glovar=clone(glovar);sav.maps=clone(maps,1);sav.mac=clone(mac);sav.maci=clone(maci);info.X=text;parse.state=1
3314 info.T=text
3316 info.T+="\n"+text
3318 s=new_block("title");s.text=text
3321 case 1:info.K=text
3323 do_info(line0,text)
3328 info.W=text
3330 info.W+=txt_add+text
3334 a=text.match(/(.*?)[= ]+(.*)/)
3341 get_sym(text,txt_add==' ')
3345 get_lyrics(text,txt_add==' ')
3346 if(text.slice(-1)=='\\'){txt_add=' ';last_info=line0
3351 parse.line.buffer=text
3357 info[line0]=text
3359 info[line0]+=txt_add+text
3361 do_info(line0,text)
3624 s0=s;w0=ch.text.wh[0];n=0;x=0
3628 switch(gch.type){case'<':w=gch.text.wh[0]+wlnote
3632 case'>':w=gch.text.wh[0]+s.wr
3721 if(s.text&&s.text.length<4&&s.next&&s.next.a_gch){set_font("repeat");s.wr+=strwh(s.text)[0]+2
4048 while(s1!=so){if(s1.bar_type&&(s1.bar_type.slice(-1)==':'||s1.text)&&s1.bar_type!=':'){new_type(s1)
4059 if(s1.text){s2.invis=true
4060 delete s1.text
5334 user.img_out(s.text)
5345 case"text":set_font(s.font)
5346 write_text(s.text,s.opt)
5348 case"title":write_title(s.text,true)
5915 function new_tempo(text){var i,c,d,nd,txt=text,s={type:C.TEMPO,dur:0}
5925 if(text[0]=='"'){c=text.match(/"([^"]*)"/)
5929 text=text.slice(c[0].length).replace(/^\s+/,'')}
5930 if(text.slice(-1)=='"'){i=text.indexOf('"')
5931 s.tempo_str2=text.slice(i+1,-1)
5932 text=text.slice(0,i).replace(/\s+$/,'')}
5933 i=text.indexOf('=')
5934 if(i>0){d=text.slice(0,i).split(/\s+/)
5935 text=text.slice(i+1).replace(/^\s+/,'')
5945 if(text.slice(0,4)=="ca. "){s.tempo_ca='ca. '
5946 text=text.slice(4)}
5947 i=text.indexOf('/')
5948 if(i>0){nd=get_nd(text)
5951 s.new_beat=nd}else{s.tempo=Number(text)
5961 function do_info(info_type,text){var s,d1,d2,a,vid
5964 switch(info_type){case'I':self.do_pscom(text)
5967 goto_tune();a=text.match(/^1\/(\d+)(=(\d+)\/(\d+))?$/)
5973 d2=d2?Number(a[3])/d2*C.BLEN:0}else{d2=d1}}else if(text=="auto"){d1=d2=-1}
5978 case'M':new_meter(text)
5980 case'U':set_user(text)
5984 if(parse.state==1){info.P=text
5988 s={type:C.PART,text:text,dur:0}
5995 new_tempo(text)
5997 case'V':get_voice(text)
6003 get_key(text)
6006 info[info_type]=text
6008 info[info_type]+='\n'+text
6012 s={type:C.REMARK,text:text,dur:0}
6069 if(c>'0'&&c<='9'){s.text=c
6073 s.text+=c}
6074 s.rbstop=2;s.rbstart=2}else if(c=='"'&&bar_type.slice(-1)=='['){s.text=""
6080 s.text+=c}
6090 if(s.text){if(bar_type.slice(-1)=='['&&bar_type!='[')
6092 if(s.text[0]=='1'){if(curvoice.tie_s)
6105 if(s2&&s2.time==curvoice.time){if(s2&&s2.type==C.BAR){if(bar_type=="["&&!s2.text&&(curvoice.st==0||(par_sy.staves[curvoice.st-1].flags&STOP_BAR)||s.norepbra)){if(s.text)
6106 s2.text=s.text
6135 if(s.rbstart&&!curvoice.norepbra&&curvoice.st>0&&!(par_sy.staves[curvoice.st-1].flags&STOP_BAR)){s2={type:C.BAR,fname:s.fname,istart:s.istart,iend:s.iend,bar_type:"[",multi:0,invis:true,text:s.text,rbstart:2}
6137 delete s.text;s.rbstart=0}
6195 function info_split(text){if(!text)
6197 var a=text.match(/[^\s"=]+=?|"[^"]+"/g)
6285 for(s=enote.s.prev;s;s=s.prev){if(s.type==C.BAR&&s.bar_type[0]==':'&&s.text){if(!s.sls)
6571 function parse_seq(in_mac){var c,idx,type,k,s,dcn,i,n,text,note
6679 text=line.buffer.slice(line.index+3,i).trim()
6680 parse.istart=parse.bol+line.index;parse.iend=parse.bol+ ++i;line.index=0;do_info(c_next,text);line.index=i
6787 if(!el){abc2svg.eltxt=el=document.createElement('text')
6873 output+='<text class="'+font_class(gene.curfont)
6876 switch(action){case'c':x-=wh[0]/2;output+='" text-anchor="middle">'
6880 case'r':x-=wh[0];output+='" text-anchor="end">'
6884 out_str(str);output+="</text>\n"}
6920 function write_text(text,action){if(action=='s')
6927 while(1){i=text.indexOf('\n',j)
6928 if(i<0){str=str2svg(text.slice(j))
6934 while(text[i+1]=='\n'){vskip(lineskip);i++}
6935 if(i==text.length)
6936 break}else{str=str2svg(text.slice(j,i))
6943 while(1){i=text.indexOf('\n\n',j)
6945 words=text.slice(j)
6947 words=text.slice(j,i);words=words.split(/\s+/);w=k=0
6961 while(text[i+2]=='\n'){vskip(lineskip);i++}
6962 if(i==text.length)
7184 function defs_add(text){var i,j,gl,tag,is,ie=0
7185 text=text.replace(/<!--.*?-->/g,'')
7186 while(1){is=text.indexOf('<',ie);if(is<0)
7188 i=text.indexOf('id="',is)
7191 i+=4;j=text.indexOf('"',i);if(j<0)
7193 gl=text.slice(i,j);ie=text.indexOf('>',j);if(ie<0)
7195 if(text[ie-1]=='/'){ie++}else{i=text.indexOf(' ',is);if(i<0)
7197 tag=text.slice(is+1,i);ie=text.indexOf('</'+tag+'>',ie)
7201 if(text.substr(is,7)=='<filter')
7202 fulldefs+=text.slice(is,ie)+'\n'
7204 glyphs[gl]=text.slice(is,ie)}}
7249 function delayed_update(){var st,new_out,text
7327 output+='<text x="'+v.join(',')
7334 output+='"\n>'+gla[2]+'</text>\n'
7347 if(tgl.sc){out_XYAB('<text transform="translate(X,Y) scale(A)">B</text>\n',x,y,tgl.sc,tgl.c)}else{gla[0].push(sx(x))
7352 function out_brace(x,y,h){x+=posx-6;y=posy-y;h/=24;output+='<text transform="translate('+
7353 x.toFixed(1)+','+y.toFixed(1)+') scale(2.5,'+h.toFixed(2)+')">'+tgls.brace.c+'</text>\n'}
7401 var deco_str_style={crdc:{dx:0,dy:5,style:'font:italic 14px serif'},dacs:{dx:0,dy:3,style:'font:16px serif',anchor:' text-anchor="middle"'},fng:{dx:0,dy:1,style:'font-family:Bookman; font-size:8px',anchor:' text-anchor="middle"'},pf:{dx:0,dy:5,style:'font:italic bold 16px serif'},'@':{dx:0,dy:5,style:'font: 12px sans-serif'}}
7406 out_XYAB('<text x="X" y="Y" class="A"B>',x,y,name,a_deco.anchor||"");set_font("annotation");out_str(str);output+='</text>\n'}
7427 function out_8va(x,y,val,defl){if(!defl.nost){out_XYAB('<text x="X" y="Y" \
7429 <tspan dy="-4" style="font-size:10px">va</tspan></text>\n',x-8,y);x+=12;val-=12}else{val-=5}
7433 function out_8vb(x,y,val,defl){if(!defl.nost){out_XYAB('<text x="X" y="Y" \
7435 <tspan dy="-4" style="font-size:10px">vb</tspan></text>\n',x-8,y);x+=4;val-=4}else{val-=5}
7439 function out_15ma(x,y,val,defl){if(!defl.nost){out_XYAB('<text x="X" y="Y" \
7441 <tspan dy="-4" style="font-size:10px">ma</tspan></text>\n',x-10,y);x+=20;val-=20}else{val-=5}
7445 function out_15mb(x,y,val,defl){if(!defl.nost){out_XYAB('<text x="X" y="Y" \
7447 <tspan dy="-4" style="font-size:10px">mb</tspan></text>\n',x-10,y);x+=7;val-=7}else{val-=5}
7530 output+='<text class="'+font_class(gene.curfont)+'" x="'
7532 output+='">'+s.tempo_str+'</text>\n'
7558 font_class(font)+' text,tspan{fill:currentColor}'+
7753 if(s.text){if(!cfmt.contbarnb){if(s.text[0]=='1')
7767 if(s.text){if(s.text[0]=='1'){if(cfmt.contbarnb)
7795 function get_map(text){if(!text)
7797 var i,note,notes,map,tmp,ns,ty='',a=text.split(/\s+/)
7923 Abc.prototype.do_pscom=function(text){var h1,val,s,cmd,param,n,k,b
7924 cmd=text.match(/(\w|-)+/)
7929 param=text.replace(cmd,'').trim()
7933 switch(cmd){case"center":set_font("text")
7934 if(parse.state>=2){s=new_block("text");s.text=param
8054 if(parse.scores&&parse.scores.length>0){text=parse.scores.shift();cmd=text.match(/([^\s]+)\s*(.*)/);get_staves(cmd[1],cmd[2])}else{get_staves(cmd,param)}
8062 case"text":set_font("text")
8063 if(parse.state>=2){s=new_block(cmd);s.text=param
8110 Abc.prototype.do_begin_end=function(type,opt,text){var i,j,action,s
8111 switch(type){case"js":js_inject(text)
8113 case"ml":if(parse.state>=2){s=new_block(type);s.text=text}else{blk_flush()
8115 user.img_out(text)}
8118 while(1){i=text.indexOf('<style',j)
8121 i=text.indexOf('>',i)
8122 j=text.indexOf('</style>',i)
8125 style+=text.slice(i+1,j).replace(/\s+$/,'')}
8127 while(1){i=text.indexOf('<defs>\n',j)
8130 j=text.indexOf('</defs>',i)
8133 defs_add(text.slice(i+6,j))}
8135 case"text":action=get_textopt(opt);if(!action)
8137 set_font("text")
8138 if(parse.state>=2){s=new_block(type);s.text=text
8142 write_text(text,action)
8492 function get_lyrics(text,cont){var s,word,p,i,j,ly,dfnt
8506 p=text;i=0
8710 function parse_gchord(type){var c,text,gch,x_abs,y_abs,type,i,j,istart,iend,ann_font=get_font("annotation"),h_ann=ann_font.size,line=parse.line
8712 while(1){c=text[i++]
8717 if(type.length>1){text=type.slice(1,-1);iend=istart+1}else{i=++line.index
8724 text=cnv_escape(line.buffer.slice(line.index,j))
8730 while(1){c=text[i]
8733 gch={text:"",istart:istart,iend:iend,font:ann_font}
8748 while(1){c=text[i]
8751 switch(c){case'\\':c=text[++i]
8754 gch.text+='\\'
8755 default:gch.text+=c;i++
8757 case'&':while(1){gch.text+=c;c=text[++i]
8761 if(c==';'){i++;gch.text+=c
8767 gch.otext=gch.text
8791 gch.text=gch_tr1(gch.text,curvoice.vtransp)}}
8796 if(gch.type=='g'){gch.text=gch.text.replace(/##|#|=|bb|b| /g,function(x){switch(x){case'##':return"&#x1d12a;"
8802 gch.text=str2svg(gch.text)
8803 gch.text.wh=[0,0]
8805 set_font(gch.font);gch.text=str2svg(gch.text)
8806 wh=gch.text.wh
8828 Abc.prototype.draw_gchord=function(i,s,x,y){var y2,an=s.a_gch[i],h=an.font.size,pad=an.font.pad,w=an.text.wh[0]+pad*2
8865 xy_str(x,y,an.text)
8880 w=an.text.wh[0]
8896 w=an.text.wh[0]
8914 w=an.text.wh[0]