ACE-IoT-Solutions / ace-svg-react

Grafana SVG Rendering Panel using the 7+ Plugin Framework
https://grafana.com/grafana/plugins/aceiot-svg-panel/
MIT License
41 stars 14 forks source link

Fonts in SVG #10

Closed SamuelJoly closed 5 months ago

SamuelJoly commented 3 years ago

I think browsers like Chrome or Firefox don't support fonts for SVG, but can we use fonts in this plugin? If we can, where do we drop the font file? Thanks

ilayn commented 3 years ago

I don't know if it helps you but if it is hosted online you can just point to it. For example for google fonts you can use @import That is to say, you can place

<style>
@import url('https://fonts.googleapis.com/css2?family=Roboto:ital,wght@0,100;0,500;1,100&display=swap');
</style> 

in your SVG document which downloads multiples styles of Roboto on the fly.