Files
luos/thirdparty/html2ps_pdf/css.font-weight.inc.php
Paula Quispe 9eb7d6cac2 HOR-2689
2017-08-03 17:00:30 -04:00

40 lines
667 B
PHP

<?php
class CSSFontWeight extends CSSSubFieldProperty {
function default_value() {
return WEIGHT_NORMAL;
}
function parse($value) {
switch (trim(strtolower($value))) {
case 'inherit':
return CSS_PROPERTY_INHERIT;
case 'bold':
case '700':
case '800':
case '900':
case 'bolder':
return WEIGHT_BOLD;
case 'lighter':
case 'normal':
case '100':
case '200':
case '300':
case '400':
case '500':
case '600':
default:
return WEIGHT_NORMAL;
};
}
function getPropertyCode() {
return CSS_FONT_WEIGHT;
}
function getPropertyName() {
return 'font-weight';
}
}
?>