Font faces depends on charset

This commit is contained in:
Loïc Chapeaux
2001-07-01 21:34:08 +00:00
parent 53f92b3676
commit 790ef4bfb2
3 changed files with 22 additions and 13 deletions

View File

@@ -11,6 +11,8 @@ $Source$
2001-07-01 Lo<4C>c Chapeaux <lolo@phpheaven.net>
* left.php3: rewritten so it becomes as far as possible xhtml1.0 compliant.
* header.php3: rewritten styles so the font face is valid with non-latin1
charsets.
* spacer.gif was broken (strange display with NS).
2001-06-30 Marc Delisle <lem9@users.sourceforge.net>

View File

@@ -22,18 +22,25 @@ header('Content-Type: text/html; charset=' . $charset);
<title>phpMyAdmin</title>
<style type="text/css">
<!--
body { font-family: Arial, Helvetica, sans-serif; font-size: 10pt}
th { font-family: Arial, Helvetica, sans-serif; font-size: 10pt; font-weight: bold; background-color: <?php echo $cfgThBgcolor;?>;}
td { font-family: Arial, Helvetica, sans-serif; font-size: 10pt;}
form { font-family: Arial, Helvetica, sans-serif; font-size: 10pt}
h1 { font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 16pt; font-weight: bold}
A:link { font-family: Arial, Helvetica, sans-serif; font-size: 10pt; text-decoration: none; color: blue}
A:visited { font-family: Arial, Helvetica, sans-serif; font-size: 10pt; text-decoration: none; color: blue}
A:hover { font-family: Arial, Helvetica, sans-serif; font-size: 10pt; text-decoration: underline; color: red}
A:link.nav { font-family: Verdana, Arial, Helvetica, sans-serif; color: #000000}
A:visited.nav { font-family: Verdana, Arial, Helvetica, sans-serif; color: #000000}
A:hover.nav { font-family: Verdana, Arial, Helvetica, sans-serif; color: red;}
.nav { font-family: Verdana, Arial, Helvetica, sans-serif; color: #000000}
<?php
// Hard coded font name and size depends on charset. This is a temporary and
// uggly fix
$font_family = ($charset == 'iso-8859-1')
? 'helvetica, arial, geneva, sans-serif'
: 'sans-serif';
?>
body {font-family: <?php echo $font_family; ?>; font-size: 10pt}
th {font-family: <?php echo $font_family; ?>; font-size: 10pt; font-weight: bold; background-color: <?php echo $cfgThBgcolor;?>;}
td {font-family: <?php echo $font_family; ?>; font-size: 10pt;}
form {font-family: <?php echo $font_family; ?>; font-size: 10pt}
h1 {font-family: <?php echo $font_family; ?>; font-size: 16pt; font-weight: bold}
A:link {font-family: <?php echo $font_family; ?>; font-size: 10pt; text-decoration: none; color: blue}
A:visited {font-family: <?php echo $font_family; ?>; font-size: 10pt; text-decoration: none; color: blue}
A:hover {font-family: <?php echo $font_family; ?>; font-size: 10pt; text-decoration: underline; color: red}
A:link.nav {font-family: <?php echo $font_family; ?>; color: #000000}
A:visited.nav {font-family: <?php echo $font_family; ?>; color: #000000}
A:hover.nav {font-family: <?php echo $font_family; ?>; color: red;}
.nav {font-family: <?php echo $font_family; ?>; color: #000000}
//-->
</style>
</head>

View File

@@ -53,7 +53,7 @@ header('Content-Type: text/html; charset=' . $charset);
// Hard coded font name and size depends on charset. This is a temporary and
// uggly fix
$font_family = ($charset == 'iso-8859-1')
? 'Arial, Helvetica, sans-serif'
? 'helvetica, arial, geneva, sans-serif'
: 'sans-serif';
?>
body {font-family: <?php echo $font_family; ?>; font-size: 10pt}