Class HTMLPurifier_TagTransform_Font
Transforms FONT tags to the proper form (SPAN with CSS styling)
This transformation takes the three proprietary attributes of FONT and transforms them into their corresponding CSS attributes. These are color, face, and size.
- HTMLPurifier_TagTransform
- HTMLPurifier_TagTransform_Font
Note:
Size is an interesting case because it doesn't map cleanly to CSS. Thanks to http://style.cleverchimp.com/font_size_intervals/altintervals.html
for reasonable mappings.
Warning: This doesn't work completely correctly; specifically, this TagTransform operates before well-formedness is enforced, so the "active formatting elements" algorithm doesn't get applied.
Located at x2engine/framework/vendors/htmlpurifier/HTMLPurifier.standalone.php
Warning: This doesn't work completely correctly; specifically, this TagTransform operates before well-formedness is enforced, so the "active formatting elements" algorithm doesn't get applied.
Located at x2engine/framework/vendors/htmlpurifier/HTMLPurifier.standalone.php
public
|
#
transform(
|
prependCSS()
|
public
string
|
$transform_to | 'span' |
|
protected
array
|
$_size_lookup | array(
'0' => 'xx-small',
'1' => 'xx-small',
'2' => 'small',
'3' => 'medium',
'4' => 'large',
'5' => 'x-large',
'6' => 'xx-large',
'7' => '300%',
'-1' => 'smaller',
'-2' => '60%',
'+1' => 'larger',
'+2' => '150%',
'+3' => '200%',
'+4' => '300%'
) |