Skip to content

Font Awesome Brand Icons do not work #2278

Description

@konomikitten

Describe the bug

Brand icons from font-awesome do not render correctly.

To Reproduce

from flask import Flask, render_template_string

import folium

app = Flask(__name__)


@app.route("/")
def fullscreen():
    """Simple example of a fullscreen map."""
    m = folium.Map(location=[41, -71], zoom_start=4)

    folium.Marker(location=[41, -72],
        icon=folium.Icon(prefix='fa', icon='fa-heart')).add_to(m)

    folium.Marker(location=[41, -75],
        icon=folium.Icon(prefix='fa', icon='fa-bluetooth')).add_to(m)

    return m.get_root().render()


if __name__ == "__main__":
    app.run(debug=True)

Expected behavior

All icons to render correctly

Environment (please complete the following information):

  • Browser: Firefox 140.15.0esr and Chromium 152.0.7977.64
  • Jupyter Notebook or html files? Flask
  • Python version: sys.version_info(major=3, minor=13, micro=5, releaselevel='final', serial=0)
  • folium version: 0.19.5+dfsg
  • branca version: 0.8.1

Additional context

It seems that the appropriate web font is not loaded. If I go to Web Developer Tools -> Inspector -> Fonts -> All Fonts on Page only https://cdn.jsdelivr.net/npm/@fortawesome/fontawesome-free@6.2.0/webfonts/fa-solid-900.woff2 is loaded and I believe the glyph for bluetooth is in https://cdn.jsdelivr.net/npm/@fortawesome/fontawesome-free@6.2.0/webfonts/fa-brands-400.woff2 so it isn't rendered correctly.

Screenshots

Image

folium is maintained by volunteers. Can you help making a fix for this issue? Probably not

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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