Skip to content
Snippets Groups Projects
Commit 0f81fe99 authored by Koichi Yasuoka's avatar Koichi Yasuoka
Browse files

Direction=RtoL

parent d783a927
No related branches found
No related tags found
No related merge requests found
...@@ -65,6 +65,14 @@ conllusvg.writeNodesSVG=function(textid){ ...@@ -65,6 +65,14 @@ conllusvg.writeNodesSVG=function(textid){
t.setAttribute("stroke","none"); t.setAttribute("stroke","none");
if(c.nodes[n].misc.indexOf("FontStyle=Italic")>=0) if(c.nodes[n].misc.indexOf("FontStyle=Italic")>=0)
t.setAttribute("font-style","oblique"); t.setAttribute("font-style","oblique");
if(c.nodes[n].misc.indexOf("Direction=LtoR")>=0){
t.setAttribute("unicode-bidi","bidi-override");
t.setAttribute("direction","ltr");
}
if(c.nodes[n].misc.indexOf("Direction=RtoL")>=0){
t.setAttribute("unicode-bidi","bidi-override");
t.setAttribute("direction","rtl");
}
g.appendChild(t); g.appendChild(t);
w=t.getBBox().width; w=t.getBBox().width;
if(w>90){ if(w>90){
......
// CoNLL-U SVG Viewer by Koichi Yasuoka, September 14, 2020. // CoNLL-U SVG Viewer by Koichi Yasuoka, September 19, 2020.
// Nos. 1, 2, 4, 5, 7, 8 and 10 columns are used. // Nos. 1, 2, 4, 5, 7, 8 and 10 columns are used.
"use strict"; "use strict";
var conllusvg=new Object(); var conllusvg=new Object();
...@@ -505,6 +505,14 @@ conllusvg.writeNodesSVG=function(textid){ ...@@ -505,6 +505,14 @@ conllusvg.writeNodesSVG=function(textid){
t.setAttribute("stroke","none"); t.setAttribute("stroke","none");
if(c.nodes[n].misc.indexOf("FontStyle=Italic")>=0) if(c.nodes[n].misc.indexOf("FontStyle=Italic")>=0)
t.setAttribute("font-style","oblique"); t.setAttribute("font-style","oblique");
if(c.nodes[n].misc.indexOf("Direction=LtoR")>=0){
t.setAttribute("unicode-bidi","bidi-override");
t.setAttribute("direction","ltr");
}
if(c.nodes[n].misc.indexOf("Direction=RtoL")>=0){
t.setAttribute("unicode-bidi","bidi-override");
t.setAttribute("direction","rtl");
}
g.appendChild(t); g.appendChild(t);
w=t.getBBox().width; w=t.getBBox().width;
if(w>90){ if(w>90){
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment