Closed Bug 1430632 Opened 6 years ago Closed 6 years ago
Write support for Open Type Font Variations
13.10 KB, patch
|Details | Diff | Splinter Review|
Copy declarations of new DirectWrite interfaces into our code so it will build against the current Windows SDK and WINVER settings
7.11 KB, patch
|Details | Diff | Splinter Review|
As of the Win10 Fall Creators Update, there is support for variation fonts via new DirectWrite APIs. So we should be able to implement CSS variation-font support on current Win10 systems fairly easily via the DWrite backend. This will not work on earlier Windows systems (we'll need to test API availability at runtime), so if we want variation-font support on older systems we'll need to take another approach, e.g. based on bug 1403299.
This seems to be sufficient to make things work nicely on the axis-praxis test page, for example (with the exception of the Winner font; that looks like a DWrite bug). A followup bug will be needed to hook it all up to webrender, as I didn't tackle that yet.
Attachment #8942709 - Flags: review?(lsalzman)
Assignee: nobody → jfkthame
Status: NEW → ASSIGNED
Note that the patch here won't currently build on tryserver (or inbound/central), because it depends on bug 1430634 and bug 1430638. Here's a try build where I just hacked in a bunch of the new DirectWrite declarations in a temporary extra header file, to work around this: https://treeherder.mozilla.org/#/jobs?repo=try&revision=bcac12062637ac8d453c558a905560627f3908c1.
Attachment #8942709 - Flags: review?(lsalzman) → review+
AFAICT, this allows us to build successfully with the current toolchains etc., until we're ready to bump the SDK and WINVER settings (at which point it should harmlessly stop getting included, even if we don't remember to rip it out right away). The resulting build still runs happily on Win7, it just won't actually support font variations.
Attachment #8943665 - Flags: review?(lsalzman) → review+
Comment on attachment 8943665 [details] [diff] [review] Copy declarations of new DirectWrite interfaces into our code so it will build against the current Windows SDK and WINVER settings Review of attachment 8943665 [details] [diff] [review]: ----------------------------------------------------------------- Thank you!
Attachment #8943665 - Flags: review?(nfroyd) → review+
So just FTR, with the additional patch, this no longer depends on bug 1430638 and bug 1430634; but when we're ready to move forward on those issues, we'll be able to remove the extra header here.
Pushed by email@example.com: https://hg.mozilla.org/integration/mozilla-inbound/rev/794abd47aa0c Support OpenType variation fonts in the DirectWrite font back-end (on Win10 Fall Creators Update). r=lsalzman https://hg.mozilla.org/integration/mozilla-inbound/rev/6d97ae42700e Copy declarations of new DirectWrite interfaces into our code so it will build against the current Windows SDK and WINVER settings. r=lsalzman,froydnj
:jfkthame windows-mingw32-32 debug build-win32-mingw32/debug (B) job got busted on this push: https://treeherder.mozilla.org/#/jobs?repo=mozilla-inbound&revision=6d97ae42700e4086584d74cde222fa2f870780dd&filter-platform=windows-mingw32-32%20debug&selectedJob=157551905 It's tier2 job but is there any chance you can take a look? Thank you.
Ugh, looks like it must be using an older (pre-Win10?) SDK, and doesn't have the dwrite_3.h header at all. I guess we can work around that by copying the necessary declarations into our code, but it may take some trial and error to determine exactly what needs to be included. Or is it possible to update the SDK those builds are using, so that it matches what we use in the tier-1 builds?
Works pretty good on Windows 10...but the print-function don't work. The print-preview shows the variable font, but if you print it out, the printer prints without the font-variable-settings..
You need to log in before you can comment on or make changes to this bug.