W3C home > Mailing lists > Public > public-css-testsuite@w3.org > February 2017

Re: Tests with embedding, including of font resource with a @font-face rule

From: Gérard Talbot <css21testsuite@gtalbot.org>
Date: Sat, 18 Feb 2017 19:46:59 -0500
To: Chris Lilley <chris@w3.org>
Cc: Public CSS Test suite mailing list <public-css-testsuite@w3.org>
Message-ID: <8b2dc65b6fff1d81cc494ebcc72dd325@gtalbot.org>
Le 2017-02-17 13:16, Chris Lilley a écrit :
> On 2017-02-16 17:22, Gérard Talbot wrote:
>> We have a bunch of tests, scattered in several test suites, which 
>> require a special, unique font (besides Ahem font) to use, to declare 
>> in such tests. I am trying to find the best way to declare @font-face 
>> in those tests.
> 
> Assume woff 1.0 support and just link to that, because all browsers
> under test will support it. Don't use a local font, because you don't
> know it is the same font and same version.


Okay. Noted. I will not declare a local font.


>> Right now, there is no guidelines that we are all following. I would 
>> like this to be standardized, normalized. We could therefore remove, 
>> drop use of the font flag (I can not remember if the font flag is 
>> supposed to be removed anyway from now on).
> If the test uses @font-face then it doesn't need the font flag.


Then, I may have to tweaked a bunch of tests...


>> 
>> Is declaring the .woff equivalent sufficient? I do not think so,
> why not?
>> furthermore if the .woff filesize is rather big.
> So? If that is the size of the font the test requires, so be it.
> If that is a concern though, link to a woff2 as first choice with woff
> 1.0 as the fallback. Ensure these two are identical (made from the
> same ttf or otf).


Chris,

Which tool do you use to ensure that a .woff file and a .woff2 file have 
been created using the same ttf or otf?


>> 
>> Here's what I propose, in a real test
>> 
>> http://www.gtalbot.org/BrowserBugsSection/CSS3WritingModes/font-face-mplus-1p-regular-test.html 
>> , involving a font face that we are already using in a dozen tests:
>> 
>>   @font-face
>>     {
>>       font-family: "M+ 1p";
>>       src: local("M+ 1p") , /* first try to use locally available and 
>> installed M+ 1p font */
> I suggest not using a local font (unless that is the specific purpose
> of the test)
>> url("support/mplus-1p-regular.woff") format("woff") , /* otherwise 
>> download its woff equivalent */
> yup
>> url("support/mplus-1p-regular.ttf") format ("truetype") ; /* otherwise 
>> use its TrueType font */
> why?
> 
>> 
>>       /* filesize of mplus-1p-regular.woff: 803300 bytes (784.5 
>> KiloBytes) */
>> 
>>       /* filesize of mplus-1p-regular.ttf : 1571848 bytes (1.5 
>> MegaBytes) */
>> 
>>       /*
>>       mplus-1p-regular.ttf can be downloaded at, from
>> 
>>       http://mplus-webfonts.osdn.jp/
>>       */
> That sort of metadata should be in the woff.


How do you examine woff file to know that? Which tool do you use to get, 
fetch such information from a .woff file?


> 
> Also, to be clear, that extensive commenting was by way of discussion
> in this thread and not an example to follow for new tests?

The extensive commenting aspired to be an example to follow for tests. 
But, thanks to your comments and Geoffrey's comments, I will only 
include the

src: url("support/foo.woff") format("woff");

Gérard
-- 
Test Format Guidelines
http://testthewebforward.org/docs/test-format-guidelines.html

Test Style Guidelines
http://testthewebforward.org/docs/test-style-guidelines.html

Test Templates
http://testthewebforward.org/docs/test-templates.html

CSS Naming Guidelines
http://testthewebforward.org/docs/css-naming.html

Test Review Checklist
http://testthewebforward.org/docs/review-checklist.html

CSS Metadata
http://testthewebforward.org/docs/css-metadata.html
Received on Sunday, 19 February 2017 00:47:37 UTC

This archive was generated by hypermail 2.4.0 : Friday, 20 January 2023 19:58:22 UTC