aboutsummaryrefslogtreecommitdiff
path: root/src/map/core/mapUtil.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/map/core/mapUtil.js')
-rw-r--r--src/map/core/mapUtil.js18
1 files changed, 0 insertions, 18 deletions
diff --git a/src/map/core/mapUtil.js b/src/map/core/mapUtil.js
index 8dcded2c..4870dd0d 100644
--- a/src/map/core/mapUtil.js
+++ b/src/map/core/mapUtil.js
@@ -85,21 +85,3 @@ export const geofenceToFeature = (theme, item) => {
};
export const geometryToArea = (geometry) => stringify(reverseCoordinates(geometry));
-
-export const findFonts = (map) => {
- const fontSet = new Set();
- const { layers } = map.getStyle();
- layers?.forEach?.((layer) => {
- layer.layout?.['text-font']?.forEach?.(fontSet.add, fontSet);
- });
- const availableFonts = [...fontSet];
- const regularFont = availableFonts.find((it) => it.includes('Regular'));
- if (regularFont) {
- return [regularFont];
- }
- const anyFont = availableFonts.find(Boolean);
- if (anyFont) {
- return [anyFont];
- }
- return ['Roboto Regular'];
-};