Tuesday 10 June 2014

Use Fontello in android and iOS Application
Now days we make android and iOS application. But In this application we have to make different size of icon for all OS. And its create trouble. Like iOS developer want X and 2X and android developer want different size of images.

So sometime designer is confused which size of icon use in android and iOS development.


So here we found one best solution for this. We use font as image. We use fontello for icons.




About fontello?


Fontello is one type of font, which content symbols as font. Benefits of use fontello developer can change color and size easy. And it size is also small so it did not take loading time.


Scalability: Font-based icons are resolution independent and can be scaled to any desired extent.


Size: In this case, you won't need to cater for different target devices, your app only needs to be equipped with a single file that will be loaded only when your app starts.


Maintainability: you will only need to maintain this single file throughout your project.


Adoption: There are many free and professional tools that help you incorporate them in a breeze and see great results quickly on almost any mobile platform, web browser or operating system.


Flexibility: One of the most significant benefits of using icon fonts is the ability to manipulate them. Any request to change color, size, or appearance can be made on the fly and tested by changing only a few lines of code.



Using icon fonts on iOS


Using an icon font for iOS development is pretty straightforward. All you need for this tutorial is a basic understanding of the file structure of an iOS app and your icon font file as a .ttf. Once you've created the project, copy the font file into your application folder. Ideally, it will show directly in your Project Navigator.






Now that the icon is referenced, you're all set. As we're going to manipulate the label through code, you'll need to run your app to see the results of your work. All text manipulations such as colors, transparency, gradients and shadows are now in your hands.


Using icon fonts on Android


In terms of the application area, Android is even more interesting as there are by far more different screen resolutions and densities available for this platform. On top of that, Android doesn't support vector graphics by default.




Your icon font file as a .ttf. You can start off by creating a new Android Application Project with a Blank Activity. After your application is set up, go ahead and copy the ttf file into the assets folder of your project. Once copied successfully, it will show up in the Package Explorer.

Next, you want to create a TextView in the View of your Main Activity.

Your TextView should look like this:


TextView iconLabel = (TextView) findViewById(R.id.iconLabel);

Typeface font = Typeface.createFromAsset(getAssets(), "fontello.ttf");

iconLabel.setTypeface(font);

iconLabel.setText("\u2692");



Android which custom font we'd like to apply to this TextView. In the following line we then apply the encoded Unicode character


Summary


The use of icon fonts can have an incredible impact on the quality of your native app development. Considering the scalability of icon fonts, it's almost possible to forget about screen densities or resolutions when designing for any kind of mobile device. Manipulated during runtime to support real-time effects.


Great improvement to your workflow by requiring less effort and delivering better results no matter what resolutions or screen.

2 comments: