android-fonts

Custom ttf fonts are not showing properly in TextView on Android 4.4 KitKat

笑着哭i 提交于 2019-11-29 10:18:18
I have some text which has some bolded parts. Until KitKat this strategy ( as mentioned in this post ) worked perfectly well My strings resources file: <string name="multi_style_text">NON-BOLD TEXT \n<b>BOLD</b></string> My application code in fragment: txtView.setTypeface(FontUtils.getOstrichRegular(this.getActivity())); ... public static Typeface getOstrichRegular(Context context) { return Typeface.createFromAsset(context.getAssets(), "fonts/ostrich_regular.ttf"); } Currently (in KitKat), the bolded part is not shown in the custom font, the non-bolded part is shown in the custom font. In

Kannada Font on Android ICS

℡╲_俬逩灬. 提交于 2019-11-29 07:23:48
I am supporting Tamil and Kannada fonts in my application. I use the following code to set the typeface of TextViews, Buttons, etc FONT_TAMIL = Typeface.createFromAsset(getAssets(), "fonts/tamil.ttf"); tvTitle.setTypeface(FONT_TAMIL); FONT_KANNADA = Typeface.createFromAsset(getAssets(), "fonts/kannada.ttf"); tvTitle.setTypeface(FONT_KANNADA); I am able to display Tamil characters properly even on GingerBread. But I am not able to show the Kannada font. Can anyone please help me to find where I am going wrong? An example screenshot of Tamil.. An example screenshot of Kannada.. Thanks, Karthik

Urdu font in textview

╄→гoц情女王★ 提交于 2019-11-29 07:13:40
i have set urdu in textview and apply urdu typeface but is only showing word by word like ب ہ ن here is code : Typeface tf1 = Typeface.createFromAsset(this.getAssets(), "Urdu.ttf"); TextView textView = (TextView)findViewById(R.id.textView1); textView.setTypeface(tf1); textView.setText("یہ انگریزی نہیں"); Asaalam-o-alakum bibi Tahira You can downlaod urdu Font from this link,i have tested it. Thanks Vishal For Regional languages you need to read them as UTF-8 and then set the font. I have followed the below steps and working fine. Copy the sample URDU text in ms-word. Check the font of it. Copy

Font size of TextView in Android application changes on changing font size from native settings

牧云@^-^@ 提交于 2019-11-28 03:07:18
I want to specify my own text size in my application, but I am having a problem doing this. When I change the font size in the device settings, the font size of my application TextView also changes. sandrstar Actually, Settings font size affects only sizes in sp . So all You need to do - define textSize in dp instead of sp , then settings won't change text size in Your app. Here's a link to the documentation: Dimensions However please note that the expected behavior is that the fonts in all apps respect the user's preferences. There are many reasons a user might want to adjust the font sizes

Kannada Font on Android ICS

ぃ、小莉子 提交于 2019-11-28 01:11:32
问题 I am supporting Tamil and Kannada fonts in my application. I use the following code to set the typeface of TextViews, Buttons, etc FONT_TAMIL = Typeface.createFromAsset(getAssets(), "fonts/tamil.ttf"); tvTitle.setTypeface(FONT_TAMIL); FONT_KANNADA = Typeface.createFromAsset(getAssets(), "fonts/kannada.ttf"); tvTitle.setTypeface(FONT_KANNADA); I am able to display Tamil characters properly even on GingerBread. But I am not able to show the Kannada font. Can anyone please help me to find where

Urdu font in textview

本秂侑毒 提交于 2019-11-28 00:57:42
问题 i have set urdu in textview and apply urdu typeface but is only showing word by word like ب ہ ن here is code : Typeface tf1 = Typeface.createFromAsset(this.getAssets(), "Urdu.ttf"); TextView textView = (TextView)findViewById(R.id.textView1); textView.setTypeface(tf1); textView.setText("یہ انگریزی نہیں"); 回答1: Asaalam-o-alakum bibi Tahira You can downlaod urdu Font from this link,i have tested it. Thanks 回答2: For Regional languages you need to read them as UTF-8 and then set the font. I have

Android Tamil font between english word

给你一囗甜甜゛ 提交于 2019-11-27 21:27:32
I am having a TextView that has a huge text in between i have a tamil word and i know how to embedd the tamil font in seperate textview .but i need the tamil word between english word please help thanks in advance my part of text in textview : Seasonal messages like welcome (நல்வரவு) is used in Kolam. Volunteering to draw kolam at temple is sometimes done when a devotee's Try setting this Akshar.ttf font to your TextView through setTypeface, it suuports both English and Tamil. Here is the outcome: Or, look for a similar font which supports both language. your second solution is to use image

Accessing a font under assets folder from XML file in Android

偶尔善良 提交于 2019-11-27 21:04:57
I am trying to do a application-wide font change and creating a style file to do so. In this file (below) I just want to change typeface value of TextAppearance style of Android. <?xml version="1.0" encoding="utf-8"?> <resources> <style name="NightRiderFont" parent="@android:style/TextAppearance"> <item name="android:typeface"> /***help need here***/ </item> </style> </resources> However font is in "assets/fonts/". How can I access this font, so I can use that style as a theme to get rid of changing all TextViews by hand programatically. As summary: How can I access 'a file from assets folder'

“RuntimeException: native typeface cannot be made” when loading font

↘锁芯ラ 提交于 2019-11-27 19:57:22
I am attempting to use a custom font for a TextView on Android, following the guide here . Using the same font, same code, same everything, I get this in adb logcat: W/dalvikvm( 317): threadid=1: thread exiting with uncaught exception (group=0x4001d800) E/AndroidRuntime( 317): FATAL EXCEPTION: main E/AndroidRuntime( 317): java.lang.RuntimeException: Unable to start activity ComponentInfo{org.evilx.quacklock/org.evilx.quacklock.MainActivity}: java.lang.RuntimeException: native typeface cannot be made E/AndroidRuntime( 317): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java

android - install font to android platform without root

五迷三道 提交于 2019-11-27 09:50:36
I develop new app that wrote (coptic) its an old Egyptian language , I need to install specific font to android platform make this language readable . I search if find app do the same function iFont plus when I access font folder, I find its allowable to install font Get fonts online , so how can I install font programatically to this folder thank you thiagolr It is not possible to install new fonts without root, the iFont app only works without root on very few devices (please check their app description). If you developed an app that needs a specific font, you should use the Typeface