Use local font "Ubuntu Regular" for rendering tests

Set local font for all rendering tests including
TextStyles to enhance comparability on different
systems.
This commit is contained in:
Kai Volland
2019-03-21 14:43:54 +01:00
parent c4279ff665
commit 5665da6518
20 changed files with 4848 additions and 10 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 22 KiB

After

Width:  |  Height:  |  Size: 23 KiB

View File

@@ -23,6 +23,7 @@ feature1.setStyle(new Style({
stroke: new Stroke({color: 'blue'}),
text: new Text({
text: 'Hello world',
font: '"Ubuntu Regular", sans-serif',
placement: 'line'
})
}));
@@ -39,7 +40,7 @@ feature2.setStyle(new Style({
textBaseline: 'bottom',
textAlign: 'right',
placement: 'line',
font: 'bold italic 0.8em serif'
font: 'bold italic 0.8em "Ubuntu Regular", sans-serif'
})
}));
vectorSource.addFeature(feature2);
@@ -50,10 +51,11 @@ const feature3 = new Feature({geometry: lineString3});
feature3.setStyle(new Style({
stroke: new Stroke({color: 'blue'}),
text: new Text({
font: '"Ubuntu Regular", sans-serif',
text: 'Set properties'
})
}));
feature3.getStyle().getText().setFont('bold italic 1.2em monospace');
feature3.getStyle().getText().setFont('bold italic 1.2em "Ubuntu Regular", sans-serif');
feature3.getStyle().getText().setTextAlign('left');
feature3.getStyle().getText().setOffsetX(10);
feature3.getStyle().getText().setOffsetY(-10);
@@ -71,6 +73,7 @@ feature4.setStyle(new Style({
stroke: new Stroke({color: 'blue'}),
text: new Text({
text: 'negative offsetX',
font: '"Ubuntu Regular", sans-serif',
offsetX: -10,
textAlign: 'start',
textBaseline: 'top',
@@ -86,6 +89,7 @@ feature5.setStyle(new Style({
stroke: new Stroke({color: 'blue'}),
text: new Text({
text: 'Small text',
font: '"Ubuntu Regular", sans-serif',
offsetY: 5,
scale: 0.7,
textAlign: 'end',
@@ -101,6 +105,7 @@ feature6.setStyle(new Style({
stroke: new Stroke({color: 'blue'}),
text: new Text({
text: 'FILL AND STROKE',
font: '"Ubuntu Regular", sans-serif',
placement: 'line',
fill: new Fill({color: '#FFC0CB'}),
stroke: new Stroke({