blackberry arabic text - blackberry

In my application, i need to show some english and arabic text in a net.rim.device.api.ui.component.EditField. The text comes from server encoded with UTF-8. # iPhone it is works fine but on BB we see small black filled rectangles instead of Arabic text.
I do not want to enforce users to download some font to see the text. I need embedded solution.
I am developing for BB OS 4.5.

It is definitely a font issue. In OS 5+ you can ship your app with a custom font that supports Arabic and install it at run time. Instructions and sample code for how to do this can be found in this development guide topic.
Unfortunately, there is any support for custom fonts pre-5.0 (see, e.g., this thread).

Related

How to make other apps use your custom font for a language whose font is not present on iOS

I'm planning to create a keyboard in iOS for a language script which has unicode block allocated to it but neither android nor iOS has it's font. I'll get the font made by someone but will other apps like WhatsApp use that font instead of showing boxes

Codename One : Text not showing using Roboto or Keep Calm Medium font on iOS

I am using different fonts in my Codename One app. If I include and use Roboto-Bold.ttf or Oswald font from Google fonts or Keep Calm Medium from dafont.com the text is displayed on Android and Codename One Simulator (as reported on this SO question) but NOT on iOS (neither on the device nor on XCode device) although the fonts are packaged in the .ipa generated by Codename One.
I tried with style = PLAIN or BOLD with the same results.
I used font = Font.createTrueTypeFont(fontName, fontFilename ).derive(fontSize, style);
Why are some fonts working while other aren't? Is there any way to know before compilation which fonts are more likely to work on iOS?
iOS and Android use very different approaches to dealing with fonts which we try to simplify with a simple method.
If you define the font in the designer with a UIID we can hide most of that complexity for you but when you load the font dynamically you are exposed to some of that.
Android just loads font files so the file is used and this should work easily like the simulator. iOS needs the fonts to be installed and then loaded by font name (which isn't the file name and isn't very intuitive). This stack overflow question discusses the method of getting the font name on a Mac: How do I get the font name from an otf or ttf file?

Why does iOS choose a particular Asian font?

My iPhone is set to English, but my app is localized to several languages. When the app is internally switched to Japanese, the font rendered as "system" is cute, but not professional-looking.
From what I can tell from iosfonts.com, the font selected may be Heiti TC.
How can I coerce my app to use, say, Hiragino Kaku, as the "system" font when localized to Japanese?
Here are my language settings on my hardware iPhone 5S:
In my settings I correctly have my preferred languages as
for testing. However, one user pointed out
Yes, unfortunately Apple decided to go "All-China" and now prefers Chinese fonts over Japanese ones.
Back on iOS 7, if a system font was missing glyphs, then iOS would chose a matching font for these missing glyphs based on the system language settings. In that list of preferred languages, Japanese was always before Chinese, so missing glyphs were taken from a Japanese font. With iOS 8, Apple reordered this list and so missing glyphs are now taken from a Chinese font.
Following the advice from this answer and this answer, I changed my system language to Japanese, then back to English. The order of my preferred languages is exactly the same as before, but now my phone is correctly using the Japanese font and not the Chinese font. I think this is a bug, but I hope this helps others.

Custom font rendering in iOS versus Mac OS X

I'm trying to render a simple UITextView in a custom font in my iOS app. This font is for the Urdu language and I specifically need the stylized look of the characters.
I'm certain that I've followed all requisite steps correctly (the .ttf file's target membership, info.plist entry, finding out and using the right font name etc.), since I confirmed this by logging:
NSLog(#"%#", poem.font.fontName);
where *poem is my UITextView.
The strange thing is that when I install this font on my Mac and type in the same text in text-edit, the font renders as it should.
Mac OS screenshot:
Simulator/iOS Device screenshot:
Any explanation?
You can simply use UITextView, but instead of using the text property, use the attributedText property to set the text. That should do the trick, in iOS 7+.
If you want to support iOS 6 or earlier, use CoreText.

Papyrus font exists on iPad but not iPhone

My app uses papyrus font.
In the iPad simulator it works perfectly. In both of the iPhone simulators (standard and retina) it doesn't seem to have this font. It just uses a stock system font.
I have just tested on both an iPhone and an iPad, and the results identical to the simulator.
What is the deal here? is there any workaround? Can I package this font with the app? If so, how?
As a related issue, this papyrus font refuses to display unusual characters. I require for example ∫ and ŋ. These get displayed in a stock system font. I guess the font doesn't have symbols for extended Unicode characters... what is my best bet?
The iPhone and iPad ship with different sets of fonts, which is a bit strange. If you want to bundle this font with your app, you will need to obtain a licence to do so from one of the foundries that distribute it.
As for other characters, you're correct---the Papyrus font only supports characters used in European languages. If you don't like the system's default fall-back font, you will need to supply another.

Resources