This plugin maps characters of a given font-family to their alternative
representation. For example, for the Symbol font characters might be replaced
by their Unicode equivalents.
When detecting a given font in the font-family style attribute, the
replacement for all characters inside the element will be performed
recursively — until a nested element is found that overrides the
font-family.
Upon processing, font-family style settings will be removed from the element,
if it matches the given font-family.
Configuration:
The font-name will be a full match (i.e. not partial), ignoring the case.
It is also located within a set of alternative font-families —
and again, on match, the complete font-family setting will be removed.
The replacement map has keys denoting the character code and contains the
corresponding HTML replacement to use instead. Mind that the HTML replacement
(typically entities) must be already encoded. The replacement will be taken
as is.
In addition to this, the custom replacement map might denote how to combine
with the default setting by specifying an attribute mode which defaults to
add/override but might be set to "replace" in order to specify a completely
different mapping.
Special care has been taken for the characters ampersand (&),
less-than (<) and greater-than (>): Unless you explicitly override
the replacement, it is ensured that they are also encoded after the mapping
has been applied.
This plugin maps characters of a given font-family to their alternative representation. For example, for the Symbol font characters might be replaced by their Unicode equivalents.
When detecting a given font in the font-family style attribute, the replacement for all characters inside the element will be performed recursively — until a nested element is found that overrides the font-family.
Upon processing, font-family style settings will be removed from the element, if it matches the given font-family.
Configuration:
The font-name will be a full match (i.e. not partial), ignoring the case. It is also located within a set of alternative font-families — and again, on match, the complete font-family setting will be removed.
The replacement map has keys denoting the character code and contains the corresponding HTML replacement to use instead. Mind that the HTML replacement (typically entities) must be already encoded. The replacement will be taken as is.
In addition to this, the custom replacement map might denote how to combine with the default setting by specifying an attribute
mode
which defaults to add/override but might be set to"replace"
in order to specify a completely different mapping.Special care has been taken for the characters ampersand (
&
), less-than (<
) and greater-than (>
): Unless you explicitly override the replacement, it is ensured that they are also encoded after the mapping has been applied.