Font Awesome Brand Icons do not work
还没有人认领这个 Issue。
评估
- 难度
- 3/5
- 预计耗时
- 1-2 天
- 新手友好度
- 67/100
- Issue 类型
- 缺陷
- 描述清晰度
- 基本清楚
- 活跃度
- 活跃
- 技术栈
- css, javascript, python
调研方向
首先运行 issue 中的 Flask 复现,并在 Firefox 或 Chromium 中检查生成的 HTML 以及已加载的 Font Awesome Web 字体。跟踪 folium.Icon 如何处理 fa 前缀,并比较 solid 图标 heart 与 brand 图标 bluetooth。当两个标记都能正确渲染,并且回归检查覆盖 brand 图标时,即表示完成。
由索引模型根据 Issue 内容生成。
描述
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
folium is maintained by volunteers. Can you help making a fix for this issue? Probably not
- 主要语言
- Python
- 星标
- 7.4k
- 派生
- 2.3k
- 平均合并
- 17 小时 22 分钟
- 30 天内合并 PR
- 11
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
python-visualization/folium 的其他 Issue
-
documentation
难度 2/5 1-3 小时 新手友好度 68/100
python-visualization/folium#2092 · 5 条评论 ·
-
难度 5/5 一周以上 新手友好度 25/100
python-visualization/folium#2259 ·
-
Map output from OSM returns blocked tiles, due to defective request or not following referer-policy 未关闭
难度 3/5 1-2 天 新手友好度 55/100
python-visualization/folium#2236 · 5 条评论 · 1 个 reaction ·
-
难度 5/5 一周以上 新手友好度 10/100
python-visualization/folium#2219 · 2 条评论 ·
-
难度 3/5 1-2 天 新手友好度 35/100
python-visualization/folium#2200 ·
查看 python-visualization/folium 的全部 Issue
相似的 Issue
-
essnmx good first issue
难度 1/5 1 小时以内 新手友好度 95/100
-
难度 2/5 1-3 小时 新手友好度 65/100
syfoud/Simulated_Scepter#174 ·
-
难度 2/5 1-3 小时 新手友好度 75/100
Giskard-AI/giskard-oss#2840 · 1 条评论 ·
-
A claim comment carrying the issue number is silently declined while the workflow reports success 未关闭area: repo bug perceived difficulty: 2
难度 2/5 1-3 小时 新手友好度 70/100
-
难度 2/5 1-3 小时 新手友好度 75/100
yeti-platform/yeti#1380 ·