servo/components/gfx/tests/support/CSSTest
Jon Leighton e4acb3f77f Add test for FontContext/FontGroup functionality
Unfortunately, this required quite a bit of changes to the non-test
code. That's because FontContext depends on a FontCacheThread, which in
turn depends on a CoreResourceThread and therefore lots of other data
structures.

It seemed like it would be very difficult to instantiate a FontContext
as it was, and even if we could it seems like overkill to have all these
data structures present for a relatively focused test.

Therefore, I created a FontSource trait which represents the interface
which FontContext uses to talk to FontCacheThread. FontCacheThread then
implements FontSource. Then, in the test, we can create a dummy
implementation of FontSource rather than using FontCacheThread.

This actually has the advantage that we can make our dummy
implementation behave in certain specific way which are useful for
testing, for example it can count the number of times
find_font_template() is called, which helps us verify that
caching/lazy-loading is working as intended.
2018-02-22 16:36:09 +01:00
..
csstest-ascii.ttf Add test for FontContext/FontGroup functionality 2018-02-22 16:36:09 +01:00
csstest-basic-bold.ttf Add test for FontContext/FontGroup functionality 2018-02-22 16:36:09 +01:00
csstest-basic-bolditalic.ttf Add test for FontContext/FontGroup functionality 2018-02-22 16:36:09 +01:00
csstest-basic-italic.ttf Add test for FontContext/FontGroup functionality 2018-02-22 16:36:09 +01:00
csstest-basic-regular.ttf Add test for FontContext/FontGroup functionality 2018-02-22 16:36:09 +01:00
csstest-fallback.ttf Add test for FontContext/FontGroup functionality 2018-02-22 16:36:09 +01:00
csstest-familyname-bold.ttf Add test for FontContext/FontGroup functionality 2018-02-22 16:36:09 +01:00
csstest-familyname-funkyA.ttf Add test for FontContext/FontGroup functionality 2018-02-22 16:36:09 +01:00
csstest-familyname-funkyB.ttf Add test for FontContext/FontGroup functionality 2018-02-22 16:36:09 +01:00
csstest-familyname-funkyC.ttf Add test for FontContext/FontGroup functionality 2018-02-22 16:36:09 +01:00
csstest-familyname.ttf Add test for FontContext/FontGroup functionality 2018-02-22 16:36:09 +01:00
csstest-verify.ttf Add test for FontContext/FontGroup functionality 2018-02-22 16:36:09 +01:00
csstest-weights-15-w1.ttf Add test for FontContext/FontGroup functionality 2018-02-22 16:36:09 +01:00
csstest-weights-15-w5.ttf Add test for FontContext/FontGroup functionality 2018-02-22 16:36:09 +01:00
csstest-weights-24-w2.ttf Add test for FontContext/FontGroup functionality 2018-02-22 16:36:09 +01:00
csstest-weights-24-w4.ttf Add test for FontContext/FontGroup functionality 2018-02-22 16:36:09 +01:00
csstest-weights-47-w4.ttf Add test for FontContext/FontGroup functionality 2018-02-22 16:36:09 +01:00
csstest-weights-47-w7.ttf Add test for FontContext/FontGroup functionality 2018-02-22 16:36:09 +01:00
csstest-weights-100.ttf Add test for FontContext/FontGroup functionality 2018-02-22 16:36:09 +01:00
csstest-weights-200.ttf Add test for FontContext/FontGroup functionality 2018-02-22 16:36:09 +01:00
csstest-weights-258-w2.ttf Add test for FontContext/FontGroup functionality 2018-02-22 16:36:09 +01:00
csstest-weights-258-w5.ttf Add test for FontContext/FontGroup functionality 2018-02-22 16:36:09 +01:00
csstest-weights-258-w8.ttf Add test for FontContext/FontGroup functionality 2018-02-22 16:36:09 +01:00
csstest-weights-300.ttf Add test for FontContext/FontGroup functionality 2018-02-22 16:36:09 +01:00
csstest-weights-400.ttf Add test for FontContext/FontGroup functionality 2018-02-22 16:36:09 +01:00
csstest-weights-500.ttf Add test for FontContext/FontGroup functionality 2018-02-22 16:36:09 +01:00
csstest-weights-600.ttf Add test for FontContext/FontGroup functionality 2018-02-22 16:36:09 +01:00
csstest-weights-700.ttf Add test for FontContext/FontGroup functionality 2018-02-22 16:36:09 +01:00
csstest-weights-800.ttf Add test for FontContext/FontGroup functionality 2018-02-22 16:36:09 +01:00
csstest-weights-900.ttf Add test for FontContext/FontGroup functionality 2018-02-22 16:36:09 +01:00
csstest-weights-1479-w1.ttf Add test for FontContext/FontGroup functionality 2018-02-22 16:36:09 +01:00
csstest-weights-1479-w4.ttf Add test for FontContext/FontGroup functionality 2018-02-22 16:36:09 +01:00
csstest-weights-1479-w7.ttf Add test for FontContext/FontGroup functionality 2018-02-22 16:36:09 +01:00
csstest-weights-1479-w9.ttf Add test for FontContext/FontGroup functionality 2018-02-22 16:36:09 +01:00
csstest-weights-2569-w2.ttf Add test for FontContext/FontGroup functionality 2018-02-22 16:36:09 +01:00
csstest-weights-2569-w5.ttf Add test for FontContext/FontGroup functionality 2018-02-22 16:36:09 +01:00
csstest-weights-2569-w6.ttf Add test for FontContext/FontGroup functionality 2018-02-22 16:36:09 +01:00
csstest-weights-2569-w9.ttf Add test for FontContext/FontGroup functionality 2018-02-22 16:36:09 +01:00
csstest-weights-3589-w3.ttf Add test for FontContext/FontGroup functionality 2018-02-22 16:36:09 +01:00
csstest-weights-3589-w5.ttf Add test for FontContext/FontGroup functionality 2018-02-22 16:36:09 +01:00
csstest-weights-3589-w8.ttf Add test for FontContext/FontGroup functionality 2018-02-22 16:36:09 +01:00
csstest-weights-3589-w9.ttf Add test for FontContext/FontGroup functionality 2018-02-22 16:36:09 +01:00
csstest-weights-full-w1.ttf Add test for FontContext/FontGroup functionality 2018-02-22 16:36:09 +01:00
csstest-weights-full-w2.ttf Add test for FontContext/FontGroup functionality 2018-02-22 16:36:09 +01:00
csstest-weights-full-w3.ttf Add test for FontContext/FontGroup functionality 2018-02-22 16:36:09 +01:00
csstest-weights-full-w4.ttf Add test for FontContext/FontGroup functionality 2018-02-22 16:36:09 +01:00
csstest-weights-full-w5.ttf Add test for FontContext/FontGroup functionality 2018-02-22 16:36:09 +01:00
csstest-weights-full-w6.ttf Add test for FontContext/FontGroup functionality 2018-02-22 16:36:09 +01:00
csstest-weights-full-w7.ttf Add test for FontContext/FontGroup functionality 2018-02-22 16:36:09 +01:00
csstest-weights-full-w8.ttf Add test for FontContext/FontGroup functionality 2018-02-22 16:36:09 +01:00
csstest-weights-full-w9.ttf Add test for FontContext/FontGroup functionality 2018-02-22 16:36:09 +01:00
csstest-weights.ttf Add test for FontContext/FontGroup functionality 2018-02-22 16:36:09 +01:00
LICENSE Add test for FontContext/FontGroup functionality 2018-02-22 16:36:09 +01:00
README Add test for FontContext/FontGroup functionality 2018-02-22 16:36:09 +01:00

These fonts are a copy of the CSSTest fonts in web-platform-tests, so that we
can use them for unit-testing our font code. Here is the README from
web-platform-tests:

-----

These fonts were created to support the testing of the font features
in CSS, and are required to run some of the tests for those features.

The fonts are modified versions of Gentium Basic, licensed by SIL under
the Open Font License which allows modifications as long as the terms
of the license are met.

The original fonts were used to create the family 'CSSTest Basic'. This
family has four faces and can be used for testing bold / italics.
A subsetted version of this font with only glyphs for basic ASCII
characters is 'CSSTest ASCII'.  This was used to make the other
variations.  Most of the modications are to the name table and character
maps, for the most part glyphs were not modified.

The fonts are available for download both individually and as a
ZIP package below.

The files test.html and test.xhtml test that the fonts have been
correctly installed.