As the Roboto font family is updated, do its metrics ever change? - android

As pointed out here and here, Google updates the Roboto font periodically to respond to criticism, add glyphs, improve legibility, and so on. Are the metrics locked? Do any of these changes cause text to flow differently?
In other words, can an Android app that's compatible with ICS (API 14) and up use Roboto for its text and trust that the labels will take the same amount of space on ICS and Lollipop? Provided, of course, that the screens have the same properties (dpi, dimensions, resolution, etc.)
A system font is effectively part of a windowing system's public API. If the metrics change, then an app which is coded to expect a piece of text to fit within a certain box may break.
The Roboto font is as fundamental to Android as Arial and Verdana are to Windows. As Microsoft puts it,
Note that some values associated with UI fonts and default fonts used in Microsoft apps are locked. UI fonts are used to render UI elements like captions, dialogs, and menus. Very few changes are made to these fonts, given their high visibility and frequent use.

A roboto developer has responded to the issue I filed on the roboto github, saying
I understand that metric compatibility would be helpful, but we don't have any plans for metric compatibility. The fonts are still far from stable, and it's too early to consider metric stability.

Related

Prevent fonts and sizes to change on deployment in Qt/Felgo

I recently distributed my app made with Felgo (and Qt) to Android using Microsoft App Store. Until now, I have been testing using a Felgo live client. However, though everything else works, one big thing I noticed is that all the fonts and font sizes where completely messed up. I believe this is because it is using Android native fonts instead of what I set in my code.
Is there any way I can fix this so that all my fonts are the same as what I tested with the live client?
Fonts in Felgo should use the sp() method for scaling correctly, also the fontSize property should not be set with sp or dp scaling, since it's already scaled internally using the sp method, so it's unit is device-independent. This should preserve your font sizes across different platforms.
AppText {
fontSize: 18 //same as font.pixelSize: sp(18)
}

Does specifying "Roboto" in a "system font stack" actually do anything?

A recent trend in CSS is to use a "system" font stack, which utilizes fonts designed for the user's operating system. Typically this looks something like this:
body {
font-family: -apple-system, BlinkMacSystemFont,"Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell,"Helvetica Neue", sans-serif;
}
This type of font-stack has been adopted by Medium, Wordpress, Github, Bootstrap, Booking.com and many others. All of them include "Roboto" for Android version 4 & up. My question is, why? What would happen if "Roboto" was removed from this stack?
From my testing, even when you switch system fonts on an android device (in settings), the browsers default "sans-serif" font is always Roboto.
Is there any device or browser out there that does not set Roboto as the default sans-serif font when it's available? If not, why is Roboto included in these font stacks at all?
... why is Roboto included in these font stacks at all?
The answer is quite simple: to make sure.
Here's how you should translate it:
If Roboto font family is installed on the system (or the browser is capable of applying it) from either own or loaded CSS #font-faces, it should be used when none of the afore mentioned font families resolve successfully.
Does it matter if any current device doesn't actually make it until Roboto because most resolve the same font earlier in the stack, since it's default system font? Not really. Because nobody knows what new device might get launched next year and that one might benefit from specifying Roboto in the stack.
Considering the possible impact on the page, font-family is really not the place where you should optimize your app. Besides, the font family list can be 1km long. Everything past the first font that resolves is ignored, so it's, actually quite cheap from a technical point of view.

What is the default font used in android if developer didn`t specify any

I want to know what is the default font that is used by Android OS for my app if i didn`t specify any font to be used.
This post didn`t help
Thanks in advance for any help
The default font varies phone to phone. The default font can be set by the user on certain varieties of Android (like Samsung phones), and on others the default font is set and cannot be changed by the user. There is no single default font.
For the devices that run stock-Android, according to Material Design Guidelines:
Roboto is the standard typeface on Android.
But in case that you use languages not covered by Roboto (check the same link to see all languages covered by it), the typeface will be switched to Noto
Noto is the standard typeface for all languages on Chrome and Android for all languages not covered by Roboto.
That being said, the actuals fonts differ depending on the place where they are used (see below some examples from the same guideline)
App bar
Title style, Medium 20sp
Buttons
English: Medium 14sp, all caps
Dense: Medium 15sp, all caps
Tall: Bold 15sp
For the pre-Lollipop devices, the same rules apply, but you might notice some changes between different versions since Google refined Roboto as the time passed.
However, all the above are true only for stock-Android, the rest of them having a predefined typeface/font based on the device or manufacturer. As Eli Sadoff stated, most of these devices let the user pick a default font which will be used across all apps (without exceptions), even if you have a custom font for your app.
PS: Make sure to read everything form the provided link because you'll find more useful information.

Design android layouts suitable for large text users

I'm a visually impaired developer, and I'm trying to figure out how to design good layouts for users that have the largest text enabled on their android devices. I made a good app layout and it looked fine in the designer and the emulator and it looked fine, the tested it on my device with large text on, and everything was incredibly wonky: Text was wrapping onto multiple lines and noting scaled properly. I turn off large text and everything is perfectly fine.
How do I do this? Other apps with large text are fine. What measurement should I be using and what text style/Size is the standard?
If you are looking for standard design principles supported by a strong Case to case study the Material Design Documentation is the right place to look at.
This documentation itself is created by the great minds from Google. All the thing being presented here is the do and don't.
What measurement should I be using and what text style/Size is the standard?
In general, You need to test the different system font size on different screens to make it looks good, get the font size and test it(Read font size from Settings). In my practice, use wrap_content instead of fixed height in ViewGroups(LinearLayout), and there is no standard style/Size, only the product UI design matters. In some apps like WeChat it defined custom app fontSize which will NOT be affected by the system settings, and DO the multi-devices adapt with it's own font system.

Azerbaijani language support by Android 2.2?

According to this Azerbaijani language is not supported by Android 2.2 - however they claim "Note: Android supports more locales than are listed above.".
So how it is actually ? Is there support for Azerbaijani language? Are there issues writing applicaiton which have to display text in Azerbaijani?
Try just writing a test application that just displays some Azerbaijani text in Unicode. If it looks right, then your Android device has a Unicode font that includes the characters used in Azerbaijani.
If the text is not rendered correctly, then your problem will be adding the right font. On Mac OS X you would just drag-and-drop a font file into the right folder, but on Android you will need it installed in the operating system's display server. That might not be possible if you want to run on handsets that are locked down by their manufacturer.
If the font isn't there, maybe you can find a good Open Source Unicode font for Azerbaijani. File a feature request with the Android developers to get the font into the next release of Android. Unfortunately you'll have to wait a long time and will only work with recent releases.
If you're really desperate and you're willing to go to a lot of effort, you could build a font rendering engine into your application. I don't think that has to be as hard as it sounds. Then you will be able to run on any Android release and you won't have to wait around for the handset manufacturers to pick up the response to your feature request.
Locale.getAvailableLocales()
That method returns an array of all supported locales.

Categories

Resources