Skip to content

{message: 'Unimplemented type: 4'} #54

@viacheslav-zyrianov-civilian

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

  1. Go to https://maplibre.org/font-maker/
  2. Select your custom .ttf font or select any of presented
  3. Convert
  4. Download .zip
  5. Add downloaded files to folder public/maplibre/font/Ubuntu
  6. 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,
          },
        })

Then in console i see:
Image

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

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions