Indic languages on Android browser/GUI (Gujarati) improper rendering - android

I have a website specifically for viewing on Android devices, I am using Gujarati languages and i have a big problem rendering the Gujarati Fonts properly, I atleast want a workaround to get the Gujarati fonts Working properly which is by default not supported on any Android versions. And so i did,
The Work around:
- Rooting the phone
- Finding the correct unicode font for Gujarati language
- Replace the existing DroidSansFallback.ttf in System/fonts with the Gujarati Font (with some extra changes in fontsfallback.xml in system/etc folder for ICS)
This Helped me to atlest view Gujarati texts, but not correct rendering.
The Problem:
1) Problem of Half forms, the half form letters are not rendering properly as they are suppose to combine but they dont,
If you refer to this faq on unicode.org, it clearly defines how it should render,I have also used the mentioned "Zero Width Joiner" by using html codes for every letter using [unicodeLookup][7] but it has no effect.
Anyways This problem is not primary as it is improper but still not incorrect.
2) This rendering problem makes the texts print incorrectly, See the two images below, First one is correctly render as visible on PC and second on is a screenshot from Android native browser
image
the problem marked as 1 are fist problem and the one marked as 2 are second problem, if you google "Devanagari - Unicode Consortium ch09" you will get a pdf refering to this problem (just goto "Figure 9-8. Rendering Order in Devanagari") which clearly explains the method to render the scripts correctly. It seems what ever android uses to render the scripts is not supported for such languages, if there is any change that can be made to Android OS to render the fonts in correct order, please help.
This is definitely not a problem with fonts as i have tried using Shruti fonts which is used by windows OS, it is a problem with rendering these complex scripts
Possible Solutions: (unwanted)
1) Using opera mini with bitmap fonts (not my solution)
2) Use Images instead of texts (again not my solution as my site will have 300 lines of lists and that too for mobile, do not want to increase page size)
Please give me a proper solution to this problem, thanks in advance !!

Rendering Gujarati (and other "complex" scripts, i.e. those which use half-forms, contextual forms, rearrangement, etc.) requires more than just fonts; it also needs text layout. Text layout capability is normally supplied by the host operating system or in some cases the application. Android has been improving text layout support, but even the latest version is still not complete for all scripts. In other words: you cannot easily fix this with fonts alone, even for recent versions of Android.
Possible workarounds:
develop some kind of plugin or extension that does correct Gujarati layout and require users to download/install the plugin to use your site. This will likely be a very high-impedance path, requiring a great deal of expertise in fonts, software development, and knowledge of the target writing system. Not to mention the inconvenience for your users.
develop a custom version of a Gujarati font and use corresponding custom text in your site that does not require text layout; supply the font via #font-face (webfont). This will also likely be fairly challenging if you do not have experience with font development, but would probably be the best path.
render the text to images; do browser-sniffing and supply images for cases where the client is known not to support complex scripts. This is likely to fail much of the time (hard to keep track of browser capabilities, not to mention the problem of reliably detecting browsers to begin with). But guaranteed to give the right results.

If you want to view your website in all devices just put webfonts in the your website. web fonts are embedded fonts that you put on your server and with proper css link everybody can view that without installing the fonts on devices.
For other websites not having web fonts use firefox for android and then get addon https://addons.mozilla.org/en-us/android/addon/gujarati-fonts-package. Now you can view all webpages in Gujarati fonts without any complex procedure or root the android.

Related

Text reflow in Android Webview

Text reflow has been removed from Webviews since the Android KitKat release. Unfortunately, Lollipop does not fix the problem. It seems that, for some unknown reason, Google has decided that text reflow is not needed:
https://code.google.com/p/android/issues/detail?id=62378
I am using Webviews to show HTML code produced by my application. So I have full control over both the HTML content and the Android application. Do you know of a way to implement text reflow after pinch-zoom by the user? Perhaps it can be done by modifying the HTML or using Javascript and/or CSS? After searching the web for a few days and trying some of the proposed solutions, nothing seems to work correctly.
Alternatively, is there a different control which supports both pinch-zoom and some basic text formatting (color, bold, size, etc)?
Finally, does anyone know why Google removed pinch-zoom text reflow? It worked perfectly on Android 2.2.

Emoji between ios and android

I want to be able to send messages between android and ios devices with the use of emojis.
I know the new android 4.4 supports emoji now but I want to support older devices (2.1 and up).
How do apps like whatsapp allow emojis to be written and viewed even though it is not supported? The only way I could think to accomplish this task is to create custom emojis by creating an image of many emojis and then using the x,y coordinates to get which emoji was selected. The issues with this could be copyright and then when new emojis come out I will always have to update the image and if a user doesn't download the new image they will still have the old emojis and won't be able to view the new ones.
So is there another way of doing this to allow ios emojis to be sent to android and vice versa?
Your custom approach could work. Just add another layer of abstraction -- download the emoji from a central server. Cache it locally. Periodically check to see if there is a new version, and download it. Because it'll remain really simple, old versions of the app will still be able to download and use new emoji whenever you update it.
That is a technical solution to your problem that'll support both platforms. Any copyright concerns are kind of off topic, and very specific to the set of emoji you end up deciding to use.
A large set of emoji have been added to the Unicode standard. So, they're basically just characters you could show with a font. For modern devices, a default font (with new OpenType color support) will be used to show emoji. For older devices, you could simply create your own font or use open source emoji designs and show them in old school black 'n white.

Devanagari/Marathi font

I am developing an Android app for regional magazine which is in Marathi language and from OS 2.2 and above. I am able to use custom fonts for the devices which does not support Devanagari/Marathi natively using typeface.
But the result is not desired and the Marathi text does not look any better. I have following problems with the custom fonts.
Extra horizontal space between two words or character
Extra vertical space between two line
Collapse of two lines
Does not works on all devices
Joint characters(जोडाक्षर e.g.'त्या') are not showing well
I have tried many fonts like utsaah,mangal,arialuni,shivaji but none of them have full support.
I have seen one of very good marathi app here which works on Android 2.1 and above. Can anyone please help me? How can I use a font which supports all Android devices?
I don't know if it is possible to fix the problems you listed in your question using custom fonts.
But let me suggest you an approach to display your content using WebView. In a WebView marathi should look fine. You can use custom fonts as well. The only difference is that instead of composing xml layouts you will have to create web pages (html+js) and package them in your app.
A couple of how-to-start guides:
developer.android.com
developer.chrome.com
An alternative to this solution would be using a framework. The app you referenced to (Sakal) uses Appcelerator Titanium.

Android - Hindi Conjuncts Support?

I do understand that Android device still doesn't support complex hindi conjuncts drawing, though we set the textView typeface to a commonly used hindi font (mangal.ttf or DroidHindi.ttf).
One of the Ex:
1st 2nd Conjunct
प् र = प्र
"प्र" is been shown as...प् र { list of frequently used conjuncts - link)
What I would be interested to know is - Though android devices(I am using Galaxy-SII, os2.3) doesn't support it yet, is there a workaround for this?
Similar questions (but no workaround yet):
Android: unable to show correct hindi words
How can i show HIndi text in Android Tablet
For the question-2: #Sahaja does mention that android device doesn't support hindi complex conjuncts drawing. So does it mean that we won't be able to do anything in this regard until android adds the support for it or can we have a feasible workaround?
One workaround, which I can think of:
Convert the whole hindi database into a custom non-unicode format & use a non-unicode font (like kiran.ttf - link) to display it. This sounds like too much of effort, not sure if this is a feasible solution (not tried it yet - kept as last option) or something else would also work?
Please let me know, your thoughts on the same.
(Note: This problem has nothing to do with what custom hindi font I use or is it ttf or otf.)
Thanks,
Shibbs
I have recently been through the same problem but unfortunately didn't find any solution. I agree that some of the text won't appear properly i.e. some of it may appear misplaced characters. If you try running it on device that is 3.0 or above (I am unsure of below 3.0), then you should be able to see it properly. Or try choosing en emulator with higher which has more than 4.0.

Android Japanese Fonts

I would like to find a different font than the standard one provided with Android for a Japanese app. I haven't been able to find any good information on it yet. My question is, are there alternative Japanese fonts available for the Android, which can be distributed with an app, and do not require rooting of the phone?
Any application can bundle a font within it for use within that app. Many TrueType fonts will work just fine. You will need to associate that font with each TextView (and widget inheriting from TextView, like EditText) via setTypeface() in Java. Here is a sample application illustrating this.
If, OTOH, you are trying to replace the system font, and affect all applications, that is at best achieved by rooting the phone, and it may require a full firmware replacement.

Categories

Resources