What is the font-family used on leaflet maps?

1,003 views
Skip to first unread message

Dunc Duncan

unread,
Jan 23, 2021, 9:55:50 AM1/23/21
to Leaflet
I would like to match the font-family used on leaflet maps on a website. Does anybody know what it is?

Bill Frost

unread,
Jan 27, 2021, 3:35:23 AM1/27/21
to leafl...@googlegroups.com
Hi Dunc,

If I've understood your question correctly, have a look at their CSS file (https://unpkg.com/lea...@1.7.1/dist/leaflet.css) and search on the string font:

The main one is Helvetica Neue (the others are fallback for browsers / systems that do not have this font.
/* general typography */
.leaflet-container {
	font: 12px/1.5 "Helvetica Neue", Arial, Helvetica, sans-serif;
	}
If you mean the font used by Open Street Maps (not Leaflet but on the map tiles themselves|) then that is a supplementary question.  First stop is https://wiki.openstreetmap.org/wiki/CartoCSS/fonts.

Cheers.


On Sun, Jan 24, 2021 at 1:55 AM Dunc Duncan <duncd...@gmail.com> wrote:
I would like to match the font-family used on leaflet maps on a website. Does anybody know what it is?

--

---
You received this message because you are subscribed to the Google Groups "Leaflet" group.
To unsubscribe from this group and stop receiving emails from it, send an email to leaflet-js+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/leaflet-js/d0964743-938b-4861-97a5-536c22a71277n%40googlegroups.com.


--
Cheers

 
Bill
-----------------
6270 8373 (w)
6294 1611 (h)
0418 698 197 (m)

Bill Frost

unread,
Jan 27, 2021, 3:37:43 AM1/27/21
to leafl...@googlegroups.com
Hi Dunc,

If I've understood your question correctly, have a look at their CSS file (
https://unpkg.com/lea...@1.7.1/dist/leaflet.css) and search on the string
*font:*

The main one is Helvetica Neue (the others are fallback for browsers /
systems that do not have this font.

/* general typography */
.leaflet-container {
font: 12px/1.5 "Helvetica Neue", Arial, Helvetica, sans-serif;
}

If you mean the font used by Open Street Maps (not Leaflet but on the map
tiles themselves|) then that is a supplementary question. First stop is
https://wiki.openstreetmap.org/wiki/CartoCSS/fonts.

Cheers.


On Sun, Jan 24, 2021 at 1:55 AM Dunc Duncan <duncd...@gmail.com> wrote:
>
> I would like to match the font-family used on leaflet maps on a website. Does anybody know what it is?
>
Reply all
Reply to author
Forward
0 new messages