Custom Arabic font in iOS

Short answer This seems to be a bug in iOS. Long answer As you may know, the arabic text needs to be shaped before it can be rendered, that means converting the basic letters (Unicode:0600-06FF) to their proper corresponding contextual letters (Unicode:FE70-FEFF). iOS does this preprocessing automatically for arabic text, but for some reason, it … Read more

Add custom font for complete android application

I figured it out by my self. This is the code I used. I create custom TextView which has custom font as default font. public class MyTextView extends TextView { public MyTextView(Context context, AttributeSet attrs, int defStyle) { super(context, attrs, defStyle); init(); } public MyTextView(Context context, AttributeSet attrs) { super(context, attrs); init(); } public MyTextView(Context … Read more

Custom Fonts in Android PhoneGap

I made it work after doing the following steps: -Put your CSS in a file, for example my_css.css: @font-face { font-family: “customfont”; src: url(“./fonts/arial.ttf”) format(“opentype”); /* Make sure you defined the correct path, which is related to the location of your file `my_css.css` */ } body { font-family: “customfont”; font-size:30px; } -Reference your CSS file … Read more

How to use custom font with WebView

loadData didn’t work for me either, so I used file:///android_asset in the src path. It worked with loadDataWithBaseURL! For this example I changed the CSS to: @font-face { font-family: ‘feast’; src: url(‘fonts/feasfbrg.ttf’); } body {font-family: ‘feast’;} Then use the assets path as the base url: loadDataWithBaseURL(“file:///android_asset/”,myhtml,”text/html”,”utf-8″,null);

How to change font face of Webview in Android?

There’s a working example of this in this project. It boils down to: In your assets/fonts folder, place the desired OTF or TTF font (here MyFont.otf) Create a HTML file that you’ll use for the WebView’s content, inside the assets folder (here inside assets/demo/my_page.html): <html> <head> <style type=”text/css”> @font-face { font-family: MyFont; src: url(“file:///android_asset/fonts/MyFont.otf”) } … Read more