-
-
Notifications
You must be signed in to change notification settings - Fork 19
Open
Description
Prerequisites
- I have vue 3 composition api project
- Change in style.json, used for map, line
"glyphs": "http://localhost:5173/api/font/{fontstack}/{range}.pbf"to get glyphs from local files
How to reproduce
- Go to https://maplibre.org/font-maker/
- Select your custom
.ttffont or select any of presented - Convert
- Download
.zip - Add downloaded files to folder
public/maplibre/font/Ubuntu - Add layer via
map.addLayer
map.addLayer({
id: `${layerId}-label`,
type: 'symbol',
source: layerId,
layout: {
'text-field': ['get', 'name'],
'text-font': ['Ubuntu'],
'text-size': 12,
'text-offset': [-1, 0],
'text-anchor': 'right',
'text-allow-overlap': false,
visibility: mapFiltersStore.layersCheckboxValue[layerId] ? 'visible' : 'none',
},
paint: {
'text-color': '#000000',
'text-halo-color': '#ffffff',
'text-halo-width': 2,
},
})
Attachments
Tried to add font to this issue but got an error - File type .ttf not supported.
Basically, any .ttf font available on Google fonts, i use Ubuntu Regular.
Metadata
Metadata
Assignees
Labels
No labels
