Custom font in Blackberry 10 - blackberry-10

Hi I am new to blackberry10 platform and I am stuck with adding custom font in blackberry10. Please anybody tell me how to add custom font in blackberry 10.

According to BlackBerry, custom fonts can only be added using an OpenGL project. There is a sample project bundled with the SDK (sdkdir\target_10_0_9_2318\qnx6\usr\share\samples\ndk\GoodCitizen).
In the main.c file, change the path of the font sent to the bbutil_load_font function to that of your font file.

We can add custom fonts in QML.
link below provides a sample for the same :
http://developer.blackberry.com/native/reference/cascades/bb__cascades__fontfacerule.html
Download the font file (ttf) you need and that can be packaged in the assets folder.
Adding a custom font in C++ is not supported as of now.

Related

iOS Font closest to MS Song font

What font on iOS is closest to the MS Song font on Windows? I'm trying to create a cross platform program, but I want it to be able to format nicely so i'm looking for a similar font.
Thanks in advance!
You can use any font in iOS app.
To use any font you need .TTF file.
You can get font file for MS song font from this link: MS Song Font
Click on Download button and you will get .ZIP file which contan .TXT and .TTF file
You can use this .ttf file with just two step
Make configuration in info.plist to add this .ttf file
Use That Added File in creating UIFont Object
To see how to do this two step in detail visit : Use custom fonts in iPhone App
To use this font please download its ttf file from here . Add it to the main bundle.
Check the following links and tutorials on how to add custom fonts.
Custom Fonts Tutorial
How to use custom fonts in iPhone SDK?
Can I embed a custom font in an iPhone application?

font suitcase to ttf issue

I used Mac OS Font Book to export fonts from it. I got 2 fonts files: Font Suitcase and PostScriptType.
Then I want to use these fonts in my iOS application, but to do that I need to convert them to, for example, ttf. But how?
May be someone faced this problem?
Important:
I don't need advices how to use custom fonts (such as ttf), I need advice how to use Font Suitcase and PostScriptType of fonts (may be how to convert it to ttf)
This solution doesn't require Fondu or Rosetta, but it does involve a little cut-and-paste into macOS's Terminal app.
Pretty simple, and free. And it works on macOS Mojave.
https://sittingduck.co.nz/2013/11/unpacking-the-suitcase/
Try to use these steps.
1) Add your custom font files into your project using Xcode as a resource
2) Add a key to your Info.plist file called "Fonts provided by application".
3) Make this key an array
4) For each font you have, enter the full name of your font file (including the extension) as items to the UIAppFonts array
5) Save Info.plist
6) Now in your application you can simply call [UIFont fontWithName:#"CustomFontName" size:12] to get the custom font to use with your UILabels etc…
Also: Make sure the fonts are in your Copy Bundle Resources.

Using a custom font in Xcode

I'm trying to use a custom font (Sassoon Infant) in Xcode. Despite looking at the numerous posts here on this issue, i haven't been able to resolve the problem.
These are the steps i have taken so far.
Added font to resources
Added font to Font Book
Added SassoonInfantCom-Regular.ttf to Fonts Provided by Application
Tried using fontWithName:#"Sassoon Infant Com", the name in Font Book
Also tried just #"Sassoon"
The font name is not showing up in IB either under the dropdown font menu. The above seems to work for most people but i can't get it working. Anyone have any ideas?
Remove the extension .otf / .ttf from the file and the plist.
Also make sure you are editing the correct plist file for the "Fonts provided by application property"! I spent two days trying everything to make some custom fonts work. Then I realised I was editing the APPTest-info.plist (which is in the resources folder of the Tests folder in XCODE) instead of editing the APP-info.plist file!
In my defence, both files are really close to each other in the files navigator in Xcode... ;-)
I just added it into the bundle and did this
myLabel.font = [UIFont fontWithName:#"MyCustomFont" size:19];
MyCustomFont being a .ttf file.
Hope this helps.
Make sure that the font is added to your target. Select the font and check the target membership in the left Xcode sidebar.
Make sure that you got the correct font name. Open the font in "Font Book" and see its name.

Font not appearing in UILabel

I have a UILabel that I've placed in IB. In the inspector I have changed the font to "Papyrus". When I launch the app in the simulator, the font is not Papyrus. How can I change the font?
You can add custom fonts but you need to add them into your .plist file under the key "Fonts provided by application" to a new row.
Fonts must be added to the Resources of the project and TTF and OpenType fonts are supported.
I believe this is only available in iOS 3.2 or later.
Thanks
Not all fonts listed in IB are available on the iPhone as standard. Papyrus is one of those not available on the iPhone.
More here:
http://ajnaware.wordpress.com/2008/10/24/list-of-fonts-available-on-the-iphone/
You can add custom fonts to the iPhone, but I'd think hard before doing that -- if you're putting a weird looking font onto normal UI items, ask yourself if it actually looks any good! I've seen some real eyesore apps where someone thought it would be cute to put some crime against typography on all the UI controls.

Iphone,how to install new font to iphone by using objective-c?

guys.
i have a pdf with a font that is not installed on iphone by default.
so,i want my application can install this font by using objective-c before my customer view this pdf.
any advice will be appreciate,thanks.
In your applications .plist file, add a new property. In the list of properties, there should be something called "Fonts provided by application" - list any fonts that you have added to your app's resources folder. That should get you started :)