I am implementing multi-lingual (French, Chinese, Hindi....etc) functionality. As Hindi language does not support back compability (below 4.0 ICS), I forced localization using Typeface(akshar.ttf). While testing my setup out with Hindi, I came across a critical condition see the image below:
In this string I'm using अब स्क्रीन शुरू करें(Now, I start the screen) and उपयोगी लिंक्स (Useful links)
Supported devices: Samsung ACE, Samsung S Plus, Galaxy 551
Non-supported devices: Samsung Galaxy S2, HTC Nexus One, HTC Incredible S
Any idea why this is happening?
The problem is you cant directly put a hindi font inside where as we need to convert it to unicode and put that. We came up with the same issue and we acheived it by using unicodes instead of fonts.
Might be little late to answer, still posting if this helps someone.
Problem is might be with android unicode font rendering.
The easiest way to solve your issue is find an ISO charset based font (if available :), try this http://www.gbpuat.ac.in/hindifonts.htm ) and embed with your app.
Otherwise you need to reorder the unicode characters to get it work. The reordering of characters might be different from device to device.
Hope this helps.
You need to put unicode characters everywhere to confirm on all the devices. Here is the site that may help you in finding unicodes
http://unicode-table.com/en/
Related
I have following problem. My custom font in Wordpress, Wittenberg and Drunk Text Wide Medium, work fine in Android devices as well as in Chrome and Firefox on a PC, but not on the new Safari 14.0 version as well on all browsers in iOS devices.
It only happens with special characters like ¿ or letters with accent marks. For example I will attach some screenshots:
First example
Second example
How can I fix this issue?
Text may not display correctly if the web page uses characters that are not part of the default text encoding and the page does not indicate the correct encoding.
Is your page encoding in UTF-8 ?
https://support.apple.com/fr-fr/guide/safari/ibrw1031/mac
We're using a custom ttf font (Calibri) for an app and it renders really badly on Samsung 4.4.2, in some cases no text is rendered at all. On other tested devices and Samsung with other versions (4.4.4, 4.1.2), there are no issues at all. For two Samsung devices (the only two we have with 4.4.2) it looks like this:
We are using the MagicViews library (https://github.com/ikocijan/MagicViews) to deal with custom fonts, so far we didn't have any problems with it.
EDIT:
This also happens when loading the font manually, without the library.
To answer my own question.. we solved this by using an .otf version of the font instead of .ttf. My guess is Calibri uses some feature of the ttf format which doesn't work well in this case.
In farsi letters are attach together to form writing scripts. However when I save HTML pages using "UTF-8" or "Windows-1256" encdoings, and try to display them using webview in android, letters are diplayed seperately and in left-to-right direction (instead of RTL).
I should notice that this case is not happening in phones supporting farsi.
Correct form should be like this (snapshot from phone supporting farsi):
Bad-formed text happens in phones not supporing farsi (Persian):
It should be noticed i've used persian font in both cases.
I also see some solutions for normal Strings in java which changes character on by one in this
question
My question: Can i fix this cases (or it should be fix by phone vendors)? if possible what is solution?
I hit this bug a lot when I was doing keyboards. The problem is that the build in canvas.drawText function in Android didn't support RTL languages. There was a patch for it, but it wasn't part of the default build of Android. So only models going out to those parts of the world that used it tended to have it. Unfortunately I know of no way to test whether it has the patch. And if it doesn't, there's no way to fix it. You could try reversing the text, but then you'd break devices which did have the patch.
Long story short- there is no way to fix it. However, I'd be shocked if Google hasn't picked up the patch in mainline by now (it existed back in the 2.2 days), so its a shrinking number of phones effected.
You can try making html with reverse font sequence! just write a windows app to get font and deliver reverse one, and use it in your android device
While I'm developing responsive website I have used this uni-code ( » ) to the read more links. It is displaying correctly in desktop browser but it is not displaying correctly in mobile devices like android or iPhone. Is it possible to display the same as in desktop..? What's the problem..? Whether the mobile device doesn't support uni-code..?
The problem is in the embedded font you use, via #font face. The version used by Android is apparently broken. It does not display “»”, and it has problems with many other Latin 1 Supplement characters too, see my test page. Something may have gone wrong when you set up the font files on your server.
The problem does not appear if you remove the font-family setting, letting each browser use its default font, or if you use Droid Sans as hosted by Google, using <link href='http://fonts.googleapis.com/css?family=Droid+Sans' rel='stylesheet'> and font-family: "Droid Sans", sans-serif.
The problem is most probably not in the display of a character (“»”, U+00BB RIGHT-POINTING DOUBLE ANGLE QUOTATION MARK, is very widely supported in fonts) but in the character encoding. If the encoding is not properly declared, different browsers may make different guesses.
Check out the W3C page Character encodings, and make sure that the declared encoding matches the actual one.
If problems remain, please post a URL and explain what “is not displaying correctly” means (not displaying at all? space shown? some wrong characters shown? which?).
android does not support special characters, in android we need to write > to show ">" character. why don't you use image instead of characters.
I have an app that I have written that works fine on the Samsung Galaxy S series (I have a captivate). However, the app apparently doesn't work on the Droid's as Motorola has laid out the file structure differently.
I'm looking for a way to detect the manufacturer so that I can switch out program behavior.
Does anyone know an easy way to do this?
android.os.Build.MANUFACTURER is probably what you want.
Bear in mind that the file structure is likely to vary on other devices as well, as that's not part of the public SDK.
This what you need in addition to manufacturer:
android.os.Build.MODEL;