Skip to content

[Bug] maplibre localIdeographFontFamily Not effective #2537

Description

@FEJackFly

Description

maplibre localIdeographFontFamily Not effective

Html takes effect. react doesn't take effect

Expected Behavior

No response

Steps to Reproduce

<title>Use locally generated ideographs</title>
    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1" />
    <!-- <link
        rel="stylesheet"
        href="https://unpkg.com/maplibre-gl@5.5.0/dist/maplibre-gl.css"
    /> -->
    <script src="https://unpkg.com/maplibre-gl@5.5.0/dist/maplibre-gl.js"></script>
    <style>
        body {
            margin: 0;
            padding: 0;
        }
        html,
        body,
        #map {
            height: 100%;
        }
    </style>
</head>
<body>
    <div id="map"></div>

    <script>
        const map = new maplibregl.Map({
            container: "map",
            style: "https://api.maptiler.com/maps/streets-v2-light/style.json?key=dYcvRTJBEWnehsE2z5LQ",
            center: [120.3049, 31.4751],
            zoom: 12,
            localIdeographFontFamily: '"Apple LiSung", serif',
        });
        console.log(map);
    </script>
</body>

Environment

  • Framework version:
  • Map library:
  • Browser:
  • OS:

Logs

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions