diff --git a/rendering/cases/layer-vector-decluttering/main.js b/rendering/cases/layer-vector-decluttering/main.js
index a709c5d207..e941fd19a0 100644
--- a/rendering/cases/layer-vector-decluttering/main.js
+++ b/rendering/cases/layer-vector-decluttering/main.js
@@ -90,7 +90,7 @@ layer2.setStyle(function(feature) {
return new Style({
text: new Text({
text: feature.get('text'),
- font: '12px sans-serif'
+ font: '12px "Ubuntu Regular", sans-serif'
})
});
});
@@ -119,7 +119,7 @@ layer3.setStyle(function(feature) {
}),
text: new Text({
text: feature.get('text'),
- font: '12px sans-serif',
+ font: '12px "Ubuntu Regular", sans-serif',
textBaseline: 'bottom',
offsetY: -5
})
@@ -151,7 +151,7 @@ line.setStyle(new Style({
text: new Text({
placement: 'line',
text: 'east-west',
- font: '12px sans-serif'
+ font: '12px "Ubuntu Regular", sans-serif'
})
}));
source4.addFeature(point);
diff --git a/rendering/cases/text-style-linestring-nice/expected.png b/rendering/cases/text-style-linestring-nice/expected.png
index 7d0c9beaa2..74ceca57d8 100644
Binary files a/rendering/cases/text-style-linestring-nice/expected.png and b/rendering/cases/text-style-linestring-nice/expected.png differ
diff --git a/rendering/cases/text-style-linestring-nice/main.js b/rendering/cases/text-style-linestring-nice/main.js
index dbfa9fa703..2ab63a0be7 100644
--- a/rendering/cases/text-style-linestring-nice/main.js
+++ b/rendering/cases/text-style-linestring-nice/main.js
@@ -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({
diff --git a/rendering/cases/text-style-linestring-ugly/expected.png b/rendering/cases/text-style-linestring-ugly/expected.png
index e15763b567..c46d7f8446 100644
Binary files a/rendering/cases/text-style-linestring-ugly/expected.png and b/rendering/cases/text-style-linestring-ugly/expected.png differ
diff --git a/rendering/cases/text-style-linestring-ugly/main.js b/rendering/cases/text-style-linestring-ugly/main.js
index c5a8f0ac65..0bca18b70a 100644
--- a/rendering/cases/text-style-linestring-ugly/main.js
+++ b/rendering/cases/text-style-linestring-ugly/main.js
@@ -20,6 +20,7 @@ feature1.setStyle(new Style({
stroke: new Stroke({color: 'blue'}),
text: new Text({
text: 'Hello world',
+ font: '"Ubuntu Regular", sans-serif',
placement: 'line',
overflow: true
})
@@ -37,7 +38,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',
overflow: true
})
}));
@@ -72,6 +73,7 @@ feature4.setStyle(new Style({
stroke: new Stroke({color: 'red'}),
text: new Text({
text: 'PLEASE OMIT ME IM UGLY',
+ font: '"Ubuntu Regular", sans-serif',
offsetX: -10,
textAlign: 'start',
textBaseline: 'top',
@@ -88,6 +90,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,
rotation: 4,
@@ -106,6 +109,7 @@ feature6.setStyle(new Style({
stroke: new Stroke({color: 'blue'}),
text: new Text({
text: 'FILL AND STROKE',
+ font: '"Ubuntu Regular", sans-serif',
placement: 'line',
overflow: true,
fill: new Fill({color: '#FFC0CB'}),
diff --git a/rendering/cases/text-style-overlap/expected.png b/rendering/cases/text-style-overlap/expected.png
index f4f1c2daac..34dea782bb 100644
Binary files a/rendering/cases/text-style-overlap/expected.png and b/rendering/cases/text-style-overlap/expected.png differ
diff --git a/rendering/cases/text-style-overlap/main.js b/rendering/cases/text-style-overlap/main.js
index a67c75936e..9ead9bf60c 100644
--- a/rendering/cases/text-style-overlap/main.js
+++ b/rendering/cases/text-style-overlap/main.js
@@ -19,6 +19,7 @@ const vectorSource = new VectorSource();
const pointStyle = new Style({
text: new Text({
text: 'Point Label',
+ font: '"Ubuntu Regular", sans-serif',
fill: new Fill({
color: 'red'
}),
@@ -31,6 +32,7 @@ const lineStyle = new Style({
stroke: new Stroke({color: 'blue'}),
text: new Text({
text: 'Line Label',
+ font: '"Ubuntu Regular", sans-serif',
fill: new Fill({
color: 'red'
}),
diff --git a/rendering/cases/text-style/expected.png b/rendering/cases/text-style/expected.png
index 6cac4b25d5..43bc6f4c60 100644
Binary files a/rendering/cases/text-style/expected.png and b/rendering/cases/text-style/expected.png differ
diff --git a/rendering/cases/text-style/main.js b/rendering/cases/text-style/main.js
index 981551850d..6ff33d77db 100644
--- a/rendering/cases/text-style/main.js
+++ b/rendering/cases/text-style/main.js
@@ -20,7 +20,7 @@ feature = new Feature({
feature.setStyle(new Style({
text: new Text({
text: 'hello',
- font: '14px sans-serif',
+ font: '14px "Ubuntu Regular", sans-serif',
scale: 2,
fill: new Fill({
color: 'red'
@@ -39,7 +39,7 @@ feature = new Feature({
feature.setStyle(new Style({
text: new Text({
text: 'upside down',
- font: '14px sans-serif',
+ font: '14px "Ubuntu Regular", sans-serif',
rotation: Math.PI,
stroke: new Stroke({
color: 'red',
@@ -55,6 +55,7 @@ feature = new Feature({
});
feature.setStyle(new Style({
text: new Text({
+ font: '"Ubuntu Regular", sans-serif',
text: 'rotateWithView',
rotateWithView: true,
stroke: new Stroke({
@@ -71,7 +72,7 @@ feature = new Feature({
feature.setStyle(new Style({
text: new Text({
text: 'hello',
- font: '14px sans-serif',
+ font: '14px "Ubuntu Regular", sans-serif',
padding: [1, 2, 3, 5],
backgroundFill: new Fill({
color: 'rgba(55, 55, 55, 0.25)'
@@ -91,7 +92,7 @@ feature = new Feature({
feature.setStyle(new Style({
text: new Text({
text: 'hello',
- font: '14px sans-serif',
+ font: '14px "Ubuntu Regular", sans-serif',
padding: [1, 2, 3, 5],
backgroundFill: new Fill({
color: 'rgba(55, 55, 55, 0.25)'
diff --git a/rendering/data/fonts/ubuntu-bold-italic-webfont.eot b/rendering/data/fonts/ubuntu-bold-italic-webfont.eot
new file mode 100644
index 0000000000..9be35a013d
Binary files /dev/null and b/rendering/data/fonts/ubuntu-bold-italic-webfont.eot differ
diff --git a/rendering/data/fonts/ubuntu-bold-italic-webfont.svg b/rendering/data/fonts/ubuntu-bold-italic-webfont.svg
new file mode 100644
index 0000000000..8991b3f3f2
--- /dev/null
+++ b/rendering/data/fonts/ubuntu-bold-italic-webfont.svg
@@ -0,0 +1,2405 @@
+
+
+
\ No newline at end of file
diff --git a/rendering/data/fonts/ubuntu-bold-italic-webfont.ttf b/rendering/data/fonts/ubuntu-bold-italic-webfont.ttf
new file mode 100755
index 0000000000..72a5a99ac0
Binary files /dev/null and b/rendering/data/fonts/ubuntu-bold-italic-webfont.ttf differ
diff --git a/rendering/data/fonts/ubuntu-bold-italic-webfont.woff b/rendering/data/fonts/ubuntu-bold-italic-webfont.woff
new file mode 100644
index 0000000000..5e1a99d899
Binary files /dev/null and b/rendering/data/fonts/ubuntu-bold-italic-webfont.woff differ
diff --git a/rendering/data/fonts/ubuntu-bold-italic-webfont.woff2 b/rendering/data/fonts/ubuntu-bold-italic-webfont.woff2
new file mode 100644
index 0000000000..c5c0efc566
Binary files /dev/null and b/rendering/data/fonts/ubuntu-bold-italic-webfont.woff2 differ
diff --git a/rendering/data/fonts/ubuntu-regular-webfont.eot b/rendering/data/fonts/ubuntu-regular-webfont.eot
new file mode 100644
index 0000000000..87f22e6c8a
Binary files /dev/null and b/rendering/data/fonts/ubuntu-regular-webfont.eot differ
diff --git a/rendering/data/fonts/ubuntu-regular-webfont.svg b/rendering/data/fonts/ubuntu-regular-webfont.svg
new file mode 100644
index 0000000000..542bc761f0
--- /dev/null
+++ b/rendering/data/fonts/ubuntu-regular-webfont.svg
@@ -0,0 +1,2405 @@
+
+
+
\ No newline at end of file
diff --git a/rendering/data/fonts/ubuntu-regular-webfont.ttf b/rendering/data/fonts/ubuntu-regular-webfont.ttf
new file mode 100755
index 0000000000..d748728a20
Binary files /dev/null and b/rendering/data/fonts/ubuntu-regular-webfont.ttf differ
diff --git a/rendering/data/fonts/ubuntu-regular-webfont.woff b/rendering/data/fonts/ubuntu-regular-webfont.woff
new file mode 100644
index 0000000000..29e0a37735
Binary files /dev/null and b/rendering/data/fonts/ubuntu-regular-webfont.woff differ
diff --git a/rendering/data/fonts/ubuntu-regular-webfont.woff2 b/rendering/data/fonts/ubuntu-regular-webfont.woff2
new file mode 100644
index 0000000000..1ab75a4288
Binary files /dev/null and b/rendering/data/fonts/ubuntu-regular-webfont.woff2 differ
diff --git a/rendering/default/index.html b/rendering/default/index.html
index c7131e82f1..7cb5f48903 100644
--- a/rendering/default/index.html
+++ b/rendering/default/index.html
@@ -16,6 +16,22 @@
.ol-control {
display: none;
}
+ @font-face {
+ font-family: "Ubuntu Regular";
+ src: url("/data/fonts/ubuntu-regular-webfont.eot");
+ src: url("/data/fonts/ubuntu-regular-webfont.woff") format("woff"),
+ url("/data/fonts/ubuntu-regular-webfont.otf") format("opentype"),
+ url("/data/fonts/ubuntu-regular-webfont.svg#filename") format("svg");
+ }
+ @font-face {
+ font-family: "Ubuntu Regular";
+ font-weight: bold;
+ font-style: italic;
+ src: url("/data/fonts/ubuntu-bold-italic-webfont.eot");
+ src: url("/data/fonts/ubuntu-bold-italic-webfont.woff") format("woff"),
+ url("/data/fonts/ubuntu-bold-italic-webfont.otf") format("opentype"),
+ url("/data/fonts/ubuntu-bold-italic-webfont.svg#filename") format("svg");
+ }