Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

(How) can I use native Android fonts in the browser simply by css without web fonts?

I'm trying to make a web app without the use of web fonts to keep browser requests at an absolute minimum.

At the same time, I'm trying to use only "good-looking" slim fonts for Headings etc.

This is basically no problem: iOS and Mac OS have HelveticaNeue-UltraLight natively, and Windows (Phone) has Segoe UI (WP) Light.

The fonts do not look the same, but they give a similar overall style and I don't have to use a single webfont. All can be addressed directly via css "font-family".

Is there a way to get a similar appearance on Android? Android has Roboto Light, which would perfectly serve my requirements, but it seems impossible to simply address this via css styles without webfonts.

like image 571
tomcat Avatar asked Nov 26 '22 08:11

tomcat


1 Answers

You can use

font-family: "HelveticaNeue-UltraLight", "Segoe UI", "Roboto Light", sans-serif;

Each OS try use font from this list in course. When the browser finds a font that is present in the system, it will start to use it. iOS will use the font "HelveticaNeue-UltraLight" and ignore other. Android will use the font "Roboto Light" ...

like image 137
Anon Avatar answered Dec 04 '22 11:12

Anon