HTML archive: Css for fonts
I am making extensive use of html archive in my latest app.
In 3 html archive activities I am using a css file which I link to all sub-pages. The css includes a google font which I want visible in all text pages.
Of course, the font itself is also inside the archive and I am calling it locally.
In browser all are OK, the font appears, in Andromo nothing.
Could you think of a possible reason for this and if it's something I can fix somehow?
In 3 html archive activities I am using a css file which I link to all sub-pages. The css includes a google font which I want visible in all text pages.
Of course, the font itself is also inside the archive and I am calling it locally.
In browser all are OK, the font appears, in Andromo nothing.
Could you think of a possible reason for this and if it's something I can fix somehow?
Comments
It worked for me.
More or less it was what I had done. The only difference was my font was woff format (so I used a converter to turn it to ttf and changed the css). It worked on browser, didnt work inside Andromo still.
So all in all, might be the particular font I chose but it has not worked yet for me.
My css is:
@font-face {
font-family: 'Cagliostro';
font-style: normal;
font-weight: normal;
src: local('Cagliostro'), local('Cagliostro'), url('font.ttf') format('truetype');
}
Any suggestions possibly?
<head>
<meta content="text/html; charset=UTF-8" http-equiv="content-type">
<meta name="viewport" content="width=device-width, user-scalable=no">
<link href="http://fonts.googleapis.com/css?family=Average|Courgette" rel="stylesheet" type="text/css">
<link rel="stylesheet" type="text/css" href="style.css">
</head>
And this is what I have in my CSS file:
@font-face {
font-family: 'Open Sans';
font-style: normal;
font-weight: normal;
src: local('Open Sans'), local('OpenSans'), url('Open_Sans/OpenSans-Regular.ttf') format('truetype');
}
@font-face {
font-family: 'Oswald';
font-style: normal;
font-weight: normal;
src: local('Oswald'), local('Oswald'), url('Oswald/Oswald-Regular.ttf') format('truetype');
}
body
{
font-family: 'Open Sans';
font-size: 14px;
}
Hope this helps.
EDIT: the fonts should be located in their own folders where you keep the HTML and CSS file. Example:
Working Folder
Open_Sans (folder)
Oswald (folder)
index.html
style.css
I will set my css as is yours.
Thanks again mate, I will let you know if I find a way.
Thank you for your help.
When I got pissed and quit the idea of fonts, I loaded the same apk in my emulator and the font showed