I use a few special uniode chars in my app, but since iOS 5 these have been replaced with emoji characters. How can I force the unicode characters to be displayed and not the emoji characters? Thanks
This is an old question but it plagued me a lot recently until I found the answer.
Just add '\U0000FE0E' after the character that we want to prevent from becoming an emoji.
For example:
#"โถ" // should be written as:
#"โถ\U0000FE0E"
Using the escaped unicode works as well:
#"\u25B6" // should be written as:
#"\u25B6\U0000FE0E"
We need to use Unicode variants to prevent certain characters from becoming emoji.
Here is the article that solved my problem.
Just to add to BFerer's helpful answer, I found this works similarly in Swift:
"โถ\u{0000FE0E}"
There's a few mentions of this issue on Apple's private devforums (which you have access to if you're a registered member of the iOS developer program).
It sounds like the potential solution would be to explicitly set the font for whatever you're trying to display.
Use "Hiragino Mincho ProN" for the font. It worked for me, but unfortunately I had to change the insets to make things look correct. I had to add an inset to the top to place things as they were before the iOS update.
All the credit goes to Kevin Ballard who answered my post in the following discussion -
Unicode characters being drawn differently in iOS5
Related
We're currently developing a game in Unity (2019.4.28f1). This game is played internationally. We'd like to add support for languages other than common Latin written languages. Currently, we're trying to implement support for Burmese, but aren't making much progress.
Finding fonts to display Burmese isn't a big issue. As you can see in the image below, we manage to display all characters that are supposed to be displayed.
However, the big problem here is that the displayed order of symbols isn't the same as what it's supposed to be (see image below for the desired result).
We've tried several fonts that use either Unicode or Zwagyi encoding, but none of them seem to display characters in the correct order. Currently, we're using a padauk font from here, which is supposedly Unicode encoded. Then, within Unity, we applied to following settings to that font:
So, if one of you knows more about this and can share some information with me, that would be much appreciated!
Thanks.
We've already found a solution for this! Before setting the text of the text component convert the Unicode codes to Zwagyi and it'll display the text in the correct order!
All the credits go to this guy who put in the effort to make a tool for these use cases!
Of course, you still need a (Unicode) font that supports these (Burmese) symbols.
Example:
Text textComponent = GetComponent<Text>();
textComponent.text = mmfont.Net.Converter.Uni2ZG(yourUnicodeText);
I'm now building a listview to display fonts from the UIFonts framework. However, for using UIPasteboard.general.string, the fonts are not copied to the clipboard and only the plain text is transferred.
I've tried including the MobileCoreServices framework and use kUTTypeRTF to implement it. But there is no detailed documentation on it.
May I know how can I build a custom font list and allowing the text be selected and pasted with its font styling onto the other applications (like Notes or Facebook post), just like the font generator hosted online?
I'm now working on the two following UIFonts, but I'm not able to keep its formatting while pasting from the clipboard.
let fonts: [String] = ["BodoniSvtyTwoOSITCTT-Book", "ChalkboardSE-Regular"]
You cannot copy-paste text with a font on your iPhone.
FancyLetters also cannot do this. It just shows you characters that look like they are printed.
For example, the letter "A" has variations: "๐", "๐", "๐ธ". But this is not font-altered text, StackOverflow does not allow it either. These are characters from Unicode table. They are the same characters as "A" or "B", except that without special modifiers the keyboard will not print them for you, e.g. SHIFTOPTIONK = ๏ฃฟ.
Any font is superimposed over Unicode characters.
I recommend you to read an excellent article Emoji under the hood. It's about how emoji are drawn on devices, but it also explains a lot about the construction of characters and how they are rendered on different devices.
Or font generator also cannot do this. It just shows you characters that look like they are printed
Is there a way of listing ALL emoticons from the Segoe UI Symbol font?
I can get all the symbols no problem, but how do I identify which of these are emoticons?
As far I know, there is no direct way to do that.
With a little bit of googling I came up with:
emoticons => Segoe UI Symbol (87)
emoticon: 2639-263b, 2661, 2665, 2764, 1f48b, 1f48f-1f49f, 1f600-1f64f (you can just check unicode ranges to verify if it's emoticon or not)
โนโบโป โก โฅ โค ๐ ๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐ ๐๐๐๐๐๐
๐๐๐๐๐๐๐๐๐๐ ๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐ ๐ ๐ก๐ข๐ฃ๐ค๐ฅ๐ฆ๐ง๐จ๐ฉ๐ช๐ซ๐ฌ๐ญ๐ฎ๐ฏ ๐ฐ๐ฑ๐ฒ๐ณ๐ด๐ต๐ถ๐ท๐ธ๐น๐บ๐ป๐ผ๐ฝ๐พ๐ฟ๐ ๐
๐๐๐๐๐๐๐๐๐๐
You are probably better off using charmap + doing manual labour work and hardcode them into your application, since it's not that much of work anyways.
Sources:
http://en.wikipedia.org/wiki/User:ChristTrekker/UnicodeSymbol
http://en.wikipedia.org/wiki/Emoji
There's one awasome app called Xaml Candy, just have a look. Must have app for developer. It is helpful to choose appbar icons.
DISCLAIMER : I am not the developer of this app nor I am promoting it.
In Windows8, standart app "symbol table"
Do we have character hyphenated wrapping supported in iOS? i.e. when text exceeds the frame width there should be a hyphen added by the iOS in the last word of the line.
Here is a GitHub project about hyphenation made by Tupil. It is a category implementation for NSString called NSString+Hyphenate. You may have a try with this. Tupil's blog "Adding Hyphenation to NSString" describes how to use it.
You can also have a look at:
Frank Zheng's blog - Hyphenation with Core Text on the iPad
I am having a string message i need first word of that as bold font and rest normal.
Making different label can be create problems,(need to find the size of first the make other and then make other,text is in 4 line).
How can i use NSAttributedString here. I could found How do you use NSAttributedString?
but using this shows undeclared NSForegrou... (present in app kit framework).But could not found app kit framework on sdk 4.2
Need help for making such kind of string(bold + normal text).
Go through the below blog tutorial with code, they have different font with NSAttributedString.
http://www.cocoanetics.com/2011/01/rich-text-editing-on-ios/
https://github.com/Cocoanetics/NSAttributedString-Additions-for-HTML
https://github.com/omnigroup/OmniGroup/tree/master/Frameworks/OmniUI/iPad/Examples/TextEditor
May I point you to the CoreText Framework and Befriending Core Text on cocoanetics.com. This will show you how to format text.