Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to obtain plain 'globe' Unicode character

If you include Unicode characters in an NSString, a lot of them will take on the color set for that text - they're just regular glyphs for that font so they're displayed like any other character. But there are some Unicode characters that are colored, for example GLOBE WITH MERIDIANS which is a blue gradient with shadows. But I have seen this same glyph elsewhere that's a simple black outline without a shadow, for example in the iOS keyboard. I would like to use that glyph, but without the adornments, and without having to create and use an image. I wondered if a different font would render it in a different format, and while iOSFonts.com does show different styles (bolder, italics), they're all blue. Is it possible to get the simple plain version?

Surely it is possible, because that appears to be exactly what Apple has implemented with a Tip. Notice the globe is the exact same color as the text and it's included in the string along with all the other characters. Surely that's not a UIImage?

screenshot

Character in different fonts:
enter image description here

EDIT: The solution provided in the linked question doesn't work for this character, as the variant character appears to be the exact same as the original - blue with shadows.

like image 447
Jordan H Avatar asked Jul 02 '14 04:07

Jordan H


People also ask

How do I get a Unicode character?

To insert a Unicode character, type the character code, press ALT, and then press X. For example, to type a dollar symbol ($), type 0024, press ALT, and then press X. For more Unicode character codes, see Unicode character code charts by script.

Can I make my own Unicode?

These days, an organization called the Unicode Consortium maintains the standard set of emoji used by apps and platforms, and now counts more than 2,700 characters in Version 11 of the set, with more on the way. But if you don't see the exact character you need in the current bunch, yes, you can create your own.

What does this emoji mean 🌐?

Emoji Meaning Depicted with light-blue grid of lines on a white, blue, or empty circle. May be used as a symbol of the internet or world wide web, global communications, international affairs, connectivity and networks, time zones, coordinates, or the world more generally.


1 Answers

Unfortunately, iOS doesn't have a monochrome globe symbol you can use; the only built-in font that includes U+1F310 GLOBE WITH MERIDIANS is Apple Color Emoji.

If you really want a font that renders this character as a simple black outline, you could package a copy of Symbola (downloadable here) into your app.

Alternatively, you could make a bitmap image with the icon you want and use NSTextAttachment to put it into an attributed string. Apple is likely doing something along these lines, as many of their Tips include symbols that are definitely not Unicode characters:

"Text smarter with iMessage apps: Access something fun, without leaving Messages. Tap [App Store icon], then swipe to choose an app. Get iMessage apps from the App Store.

like image 128
Carter Sande Avatar answered Oct 04 '22 15:10

Carter Sande