android-fonts

Does Android support Windows fonts? and how to write Unicode text into a textview?

陌路散爱 提交于 2019-12-12 05:47:27
问题 Is it possible to use Windows fonts (.ttf file) in Android applications? I have some unicode-8 texts like this: جۆرەه and I want to put it into a textView,, I tried some other methods but they did not work. Now, I want to embed a font into the application to read the text correctly.. By the way, it is Kurdish Language.. Any help is appreciated 回答1: Well, yes you can use .ttf files in Android Applications. Navigate to your Android project's src/main folder, make a new folder assets there and

How to set same font family to entire android application

会有一股神秘感。 提交于 2019-12-11 09:37:07
问题 Hello I want to set same font family to entire Android application. I have seen this Is it possible to set a custom font for entire of application? but this all doing using code. I want to set in Theme such that it will work in all. It should convert the font family of ActionBar text also. Any way to do this ? styles.xml <resources> <!-- Base application theme, dependent on API level. This theme is replaced by AppBaseTheme from res/values-vXX/styles.xml on newer devices. --> <style name=

telugu text using json

心已入冬 提交于 2019-12-11 07:58:01
问题 Is it possible to retrieve text written in telugu from the server for use in application. I have used the below format for Json. It is giving me error in some symbols at the logcat of the avd. If not which would be suitable for getting such kind of text. { "contacts": [ { "id": "c200", "name": "అశ్విని", "email": "అశ్విని@అశ్విని.అశ్విని", "address": "అశ్విని", "gender" : "అశ్విని", "phone": { "mobile": "అశ్విని", "home": "అశ్విని", "office": " రేవతి" } }, { "id": "c201", "name": "అశ్విని ram

Multiple fonts for multiple languages

99封情书 提交于 2019-12-11 02:00:56
问题 I have recently come across a situation while developing an app where i have to display different languages in text view . currently I am displaying few using fonts/typeface like this : Typeface tf = Typeface.createFromAsset(this.getAssets(), "DroidHindi.ttf"); TextView textView1 = (TextView) findViewById(R.id.textView2); textView1.setTypeface(tf); textView1.setText("कचजड, कचजड"); Typeface tf1 = Typeface.createFromAsset(this.getAssets(), "asunaskh.ttf"); TextView textView = (TextView)

Using Roboto thin or condensed

做~自己de王妃 提交于 2019-12-10 12:36:33
问题 Is it possible to use Roboto thin or condensed style in ICS without having to include the .ttf and load it manually, I mean without using: Typeface.createFromAsset(this.getAssets(),"fonts/DroidSerif-Bold.ttf"); 回答1: Versions of Android older than 4.1 include just four basic styles of Roboto: Regular, Bold , Italic and BoldItalic . There is no way to use thin or condensed styles in ICS without assets. Android 4.1 (JellyBean, API16) and up includes several more Roboto styles: Regular Italic

How to add locale(with country) to font resources (Support Library v26)?

假如想象 提交于 2019-12-10 02:58:40
问题 Google published the official font resources handling since support library v26 released: https://developer.android.com/guide/topics/ui/look-and-feel/fonts-in-xml.html However, looks like I cannot add country qualifier for the font resources folder. I have an app which has 3 languages: English, Traditional Chinese and Simplified Chinese. And I tried to name my font folder under res this way: font font-zh font-zh_CN (I have also tried font-zh-CN ) (Note that zh is the language, while CN is the

I don't use unicode characters in my android-textview.How can I do this?

时光怂恿深爱的人放手 提交于 2019-12-10 00:36:39
问题 I don't use unicode characters in my android-textview.How can I do this? my xml : <?xml version="1.0" encoding="utf-8"?> and I don't use unicode characters in android textview,edittext,.... 回答1: Summary of comment thread: Save .txt file containing şile as UTF-8. (For Notepad, best: UTF-8 without BOM.) Load from code using a new InputStreamReader(inputStream, "utf-8") . 来源: https://stackoverflow.com/questions/9108876/i-dont-use-unicode-characters-in-my-android-textview-how-can-i-do-this

android : html loaded without font

戏子无情 提交于 2019-12-08 04:09:38
问题 my html file loaded in webView but still without font my font has Unicode characters i work on android 2.2 mWebView.loadUrl("file:///android_asset/P_007.html"); my css: <STYLE type="text/css"> @font-face { font-family: AQF_P007_HA; src: url("AQF_P007_HA.TTF"); } body { font-family: AQF_P007_HA; font-style:normal; font-weight: normal; color: black; font-size: medium; mso-font-charset: 0 } </STYLE> 回答1: copy font to a directory in asset folder like "fonts" and use this instead: <STYLE type=

How to use typeface in notification?

冷暖自知 提交于 2019-12-07 17:31:48
问题 Is it possible to use typeface in notification message, so that I can change the font? I have searched all over internet but couldnt get any solution or code.So that I cant tell you, what I have tried so far. Any help would be appreciated. Thank you... Edit: I have found here that we can use custom layouts for notification.So, is it possible to access textview in custom layout, and use typeface? 回答1: Notifications contain textViews and you can always setTypeface on textViews. 来源: https:/

android : html loaded without font

旧街凉风 提交于 2019-12-07 15:48:26
my html file loaded in webView but still without font my font has Unicode characters i work on android 2.2 mWebView.loadUrl("file:///android_asset/P_007.html"); my css: <STYLE type="text/css"> @font-face { font-family: AQF_P007_HA; src: url("AQF_P007_HA.TTF"); } body { font-family: AQF_P007_HA; font-style:normal; font-weight: normal; color: black; font-size: medium; mso-font-charset: 0 } </STYLE> copy font to a directory in asset folder like "fonts" and use this instead: <STYLE type="text/css"> @font-face { font-family: AQF_P007_HA; src: url('file:///android_asset/fonts/AQF_P007_HA.TTF'); }