<commit_before><style type="text/css">
table.glyphs {
	border-width: 1px;
	border-spacing: 2px;
	border-style: outset;
	border-color: blue;
	border-collapse: collapse;
	background-color: white;
}
table.glyphs th {
	border-width: 1px;
	padding: 5px;
	border-style: inset;
	border-color: blue;
	background-color: white;
	-moz-border-radius: 6px 6px 6px 6px;
}
table.glyphs td {
	border-width: 1px;
	padding: 5px;
	border-style: inset;
	border-color: blue;
	background-color: white;
	-moz-border-radius: 6px 6px 6px 6px;
	font-size:150%;
	margin-top:.6em;
	text-align:center;
	color:#36F;
}
</style>
<script type="text/javascript">
function search_fonts(){
	$('#progress').html("Loading fonts list...");
    var pathname = window.location;
    var page = window.location.href;
    var silpaInstallation = page.substring(0,page.lastIndexOf('/')+1);
    var selected_scripts =$('input[name=scripts]:checked').map(function() { 
              return $(this).val();  //get the <label>'s text
            }).get();

    var jsonRequest = {
        "method" :  "modules.Webfonts.get_fonts_list",
         "params" : [selected_scripts], 
         "id" : ""
    };
    $.ajax({
        type: "POST",
        contentType: "application/json; charset=utf-8",
        url: "JSONRPC",
        data: $.toJSON(jsonRequest), 
        dataType: "json",
        success: function(msg) {
          var fonts =eval( '(' + msg.result + ')');
          
          
            // Render it
                     
            $("head").append("<style>");
            var style = $("head").children(":last");
            style.attr({
              type: "text/css"
            });
            $("#fontslistheader").html("<h2>Found "+fonts.length+ "  fonts that suits your search!<h2>")
            $("#fontslist").html("");
            for(var index in fonts){
              var font_details = fonts[index];
              var fontname;
              
              for (var key in font_details) 
                fontname = key;
              var css_link = pathname + "?font="+fontname;
              css_link=css_link.replace("#","");
              $("head").append("<link>");
              css = $("head").children(":last");
              css.attr({
                rel: "stylesheet",
                type: "text/css",
                href: css_link
              });

              style.append("."+ font_details +"{ font-family:"+ fontname +",sans; font-size: 16px;}");
              var fontdetailmarkup="";
              fontdetailmarkup+="<div id='fontdetail"+fontname+"' class='featurebox'>";
              fontdetailmarkup+="</div>";
              $("#fontslist").append(fontdetailmarkup)
              fontdetailmarkup="<div id='"+fontname+"' style='float: left;width: 500px;padding:20px;' >";
              fontdetailmarkup+="<h1 style='font-family:"+fontname+",sans;'>" + font_details[fontname]['Name']+"</h1>";
              fontdetailmarkup+="<div>License: "+font_details[fontname]['License']+"</div>";
              fontdetailmarkup+="<div>Author: "+font_details[fontname]['Author']+"</div>";
              fontdetailmarkup+="<div>Scripts Supported: "+font_details[fontname]['Scripts']+"</div>";
              fontdetailmarkup+="<div>Family Contains: "+font_details[fontname]['Variants']+"</div>";
              fontdetailmarkup+="</div>";
              fontdetailmarkup+="<div style='float: left;width: 150px;padding:20px;'>";
              fontdetailmarkup+="<a  onClick=preview('"+fontname+"');>Preview</a><br/>";
              fontdetailmarkup+="<a onClick=glyphs('"+font_details[fontname]['Glyphs']+"','"+fontname+"');>View All Glyphs</a><br/>";
              fontdetailmarkup+="<a onClick=embed('"+css_link+"','"+fontname+"');>Embed</a><br/>";
              fontdetailmarkup+="</div><div style='clear:both;'></div>";
              fontdetailmarkup+="<div id='preview"+fontname+"' style='clear:both;'>";
              fontdetailmarkup+="</div>";
              fontdetailmarkup+="<div id='glyphs"+fontname+"' style='clear:both;'>";
              fontdetailmarkup+="</div>";
              fontdetailmarkup+="<div id='credits"+fontname+"' style='clear:both;'>";
              fontdetailmarkup+="</div>";
			  fontdetailmarkup+="<div id='embed"+fontname+"' style='clear:both;'>";
              fontdetailmarkup+="</div>";
              $("#fontdetail"+fontname).append(fontdetailmarkup)
            }
           
            
            $('#progress').html("" );
        },
        error: function(msg) { alert(msg); }
    });
    return false;
}    

function preview(fontname){
 var previewmarkup="<textarea id='previewtext"+fontname+"'></textarea>";
 $("#preview"+fontname).html(previewmarkup);
 $("#previewtext"+fontname).css('font-family', fontname) ;
 $("#previewtext"+fontname).css('font-size', '14px');
 return false;
}

function glyphs(range, fontname){
 var start = range.split(":") [0]	;
 var end = range.split(":") [1]	;
 var tablemarkup='';
 tablemarkup="<table class='glyphs' cols=8 width=100% border=1px id='glyphtable"+fontname+"' ><tr>";
 var cols=0;
 for(var i=start; i<=end;i++){
		cols++;
		tablemarkup+="<td width=12.5%>&#"+ i  +";</td>";
		if(cols%8==0)	{
			tablemarkup+="</tr><tr>";
			cols=0;
		}	
 }
 tablemarkup+="</tr></table>";<commit_msg>fixng show glyphs bug for english fonts<commit_after><style type="text/css">
table.glyphs {
	border-width: 1px;
	border-spacing: 2px;
	border-style: outset;
	border-color: blue;
	border-collapse: collapse;
	background-color: white;
}
table.glyphs th {
	border-width: 1px;
	padding: 5px;
	border-style: inset;
	border-color: blue;
	background-color: white;
	-moz-border-radius: 6px 6px 6px 6px;
}
table.glyphs td {
	border-width: 1px;
	padding: 5px;
	border-style: inset;
	border-color: blue;
	background-color: white;
	-moz-border-radius: 6px 6px 6px 6px;
	font-size:150%;
	margin-top:.6em;
	text-align:center;
	color:#36F;
}
</style>
<script type="text/javascript">
function search_fonts(){
	$('#progress').html("Loading fonts list...");
    var pathname = window.location;
    var page = window.location.href;
    var silpaInstallation = page.substring(0,page.lastIndexOf('/')+1);
    var selected_scripts =$('input[name=scripts]:checked').map(function() { 
              return $(this).val();  //get the <label>'s text
            }).get();

    var jsonRequest = {
        "method" :  "modules.Webfonts.get_fonts_list",
         "params" : [selected_scripts], 
         "id" : ""
    };
    $.ajax({
        type: "POST",
        contentType: "application/json; charset=utf-8",
        url: "JSONRPC",
        data: $.toJSON(jsonRequest), 
        dataType: "json",
        success: function(msg) {
          var fonts =eval( '(' + msg.result + ')');
          
          
            // Render it
                     
            $("head").append("<style>");
            var style = $("head").children(":last");
            style.attr({
              type: "text/css"
            });
            $("#fontslistheader").html("<h2>Found "+fonts.length+ "  fonts that suits your search!<h2>")
            $("#fontslist").html("");
            for(var index in fonts){
              var font_details = fonts[index];
              var fontname;
              
              for (var key in font_details) 
                fontname = key;
              var css_link = pathname + "?font="+fontname;
              css_link=css_link.replace("#","");
              $("head").append("<link>");
              css = $("head").children(":last");
              css.attr({
                rel: "stylesheet",
                type: "text/css",
                href: css_link
              });

              style.append("."+ font_details +"{ font-family:"+ fontname +",sans; font-size: 16px;}");
              var fontdetailmarkup="";
              fontdetailmarkup+="<div id='fontdetail"+fontname+"' class='featurebox'>";
              fontdetailmarkup+="</div>";
              $("#fontslist").append(fontdetailmarkup)
              fontdetailmarkup="<div id='"+fontname+"' style='float: left;width: 500px;padding:20px;' >";
              fontdetailmarkup+="<h1 style='font-family:"+fontname+",sans;'>" + font_details[fontname]['Name']+"</h1>";
              fontdetailmarkup+="<div>License: "+font_details[fontname]['License']+"</div>";
              fontdetailmarkup+="<div>Author: "+font_details[fontname]['Author']+"</div>";
              fontdetailmarkup+="<div>Scripts Supported: "+font_details[fontname]['Scripts']+"</div>";
              fontdetailmarkup+="<div>Family Contains: "+font_details[fontname]['Variants']+"</div>";
              fontdetailmarkup+="</div>";
              fontdetailmarkup+="<div style='float: left;width: 150px;padding:20px;'>";
              fontdetailmarkup+="<a  onClick=preview('"+fontname+"');>Preview</a><br/>";
              fontdetailmarkup+="<a onClick=glyphs('"+font_details[fontname]['Glyphs']+"','"+fontname+"');>View All Glyphs</a><br/>";
              fontdetailmarkup+="<a onClick=embed('"+css_link+"','"+fontname+"');>Embed</a><br/>";
              fontdetailmarkup+="</div><div style='clear:both;'></div>";
              fontdetailmarkup+="<div id='preview"+fontname+"' style='clear:both;'>";
              fontdetailmarkup+="</div>";
              fontdetailmarkup+="<div id='glyphs"+fontname+"' style='clear:both;'>";
              fontdetailmarkup+="</div>";
              fontdetailmarkup+="<div id='credits"+fontname+"' style='clear:both;'>";
              fontdetailmarkup+="</div>";
			  fontdetailmarkup+="<div id='embed"+fontname+"' style='clear:both;'>";
              fontdetailmarkup+="</div>";
              $("#fontdetail"+fontname).append(fontdetailmarkup)
            }
           
            
            $('#progress').html("" );
        },
        error: function(msg) { alert(msg); }
    });
    return false;
}    

function preview(fontname){
 var previewmarkup="<textarea id='previewtext"+fontname+"'></textarea>";
 $("#preview"+fontname).html(previewmarkup);
 $("#previewtext"+fontname).css('font-family', fontname) ;
 $("#previewtext"+fontname).css('font-size', '14px');
 return false;
}

function glyphs(range, fontname){
 var start = range.split(":") [0]	;
 var end = range.split(":") [1]	;
 var tablemarkup='';
 tablemarkup="<table class='glyphs' cols=8 width=100% border=1px id='glyphtable"+fontname+"' ><tr>";
 var cols=0;
 start = start*1;
 end = end*1;
 for(var i=start; i<=end;i++){
		cols++;
		tablemarkup+="<td width=12.5%>&#"+ i  +";</td>";
		if(cols%8==0)	{
			tablemarkup+="</tr><tr>";
			cols=0;
		}	
 }
 tablemarkup+="</tr></table>";
{'fraction_non_alphanumeric': 0.19697256385998108, 'fraction_numerical': 0.010596026490066225, 'mean_word_length': 2.707821816906349, 'pattern_counts': {'":': 8, '<': 111, '<?xml version=': 0, '>': 109, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6255324', 'n_tokens_mistral': 3470, 'n_tokens_neox': 3334, 'n_words': 547}