Artem Mostyaev
Artem Mostyaev

Reputation: 3908

Special character from custom font is not displayed in HTML

My HTML is using custom font to display special symbols. There are a lot of symbols, but only one of them is not displayed. It has the code 00AD

    <table id="table_symbols">
        <tr>
            <td class="symbol">&#x00AD;</td>
            <td>Pair of bishops</td>
        </tr>
    </table>

I've searched and found that this is a special code for the soft hyphen character in HTML, so looks like the character is not taken from the font, but replaced with soft hyphen.

Is there any way to forbid such replacement? Or it is easier to edit the font?

Upvotes: 0

Views: 2038

Answers (1)

Dinca Adrian
Dinca Adrian

Reputation: 1230

Read this:

http://unicode-table.com/en/00AD/
https://www.cs.tut.fi/~jkorpela/shy.html

The Unicode character 00AD is defined to be invisible, except at the end of a line, where it may or may not be visible, depending on the script.

Anyway what you used was not the html correct code, instead &shy; or &#173; are used in html.

Use this example to understand the behavior of the ­ element; (Note resize slowly and watch as the text has hyphen on the end but on normal view there is not).

This is the trick I used when making design for Hiring ads and the client wants pure grammar and also justified effect with no inner spaces(languages like German have big words and if no hyphens words will spread apart when justified).

Upvotes: 2

Related Questions