Hello,
I recently run into problem of displaying non Unicode character on an website.
The character is an custom symbol, that has no Unicode value.
Website is done in Wordpress.
Does anyone know maybe how to do this?
There is no option to assign Unicode value for that character now, it's already final product.
Thanks in advanced.
Dusan
0
Comments
As HTML is firmly built around font encoding conventions (up to the point that a 'proper' web page must have its encoding specified in the HTML header), it cannot display non-Unicode characters. But consider this: even if it could, you'd need to embed your font, else the end users would still not be able to see your special character.
I agree with the above, an image is realistically the only option.
If this special character doesn't need to be inline with the other text or isn't needed that often, it would probably just be best to do it by inserting an .svg file via HTML. For that matter, you could load the .svg as an inline image, but those things can be problematic.
There is no option to assign Unicode value for that character now, it's already final product.
If it's a final product and you can't do anything with the text or the layout, there really are no options since it's a done deal.
- If the webfont containing the icon(s) fails to load, it'll likely display incorrect glyphs.
- The separate webfont should have the same vertical metrics so that it doesn't affect the line height if they're being used inline (as they are in Cory's example).
I'm of the opinion that you should probably just use an SVG. It'll likely load faster and have more support across browsers/platforms.Sizing problems with the .svg can be addressed using CSS min and max width values based on the em size of the text in which it's embedded. Changing the color of the .svg, if desired, gets more complicated, as do certain other things more easily done with text than an image.
Here's an inline .svg example.
Unfortunately, I was pretty aware there is no clean solution for this before posting the question here. Since I can't edit existing font, solution will probably be with SVG as many of you suggested.
Also, as someone mentioned using OT features for displaying the character. That would work, yes, in that situation as that method. But for example, if you want to display glyph list (with all characters within single font file), you won't see these characters again, even they are displayed previously trough OT features. It's like you're trying to listen radio station that's beyond regular frequencies, it exists physically, but it's unreachable for listeners.
Thank you all once again!