Forum Moderators: not2easy
Question: Can I use CSS to display non-installed fonts?
Meaning, if a visitor/user computer does not have a special or specific font on their computer how can I serve the font?
Would it be CSS? or Can I use MIME TYPES?
Anyone with any knowledge of this please help! Thanks.
[microsoft.com...]
And I'm looking to make global changes to about 200 pages of content, not one-by-one.
Thanks for introducing me to WEFT, I can possibly use this in the future.
But, for now, can anyone tell me what is best used to make global font, color, style, & theme changes? I'm really most concerned with making global font changes, please advise? Thanks in advance.
To make changes across all your pages, you'll have to have a stlesheet linked in the head of each page.
<head>
<link rel="stylesheet" type="text/css" href="/style.css" />
</head>
If this is too much of a pain for all your pages, you can do it via an auto-prepend file in php using ouput buffering. Make a custom function to replace <head> with <head> + your stylesheet link (assuming you've got one). You make the php file you auto_prepend called prepend.php:
<?php
function myfunction($html){
$html = str_replace('<head>', '<head>'."\n".'<link rel="stylesheet" type="text/css" href="/style.css" />, $html);
return $html;
}
ob_start('myfunction');
?>
php_value auto_prepend_file /path/to/prepend.php
AddType application/x-httpd-php .html
The second line is so your html files also are able to use php functionality
and in style.css:
body {
font-face: "Comic Sans MS";
color: #faa;
size: 13px;
}
h1 {
color: #aaf;
size: 15px;
}