Skip to content

Attempt to fix the font-feature-settings-rendering-2.html test - #11006

Closed
foolip wants to merge 1 commit into
masterfrom
font-feature-settings-rendering-2
Closed

foolip wants to merge 1 commit into
masterfrom
font-feature-settings-rendering-2

Conversation

@foolip

@foolip foolip commented May 15, 2018 •

Copy link
Copy Markdown
Member

Both the test and its ref was in support/fonts/ which doesn't make
sense. Move the test and ref and make some changes in the direction of
fixing it. It still doesn't pass in Chrome or Firefox.

Discovered in #11004.

Both the test and its ref was in support/fonts/ which doesn't make
sense. Move the test and ref and make some changes in the direction of
fixing it. It still doesn't pass in Chrome or Firefox.

Discovered in #11004.
@foolip

foolip commented May 15, 2018

Copy link
Copy Markdown
Member Author

@svgeesus can you help review this? It's from commit 5e10afd but still doesn't work with these changes. In Chrome, there's a console message about the font not parsing correctly. The test also doesn't work in Firefox, but no console message.

@svgeesus

Copy link
Copy Markdown
Contributor

Okay, I looked into this. These two files were not intended to be WebPlatform tests. They were just used in developing the special-purpose font used for a lot of CSS Fonts 3 tests. This font was originally developed as an internal test font for Safari (which is why it uses a webkit-specific property, and also why it doesn't work well except on OSX). FontWithFeatures.otf was further developed into FontWithFeatures2.otf (which also works on Linux and Windows) and eventually FontWithFancyFeatures.otf which is what the WPT tests use.

I modified a local copy of this test, as follows:

@font-face {
    font-family: "FontFeaturesTest";
    src: url("FontWithFancyFeatures.otf") format("opentype");
}

and

function addElement(feature, c) {
    var wrapper=document.createElement("div");
    ["0", "1"].forEach(function(state) {
        var element = document.createElement("span");
        element.textContent = c;
        element.style.fontFamily = "FontFeaturesTest";
        element.style.fontFeatureSettings = '"' + feature + '" ' + state;
        wrapper.appendChild(element);
    });
    insertionpoint.appendChild(wrapper);
    insertionpoint.appendChild(document.createTextNode(" "));
}

The test then ran correctly in Firefox, up to the letter P, then failed. Looking at the old font and the current one, I see the glyph indexes changed during development.

Basically these two tests can be deleted. Their actual functionality is covered by other tests. If it is thought valuable to test all the font-feature-settings in one test, I could submit that test later (the newest font tests more than the original font did).

I have a test for the new font here which documents the character to opentype feature mapping for FontWithFancyFeatures.otf.

foolip added a commit that referenced this pull request May 21, 2018
Because the "test" is in support/fonts/ it has not been run as a test.

See #11006 (comment)
for where these came from and why they can be deleted.
@foolip

foolip commented May 21, 2018

Copy link
Copy Markdown
Member Author

Thanks @svgeesus! I've sent #11086 to remove this test, the ref and the support font.

@foolip foolip closed this May 21, 2018
@foolip
foolip deleted the font-feature-settings-rendering-2 branch May 21, 2018 09:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants