I followed this SO answer to include glyphicons in my SVG but it's not working.
This is the SVG code that I want to implement the icon into:
<text
ng-attr-x="{{node.width/2}}"
ng-attr-y="{{node.height/2+5}}"
text-anchor="middle"
ng-attr-fill="{{(node.activity.act_task==3 || node.activity.act_task==4)?'#FFFFFF':'#000000';}}">
<tspan x="130" dy="0em">&#e003</tspan>
<tspan x="130" dy="1.2em" ng-show="node.activity.act_type == 1 && node.height > 30"><a target="_blank" href="http://{{node.activity.act_info_url}}" style="text-decoration: underline">{{node.activity.act_info}}</a></tspan>
</text>
and I added to my css file:
svg text{
font-family: 'Glyphicons Halflings';
}
But that didn't work, it just shows the &#e003
as text instead of the search icon i am after which is the glyphicon-search
icon.
I also tried /e003
& &e003
and #e003
but without any luck.
Is there a way I can add in glyphicons into svg components?
Go to the official site of Bootstrap & copy the Bootstrap CDN for CSS, JS, Popper. js, and jQuery links. Add the CDN link along with add font icon link inside the <head> tag. Add the class with bi bi-icon_name followed by the name of the icon.
Where to find Glyphicons? Associated CSS rules are present within bootstrap. css and bootstrap-min. css files within css folder of dist folder.
Your entity is wrong.
Entities are by default decimal, not hexadecimal. If you want to use hexadecimal, you have to put an x
after the #
.
Also, the entity must end with a semicolon. So what you should have used is:

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With