Re: Private Use are of font

dave@mozart.co.uk wrote:

The HTML validator gave me a warning that the “Private Use Area” of a font
> should not be used in a document.
>

It’s not about a font. The markup validator does not even look at your CSS
code for setting fonts, still less at the actual font. The warning is about
the use of a Private Use code point. By definitions external to HTML,
namely the Unicode Standard, Private Use code points are not allocated and
will never be allocated to any character by the standard. They may be used
by conventions between interested parties, and of course such conventions
may be incompatible with conventions that other parties might agree on.


>    But in this case the HTML used was
>
> <span style="font-family:MZ-Limelight;">B&#x266D;&#xE871;7</span>
>

The content of the element contains a Private Use codepoint, which is
meaningless except by a private agreement.

And this font has precisely the correct private use glyph.
>

By “the correct private use glyph”, you mean the graphic symbol you want to
display and expect to be displayed, due to the characteristics of a
particular font. It’s not “the correct glyph” in any other sense. Other
fonts may place other glyphs there, or no glyph.

When your HTML document is accessed by a user agent that does not support
style sheets, or has been configured not to obey author style sheets, or
has a setting for overriding author’s font family settings, or does not
support different fonts at all, or has the use of embedded fonts disabled,
then the content of the <span> element contains an undefined symbol, which
may appear in different ways (e.g., a question mark in a box). If you think
this is ignorable, ignore the warning.

P.S. Fonts use Private Use code points for various purposes, such as a
rendering a symbol that has not yet been coded as a Unicode character. It
may happen that when it is so coded, the glyph will be assigned to the code
point allocated. Depending on the symbol and the font, the symbol might
actually be available that way.

Yucca, http://jkorpela.fi/

Received on Wednesday, 4 November 2020 20:39:24 UTC