Silviu-Marian
Silviu-Marian

Reputation: 10907

Which Unicode characters can be typed using the keyboard?

I had some trouble figuring out the title for this question, so I know it sounds a little stupid.

I'm working on a webfont generator. I have over 1,000 SVGs (and growing), and, with the use of FontForge scripts, plan on assigning each one of those files to a character position.

This red X rectangle next to the blue one down here is what I mean by "character position":

character position

The problem:

Each one of those positions have a code correspondent. Some print directly, some don't. I know for a fact that control characters from this table here don't print. But there are other characters that don't print either, such as the soft-hyphen (U+00AD). This one sadly I discovered by accident.

I don't want to allow the end-users to pick whatever characters positions they want, because then, the icons filling up those positions won't show up in the browser. I looked over and over on the Unicode website to see if they have a list or something, but there's nothing helpful there.

So is there any way I can know for sure which character positions are safe to use as icons, or which ones aren't?

Upvotes: 0

Views: 107

Answers (1)

deceze
deceze

Reputation: 522081

I can just guess at your intentions, but I'll guess that what you're looking for are the Private Use Areas of Unicode. These are a range of code points which have no assigned meaning. You can use these code points to assign your own icons, symbols or meanings. It's just between you and the user of the font what these code points mean and you can use them freely.

You should never overload the meaning of code points. If a code point is specified as "%", then the only character that should ever be in this code point is "%". It doesn't matter how rare or common the use of this code point is, because if there's ever a collision the situation is simply hard to resolve. Private Use Areas exist to prevent collisions of this sort entirely.

Upvotes: 2

Related Questions