Forum Moderators: not2easy

Message Too Old, No Replies

android browser fonts

         

lucy24

3:12 am on Mar 2, 2015 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



This question came up in a different venue, and I would prefer not to have to say "I have no idea".

Do Android browsers recognize @font-face rules? (Is there a default Android browser? I did say I was starting from an I-have-no-idea position.) I know that iOS does, and apparently Windows tablets don't mind either. Are there any special circumstances, such as location or format of the font file?

I don't personally know anyone with an Android, so direct experimentation is out.

ken_b

3:28 am on Mar 2, 2015 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



The default Android font is Roboto, which I discovered the other day while trying to figure what font a site was using.

I know it on my Android tablet it changes the times roman to their default font.

And I believe they recently modified Roboto, but I don't have the reference right at hand.

.

lucy24

4:43 am on Mar 2, 2015 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Oh, dear, that wasn't what I meant. The question was: When you open a web page in an Android browser, and that page includes fonts referenced by @font-face rules, will the browser understand and follow these rules?

ken_b

5:14 am on Mar 2, 2015 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Ahh!

OK, if I specify the font as
font face="Times New Roman, Times, serif

it doesn't get changed to Roboto.

but maybe that's not what you wanted either, it's not a CSS rule, just old fashioned <Font... etc.

.

not2easy

6:18 am on Mar 2, 2015 (gmt 0)

WebmasterWorld Administrator 10+ Year Member Top Contributors Of The Month



I knew Android wanted Roboto, but looked it up to see what else but decided to do that in the morning. Roboto is the default, yes and if you weren't having enough fun, they would prefer that you use their own sizes - in sp or scale-independent pixels. Help yourself here: [developer.android.com...]

lucy24

7:41 am on Mar 2, 2015 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



No, really, I meant exactly what I asked. Not "do Android browsers understand basic HTML and CSS declarations having to do with fonts" (it would be pretty outrageous if they didn't) but specifically can they follow @font-face rules?

Like:
@font-face {font-family: GameBlast; src: url("fonts/GameBlast.ttf");}
@font-face {font-family: FreeHeader; font-weight: normal; font-style: normal; src: url("headers/FreeHeader.ttf");}
@font-face {font-family: FreeHeader; font-weight: normal; font-style: italic; src: url("headers/FreeHeaderItalic.ttf");}

where the "src" element refers to a file that must be downloaded, not part of the browser's operating system.

dannyboy

2:21 am on Mar 3, 2015 (gmt 0)

10+ Year Member



No, really, I meant exactly what I asked. Not "do Android browsers understand basic HTML and CSS declarations having to do with fonts" (it would be pretty outrageous if they didn't) but specifically can they follow @font-face rules?


Yes, Android browsers understand and download these without issue, as can be seen here:
[caniuse.com...]

Your problem browser is IE8.

Here you can see google web fonts discuss browser support:
[developers.google.com...]

As well as typekit:
[help.typekit.com...]

The latter also powers the free adobe edge web fonts:
[edgewebfonts.adobe.com...]

lucy24

4:41 am on Mar 3, 2015 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Your problem browser is IE8.

Happily it's someone else's problem. I just get the fun of figuring it out :) I'll have to go back and check; I think he's purely concerned with mobiles.