Good, so it did not arouse anyone's interest. But I solved the problem for myself, thought it was good etiquette to share my solution with the community.
I had to do two things. After I realized that holder.js parses drawing a JavaScript canvas into a png image file, the problem was less from the "holder.js" problem and more from a pure problem with JS and web font / font.
First: I had to explicitly tell the system that glyphics are fonts and what I mean. I did this with the following CSS:
@font-face { font-family: 'Glyphicons Halflings'; font-style: normal; font-weight: normal; src: local('Glyphicons Halflings'), url('../fonts/glyphicons-halflings-regular.ttf') format('truetype'); }
Second: Once the browser has recognized the name, location, and type of font that I used, I could start using it to pass Unicode characters to the JS canvas object. Holder.js has Var settings that contain an array of "themes", I added the following custom theme to the array:
"blueGlyph": { background: "#3a87ad", foreground: "#ffffff", size: 128, font:"Glyphicons Halflings" }
Third: Now all I had to do was pass the Unicode character to the JS script, and it would create icon images on the fly. HTML looked like this:
<img src="data:image/png;base64," data-src="holder.js/140x140/text:/blueGlyph">
The result is the following dynamically created image:

The key to selecting and transmitting the Unicode character in the correct format for interpreting and drawing it was to pass the Unicode character using the HTML method. those. & # x * {UNICODE HERE} * ;, Or "& # xe093;" in accordance with the above example.
Here's a fiddle if you want to chat with her.
Samuel Hawksby-Robinson
source share