Hi, Ammar.

If I understand correctly, you're primarily interested in being able to type text in Arabic and use various Arabic fonts, but not necessarily be able to see the Windows user interface displayed in Arabic. All of these are possible.

First, you want to add the Arabic language to your user language settings in the Settings app.

  • Click the Start button.
  • Click on Settings.
  • Click on Time & language
  • Click on Region & language

Under the Languages heading, if you do not see any regional variety of Arabic listed, then you can add that now:

  • Click the '+' icon next to Add a language.
  • Locate Arabic in the list (you may need to scroll); click on Arabic.
  • The view will change to show several regional varieties of Arabic. Find the one that best matches your needs and click on it.

At this point, you will be taken back to the Region & language page that shows your language preferences, with Arabic at the bottom of the list.

Adding Arabic to your language profile will have several effects:

  • You have enabled an Arabic keyboard. There are different keyboard layouts available for Arabic; to choose a different layout, click on Arabic in the list, then click on Options to get to more detailed settings for Arabic.
  • Additional, optional Windows features relevant to Arabic language will be installed from Windows Update. (You need to be online for these to be installed.) These will include typing enhancements, such as text prediction, and several additional fonts that support Arabic script.
  • When you browse Web sites, browsers will indicate to the site your language preference, which now will include Arabic.
  • When you run Windows Store apps, they may be able to display their user interface in Arabic.
  • You have the option of having the Windows user interface display in Arabic. On the Region & language page, where you see Arabic in your language preferences, it may display, 'Language pack available'; if so, then you can install this to set your Windows user interface to display in Arabic. If you would like to do that, click on Arabic, then click Options. You'll see a button to install the language pack in the detailed options view.

I hope that helps.

I was looking for some stylish fonts for my android application. but the problem is how can i make my android application supportable for external fonts.

Thank you.

bHaRaThbHaRaTh

7 Answers

You need to create fonts folder under assets folder in your project and put your TTF into it. Then in your Activity onCreate()

Please note that not all TTF will work. While I was experimenting, it worked just for a subset (on Windows the ones whose name is written in small caps).

ZelimirZelimir

You can use the custom TextView for whole app with custom font here is an example for that

Jabbir BashaJabbir Basha

Create a folder named fonts in the assets folder and add the snippet from the below link.

JanaJana

To implement you need use Typeface go through with sample below

Jabbir BashaJabbir Basha

The easiest way to accomplish this is to package the desired font(s) with your application. To do this, simply create an assets/ folder in the project root, and put your fonts (in TrueType, or TTF, form) in the assets. You might, for example, create assets/fonts/ and put your TTF files in there.

Then, you need to tell your widgets to use that font. Unfortunately, you can no longer use layout XML for this, since the XML does not know about any fonts you may have tucked away as an application asset. Instead, you need to make the change in Java code, by calling Typeface.createFromAsset(getAssets(), “fonts/HandmadeTypewriter.ttf”), then taking the created Typeface object and passing it to your TextView via setTypeface().

For more reference here is the tutorial where I got this:

bHaRaThbHaRaTh

I recommend this approach it very nice with adding name of custom font in typeface to styles.xml and putting your set of fonts into assets folder.

ar-gar-g

One more point in addition to the above answers.When using a font inside a fragment, the typeface instantiation should be done in the onAttach method ( override ) as given below:

Reason:
There is a short span of time before a fragment is attached to an activity. If CreateFromAsset method is called before attaching fragment to an activity an error occurs.

Akil AdeshwarAkil Adeshwar

protected by CommunityOct 25 '15 at 15:22

Thank you for your interest in this question. Change corel draw x7 serial number. Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site (the association bonus does not count).
Would you like to answer one of these unanswered questions instead?

Not the answer you're looking for? Browse other questions tagged androidandroid-fonts or ask your own question.