Icon Styles
See original GitHub issueDescribe the bug Icon fonts are showing up as squares.
I have tried specifying the @font-face
in both the main index.html and in the javascript.
To Reproduce
let styles = []
let feature = new Feature({ geometry: geometry});
...
let iconProperties = {
text: new Text({
text: \uf16a,
font: 'normal 25px My-Icon-Font',
offsetY: 0,
offsetX: 0
})
};
styles.push(new Style(iconProperties));
...
return new VectorLayer({
source: new VectorSource({
features: [feature]
}),
style: styles
});
Add the layer to your map. Icon displays as a square.
Expected behavior
A font icon displays.
Issue Analytics
- State:
- Created 5 years ago
- Comments:5 (2 by maintainers)
Top Results From Across the Web
Icon Styles & Designs - Varghese Mathai
Choose an icon style: Outline, glyph, colored and flat. outline, glyph, colored and flat. outlined, flat, material, glyph, hand-drawn, etc ...
Read more >UI cheat sheet: Icon categories + icon style reference guide
There are different ways of categorising icon styles; you can look at subject matter, colour palette, size, era, how it was created, ...
Read more >A Designer's Guide to Icon Styles - IconScout Blogs
A Designer's Guide to Icon Styles · 1. Line · 2. Glyph · 3. Colored outline · 4. Flat · 5. Gradient ·...
Read more >Flaticon guide to icon styles
Icon styles · Black outline · Black filled · Hand drawn · Gradient · Lineal Color · Flat.
Read more >Icon Styles - Pinterest
Sep 14, 2020 - Explore Corinna Hutter's board "Icon Styles", followed by 258 people on Pinterest. See more ideas about icon, icon design,...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Hi @fuoridallarete,
I’ve put a small example in https://codesandbox.io/s/font-awesome-text-0ectn (the font is loaded in the index.html page)
Thanks for your quick answer (and solution) @fredj. It works. I was stupidly missing the css link in the html. xx