<commit_before>var panose = require('./panose.js');

module.exports = function (fontFaceTag) {
	var obj = {};
	
	for (var i = 0; i < fontFaceTag.attributes.length; i++) {
		var attr = fontFaceTag.attributes.item(i);
		
		switch (attr.name) {
			case "id":
				obj.id = attr.value;
				break;
			case "font-family": 
				obj.family = attr.value;
				break;
			case "font-style":
				obj.style = attr.value.split(",");
				break;
			case "font-variant":
				obj.variant = attr.value.split(",");
				break;
			case "font-weight":
				obj.weight = attr.value.split(",");
				break;
			case "font-stretch":
				obj.stretch = attr.value.split(",");
				break;
			case "font-size":
				obj.size = attr.value;
				break;
			case "unicode-range":
				obj.unicodeRange = attr.value.split(",");
				break;
			case "units-per-em":
				obj.unitsPerEm = Number(attr.value);
				break;
			case "panose-1":
				obj.panose = panose(attr.value.split(' ').map(function(val) { return Number(val); }));
				break;
			case "stemv":
				obj.stemv = Number(attr.value);
				break;
			case "stemh":
				obj.stemh = Number(attr.value);
				break;
			case "slope":
				obj.slope = Number(attr.value);
				break;
			case "cap-height":
				obj.capHeight = Number(attr.value);
				break;
			case "x-height":
				obj.xHeight = Number(attr.value);
				break;
			case "accent-height":
				obj.accentHeight = Number(attr.value);
				break;
			case "ascent":
				obj.ascent = Number(attr.value);
				break;
			case "descent":
				obj.descent = Number(attr.value);
				break;
			case "widths":
				obj.widths = attr.value;
				break;
			case "bbox":
				obj.boundingBox = attr.value.split(',').map(function(val) { return Number(val); });
				break;
			case "idegraphic":
				obj.horizontal = obj.horizontal || {};
				obj.horizontal.ideographic = Number(attr.value);
				break;
			case "alphabetic":
				obj.horizontal = obj.horizontal || {};
				obj.horizontal.alphabetic = Number(attr.value);
				break;
			case "mathematical":
				obj.horizontal = obj.horizontal || {};<commit_msg>Fix bounding box property<commit_after>var panose = require('./panose.js');

module.exports = function (fontFaceTag) {
	var obj = {};
	
	for (var i = 0; i < fontFaceTag.attributes.length; i++) {
		var attr = fontFaceTag.attributes.item(i);
		
		switch (attr.name) {
			case "id":
				obj.id = attr.value;
				break;
			case "font-family": 
				obj.family = attr.value;
				break;
			case "font-style":
				obj.style = attr.value.split(",");
				break;
			case "font-variant":
				obj.variant = attr.value.split(",");
				break;
			case "font-weight":
				obj.weight = attr.value.split(",");
				break;
			case "font-stretch":
				obj.stretch = attr.value.split(",");
				break;
			case "font-size":
				obj.size = attr.value;
				break;
			case "unicode-range":
				obj.unicodeRange = attr.value.split(",");
				break;
			case "units-per-em":
				obj.unitsPerEm = Number(attr.value);
				break;
			case "panose-1":
				obj.panose = panose(attr.value.split(' ').map(function(val) { return Number(val); }));
				break;
			case "stemv":
				obj.stemv = Number(attr.value);
				break;
			case "stemh":
				obj.stemh = Number(attr.value);
				break;
			case "slope":
				obj.slope = Number(attr.value);
				break;
			case "cap-height":
				obj.capHeight = Number(attr.value);
				break;
			case "x-height":
				obj.xHeight = Number(attr.value);
				break;
			case "accent-height":
				obj.accentHeight = Number(attr.value);
				break;
			case "ascent":
				obj.ascent = Number(attr.value);
				break;
			case "descent":
				obj.descent = Number(attr.value);
				break;
			case "widths":
				obj.widths = attr.value;
				break;
			case "bbox":
				obj.boundingBox = attr.value.split(' ').map(function(val) { return Number(val); });
				break;
			case "idegraphic":
				obj.horizontal = obj.horizontal || {};
				obj.horizontal.ideographic = Number(attr.value);
				break;
			case "alphabetic":
				obj.horizontal = obj.horizontal || {};
				obj.horizontal.alphabetic = Number(attr.value);
				break;
			case "mathematical":
				obj.horizontal = obj.horizontal || {};
{'fraction_non_alphanumeric': 0.16772151898734178, 'fraction_numerical': 0.0009737098344693282, 'mean_word_length': 2.7870967741935484, 'pattern_counts': {'":': 46, '<': 5, '<?xml version=': 0, '>': 3, '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': '3279743', 'n_tokens_mistral': 1815, 'n_tokens_neox': 1423, 'n_words': 290}