Firemonkey: label cutting accentuation - android

I'm developing an app for android using Rad Studio 10.1 and I'm having trouble with a new font that I'm trying to implement into my project. The problem is, I have to use accentuation in my app because is for portuguese language users, and portuguese has a lot of accentuation. I found a good font on the internet and I want to use, but when I put into a label, the label cuts the top part of the text. An image to explain better:
As you can see, just the accentuation of the top are being cutted, should be a 'Ã'. The bottom accentuation 'Ç' are just normal, and this just happen with UpperCase texts. Someone have any idea why this is happening?
EDIT: Aditional information: The TLabel is alredy set on Client Alignment

Related

TextView text size and other properties

so I was developing an app with Android Studio and I added a 'textview' box in the screen. However, when I tested the app on my device, the text was too small to read. So I tried searching on the web about how to change the text size, but I could only find videos and posts about how to change the font of the android studio product itself. Please tell me how to change the text size in the textview box. I would appreciate any help.
You can add the following property in the text view's xml and start increasing the number till you reach the font-size you want
android:textSize="20sp"
The sp here inherits the font size the user sets in his/her android device so the same font size may vary on two identical devices

Text is not looking right on some devices while using custom font

I have made an application. My application is using the custom fonts to be applied on the text views to show text in specific style. All thing was working good and looking impressive Until I tried my app on Samsung 10" device.
On 10' tablet I saw my text is not even readable and not looking cool. Its just got cut from bottom and from top. And some words are overlapping each other.
Where as 7" tablet is showing this good. and there is no problem of any sort of in other device.
So this means that custom font file is not damaged.
So my questions are:
1) Why 10' tablet is not showing the text right when I applied the typeface and custom font. But When I remove the custom font type face its all start looking cool.
2) what is a way to set the typeface (Custom font) to be look good in all devices. ?
please help me. It is the last thing I have to do in my app.

Android special characters converted to images in WebView?

Special characters such as
📂 ★ ✉
Are being replaced with images in the Android OS. As you can see, this seems to affect native TextViews (see screenshot).
My problem is they are also affecting the HTML I am loading through my app via WebView. The main problem is stars of different colors are all showing up as the same gray star. And other than that, you can imagine the visual inconsistency problems that arise.
If you load this page on Chrome for Android, the characters don't load at all. But if you copy the question and paste it into a plain text program such as ColorNote, you will see what I'm experiencing.
Is there a way to get my own WebView or even my entire app to use the font-family, rather than an image?
A wild guess, since I've only heard about this happening on iOS now.
How can I disable the unicode black telephone from being rendered as a red phone on iOS Mail app?
I need help getting a normal looking unicode down arrow in a UILabel like this ⬇
Unicode has this nifty thing that's called "Variation selectors", which can be used, among others, to select a variant shape of a letter, or to select whether a glyph is to be rendered as a black-and-white standard glyph, or as a colourful picture.
This variants are characters \uFE00 to \uFE0F. In case of emoji, \uFE0E means "render the previous character as a black-and-white glyph", and \uFE0F means "try to draw the previous character as a colourful picture".
So in your case, add \uFE0E after the character.

How to display Thai diactirics properly on Android?

A short preface. Thai script has vowel signs that may appear above the consonants, and also there are diacritic signs (DS) that also appear above the consonants; when both vowel and DS present, they appear one above other, so the vowel is set above the consonant and the DS is set above the vowel.
I am writing an application that will display text in Thai. Everything looks perfect in the emulator (API 10) but not on the real device (Samsung GT-I9001 with Gingerbread 2.3.6).
I've prepared two pictures to illustrate the problem. I have a simple layout that has the only TextView at the top; two words พี่สาว and ไม้ are displayed in that view.
This is how it should look like (a screenshot from the emulator):
The first character has a vowel and a DS above the vowel, and the last character has the DS only.
And here is a screenshot from my phone:
Both DS have slid down and now the vowel and the DS overlap each other above the first character. Note that the last by one character appears lower than it should (it should be whole line tall like you may see on the first screenshot).
I've found that the problem is system-wide: I've copied these Thai words to a simple web page and loaded it in the web browser in my phone, and got the same problem. It seems like the font rendering is broken.
So the question: how to bypass this? Do I need to install fonts (how?) or maybe some language pack (again, how?), or the only way is upgrading the Android?
PS: no problem on Android 4.0.4. Perhaps only old versions are affected.
Update: WarrenFaith has given a promising advice about setting the custom font. However this appeared to be not as simple as it looks. I've tried several different fonts including Roboto (introduced in ICS), Verdana from the msttf Linux package, and some others. To see that the font is really loaded and applied, I've added some Latin and Cyrillic characters to my text.
The result is funny. Only the Latin and Cyrillic characters change, but not Thai ones. Looks like the fonts don't have the required glyphs and Android replaces them with ones rendered using some default font.
(I don't understand why Roboto didn't work; it's the official Android font—shouldn't it have full support for the whole Unicode?)
So it seems like I have to find the font that has Thai glyphs.
And I'm still wondering what font is used by default in Android 4.0.4.
Happy end: thanks to WarrenFaith's advice, Google, and this blog article.
If the default text/font is broken, you should provide a font you know that will work. To implement the font, you can use the following answers:
Android - Using Custom Font
Using a custom typeface in Android

Using hebrew with the android emulator

I want to be able to run a "Hello World" application on my android emulator in hebrew
How can I do that? is it supported?
thanks
Though android does not have complete support for Hebrew if you are just displaying text, then it turns out to be pretty easy to do.
First you want to add a Hebrew font to your app. For this you simply put a true type font file (with Hebrew characters) in your assets directory. Then you load the font and use it on your view. For any view that inherits from TextView (which includes just about any view that displays text), you do the following:
AssetManager assets = getAssets();
Typeface font = Typeface.createFromAsset(assets, "hebrewfont.ttf");
view.setTypeface(font);
This will cause Hebrew characters to be visible. You may need to use the RTL mode character (\u200F) to force your text to display in the correct order. You may also need to set the gravity to right in order to right align the text.
I've found no way to get the scrollbar to appear on the left side. :( Cantilation marks to however display properly starting in android 2.2. I've tested Nequdot in all versions since 1.5, and they work as well. You may want to use some of the precombined characters, such as shuruq (\ufb35) instead of vav+dagesh (\u05d5\u05bc), as this isn't necessarily handled properly.
I have had good results with the DejaVu font, which is freely available.
Although this has been asked a long time ago, there is a native Hebrew support in later versions. The avd with API15 (Android 4.0.3) can display Hebrew nicely out of the box. I'm not sure which version is the earliest with this capability.

Categories

Resources