Opened 15 months ago
Last modified 15 months ago
#23255 new defect
[PATCH] Some MapCSSRendererTest reference images were rendered with the wrong font
Reported by: | Owned by: | team | |
---|---|---|---|
Priority: | normal | Milestone: | |
Component: | Unit tests | Version: | |
Keywords: | Cc: |
Description
The reference image test/data/renderer/node-text2/reference.png
was rendered with the "DejaVu Sans" font instead of the correct "Droid Sans". You can see that by looking at the "g" character, which has a closed tail in "Droid Sans".
Same goes for test/data/renderer/eval/reference.png
Attachments (1)
Change History (6)
by , 15 months ago
Attachment: | 23255.patch added |
---|
comment:1 by , 15 months ago
Summary: | Some MapCSSRendererTest reference images were rendered with the wrong font → [PATCH] Some MapCSSRendererTest reference images were rendered with the wrong font |
---|
comment:2 by , 15 months ago
Did you consider updating the reference images instead? Set UPDATE_ALL
to true
.
comment:3 by , 15 months ago
Of course not! If I tested my renderer against an image that my renderer itself produced, it wouldn't make sense?
OTOH the font in the repository is clearly not Droid Sans:
This is Droid Sans, look at the 'g':
comment:4 by , 15 months ago
If I tested my renderer against an image that my renderer itself produced, it wouldn't make sense?
How do you think the images are generated? We generally regenerate them when the test starts failing on a new Java version.
Anyway, one of two things is true:
- Someone generated the rendered images with
Helvetica
and the reference images were never updated since r7383 (I used the Helvetica font in Libreoffice to check). I'm not certain why they still pass. Probably an environment variable is wrong or something. - Someone generated the rendered images by hand and expected us to be using
Helvetica
for the font.
Of the two options, I strongly suspect that the author generated the images from a "known-good" point with the intent of using them for regression testing.
comment:5 by , 15 months ago
It probably is DejaVu Sans, not Helvetica. DejaVu matches perfectly. And Helvetica is non-free.
The test only makes sense if I compare the results of my patched renderer against the results of a known-good renderer. So I can confirm that my patches didn't break anything.
You may either use my patch to fix the MapCSS or regenerate the images with the old MapCCS and the correct font.
This patch corrects the mapcss for the tests to match the fonts used in the images.