custom-font

Custom text font inside a Simplecursoradaptor

自闭症网瘾萝莉.ら 提交于 2020-01-04 02:56:07
问题 I have made an application where i use a SimpleCursoradapter. String[] from = new String[] {"title","notes","image"}; int[] to = new int[] { R.id.esodaTextView, R.id.amountTextView, R.id.imageView1}; esodaAdapter = new SimpleCursorAdapter (this, R.layout.recipe_list_item, null, from, to); As you can see i show the three data at 2 TextViews (esodaTextView + amountTextView) and at one imageView. The question is how can i set a custom font (that is saved at assets folder) to these 2 TextViews

Custom Arabic font is not working on Android using jQuery mobile 1.4.0 & phonegap

蓝咒 提交于 2020-01-02 14:05:54
问题 I have been trying to use custom arabic font file "ttf" in my jQuery mobile 1.4.0 & Phonegap app for android but it didnt work on android version 4.x , the default arabic font displays in the emulator and in the actual device not my custom font . How can I use custom arabic font in jQuery mobile 1.4.0 and phonegap for android v4.x and makes it work ? Please help me .. @font-face{ font-family:'W3Arabic'; src: url("Fonts/W3Arabic.ttf"); } font { text-shadow:0 0 0; -moz-user-select: none;

Custom Arabic font is not working on Android using jQuery mobile 1.4.0 & phonegap

牧云@^-^@ 提交于 2020-01-02 14:04:39
问题 I have been trying to use custom arabic font file "ttf" in my jQuery mobile 1.4.0 & Phonegap app for android but it didnt work on android version 4.x , the default arabic font displays in the emulator and in the actual device not my custom font . How can I use custom arabic font in jQuery mobile 1.4.0 and phonegap for android v4.x and makes it work ? Please help me .. @font-face{ font-family:'W3Arabic'; src: url("Fonts/W3Arabic.ttf"); } font { text-shadow:0 0 0; -moz-user-select: none;

Use custom font from res/font with WebView in Android

柔情痞子 提交于 2020-01-01 04:29:07
问题 I want to change font face of html string loaded into WebView similarly as mentioned in this question: How to change font face of Webview in Android? The difference is that I am not using old approach where you store you font files in assets folder, but I store them in res/font as described in "Fonts in XML" android font support documentation: https://developer.android.com/guide/topics/ui/look-and-feel/fonts-in-xml.html Now, I obviously can't use: file:///android_asset/fonts/my_font.otf I

Injecting CSS rules into the page in Android Browser

浪子不回头ぞ 提交于 2019-12-24 20:00:01
问题 I'm writing a JavaScript to inject a new CSS rule into pages in Android browser in order to display some text in a custom CSS font (after some replacement). Here is how I tried to inject the CSS rule: var css = '@font-face {font-family:"font"; src:url(http://www.example.com/font.ttf);} si{font-family:"font"}'; if(document.getElementsByTagName("style")[0]){ var style = document.getElementsByTagName("style")[0]; } else { var style = document.createElement("style"); style.type = "text/css";

How to use a custom font inside a UIWebView

隐身守侯 提交于 2019-12-24 18:38:37
问题 I'm working on an iPhone application that use UIWebView which load xhtml files the html file could include css file that use custom fonts, but it's look like that the web view doesn't support custom fonts since it doesn't render the custom font in the css file example: xhtml file: <head> <link href="../Styles/p1.css" rel="stylesheet" type="text/css" /> </head> <body> <p class="line1">تجريب</p> </body> </html> css file: @font-face { font-family: "AHRAM"; font-style: normal; font-weight: bold;

Get font face from ttf file

醉酒当歌 提交于 2019-12-24 14:01:05
问题 In my iOS app I use custom fonts, dynamically loaded from files. To use them in code, I need to know loaded fonts' families. So, is there any way to do it? UPDATE: I can't somehow hardcode font families, cause my app loads it from server. Of course, there is a way to pass font families in server response, but for now I'm looking for a better version that doesn't influence the server (doesn't need to change it). 回答1: Font loading I did... NSData *fontData = [NSData dataWithContentsOfFile

Runtime Exception: Font not found for every font i've tried - Android

只愿长相守 提交于 2019-12-24 08:18:57
问题 I have a custom extended TextView I am using for custom fonts within my application, but for some reason I keep getting a run-time exception where the program can't find the font in question. The format of the directory I'm using is main > assets > fonts > Portrait-Light.ttf I've looked everywhere for a solution but they all seem to be rounding to the same answers on SO. CustomFontTextView.java : public class CustomFontTextView extends TextView { public CustomFontTextView(Context context) {

Parameter is not valid when draw text in label with custom font

杀马特。学长 韩版系。学妹 提交于 2019-12-24 00:45:23
问题 I have label with custom font and timer which change value in label. My app start minimzed. When I displaying the app sometimes exception is displayed and insted of text in label is red cross. here I try call async method for label text change private void timer1_Tick(object sender, EventArgs e) { // create a delegate of MethodInvoker poiting to showTime function. MethodInvoker simpleDelegate = new MethodInvoker(showTime); // Calling showTime Async simpleDelegate.BeginInvoke(null, null); }

using custom font in xaml

一笑奈何 提交于 2019-12-23 20:15:46
问题 I need to use custom font in xaml (c#). The font is not installed on the computer. If the font is in the application installed folder,then i can use it even if it is not installed (/Fonts/New12.ttf#New12) My problem is that the custom font is been created on the local computer and can't be in the installed folder. The problem is that i can't copy the ttf file to the application installed folder , and i don't know how to use custom font that is not on the application installed folder Is anyone