RE: Private Use are of font

Thanks for this reply.

 

“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.”

 

I realise of course that the validator does not look to see if the “private use” code point is used in the context of a specific font which has been embedded in the web site.

 

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

But in the case here, the private use code point is far from meaningless!    It means the code point with the glyph very specifically defined in the very specific font, which has been embedded in the HTML, so that it is accessible to any HTML-compliant reading of the file.  It is completely unambiguous, and there is no question of any necessary “private agreement”.

So my question was – could the validator be made not to give that specific warning in that specific case.

 

“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.”

If we’re validating against HTML5, then surely style sheets and font-embedding are part of the specification we’re validating against?     (I have indeed been ignoring the warning; I just felt it was inappropriate in this particular case.)



Dave

 

PS  And BTW in this case the use of this code-point is not a unique specification: there’s a specification called SMuFL – I think it has a presence somewhere in W3C - which places hundreds of music symbols at private use area code points.   It would be nice to be able to use SMuFL-compliant fonts without warnings.

 

 

From: Jukka K. Korpela <jukkakk@gmail.com> 
Sent: 04 November 2020 20:39
To: dave@mozart.co.uk
Cc: W3C WWW Validator <www-validator@w3.org>
Subject: Re: Private Use are of font

 

dave@mozart.co.uk <mailto: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 23:58:09 UTC