Updates font settings for rendering tests

This updates font name and size for renderinge tests that
include TextStyles.
This commit is contained in:
Kai Volland
2019-03-25 09:40:11 +01:00
parent 3d2711d35e
commit ef061dd4c3
10 changed files with 28 additions and 32 deletions

View File

@@ -23,7 +23,7 @@ feature1.setStyle(new Style({
stroke: new Stroke({color: 'blue'}),
text: new Text({
text: 'Hello world',
font: '"Ubuntu Regular"',
font: '10px Ubuntu',
placement: 'line'
})
}));
@@ -36,11 +36,11 @@ feature2.setStyle(new Style({
stroke: new Stroke({color: 'blue'}),
text: new Text({
text: 'Scale 2',
font: 'normal 400 12px/1 Ubuntu',
scale: 2,
textBaseline: 'bottom',
textAlign: 'right',
placement: 'line',
font: 'bold italic 0.8em "Ubuntu Regular"'
placement: 'line'
})
}));
vectorSource.addFeature(feature2);
@@ -51,11 +51,10 @@ const feature3 = new Feature({geometry: lineString3});
feature3.setStyle(new Style({
stroke: new Stroke({color: 'blue'}),
text: new Text({
font: '"Ubuntu Regular"',
font: 'italic bold 0.75em Ubuntu',
text: 'Set properties'
})
}));
feature3.getStyle().getText().setFont('bold italic 1.2em "Ubuntu Regular"');
feature3.getStyle().getText().setTextAlign('left');
feature3.getStyle().getText().setOffsetX(10);
feature3.getStyle().getText().setOffsetY(-10);
@@ -73,7 +72,7 @@ feature4.setStyle(new Style({
stroke: new Stroke({color: 'blue'}),
text: new Text({
text: 'negative offsetX',
font: '"Ubuntu Regular"',
font: 'normal 400 10px/1 Ubuntu',
offsetX: -10,
textAlign: 'start',
textBaseline: 'top',
@@ -89,7 +88,7 @@ feature5.setStyle(new Style({
stroke: new Stroke({color: 'blue'}),
text: new Text({
text: 'Small text',
font: '"Ubuntu Regular"',
font: '10px Ubuntu',
offsetY: 5,
scale: 0.7,
textAlign: 'end',
@@ -105,7 +104,7 @@ feature6.setStyle(new Style({
stroke: new Stroke({color: 'blue'}),
text: new Text({
text: 'FILL AND STROKE',
font: '"Ubuntu Regular"',
font: '10px Ubuntu',
placement: 'line',
fill: new Fill({color: '#FFC0CB'}),
stroke: new Stroke({