Skip to content
This repository has been archived by the owner on Feb 8, 2018. It is now read-only.

Use reproducible fontconfig #1

Open
aszlig opened this issue Oct 16, 2017 · 1 comment
Open

Use reproducible fontconfig #1

aszlig opened this issue Oct 16, 2017 · 1 comment

Comments

@aszlig
Copy link

aszlig commented Oct 16, 2017

I'm trying to package this in order to automatically run the tests for Paperwork on Nix(OS) in a headless and sandboxed environment. However it seems that for pytestshot in particular the font differs from what I get when running the tests.

When using this fontconfig:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<fontconfig>
  <dir>/nix/store/8gn2b5vvlazg608cj1y5l4igp9rckmnq-dejavu-fonts-minimal-2.37</dir>
</fontconfig>

... the screenshot I get when running the tests is the following:

foo

This obviously isn't the same as in the reference screenshot and thus the test_ref test will fail.

So I guess the best way would be to actually force a fixed fontconfig, so that testing is less dependent on rendering settings like antialiasing or different fonts.

@jflesch: For starters it would actually be useful to know which config you've used for generating the reference screenshot.

Note that I've also tried adding more fonts like cantarell and various gs fonts to the fonconfig leading to the same result.

@jflesch
Copy link
Member

jflesch commented Oct 16, 2017

As stated in the readme, I use the default fonts from Debian stable + Gnome 3 (no specific package / config installed ; just "apt install gnome") + Virtualbox. I haven't even considered running them on other platforms for now.

Unfortunately, even in Virtualbox, I have never been able to run those tests in a reproducible manner. Rendering often differs very slightly. I will try to define a fontconfig but I doubt it will be enough to make them reproducible once and for all :/

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants