[RESOLVED] Will Neo Sans fonts work as text?

liunx

Guest
I would like to have Neo Sans fonts (TTF) on my web site. Is this possible or are only working verdana...? Easy question. :)Only people with Neo Sans fonts installed on there computer would be able to see that font, therefore the best option would be to use an image to display any text you want displayed as Neo Sans fonts.

But if you insist in using Neo Sans fonts as a main font, use:
body {font-family:"Neo Sans fonts", Verdana, sans-serif}
...Is possible to transform time format 24 h to image e.g. 13:45?You could create it on-the-fly with say phpI can change each number or all together. Do you have suggestion which is the best and easy?Well you could call 4 variable 1 digit images, or you could create a single image using php/gdCan you suggest function to change 4 variable to 1 digit images :rolleyes:Well seeing as it would be necessary for an update every minute I would be inclined to use Javascript.
<!-- m --><a class="postlink" href="http://www.javascriptkit.com/script/cut9.shtmlI">http://www.javascriptkit.com/script/cut9.shtmlI</a><!-- m --> will use with PHP server time and showing time with javascript. If you use just JavaScript it will be clients time. Server time is better.

Do you know some very good script for time?I just made this one, though it has not been properly tested as localhost server-time is naturally client time and my online server space is currently down.
<html>
<head>
<title>CLOCK</title>
<?php
$hours = date("g");
$minutes = date("i");
$seconds = date("s");

print <<<EOM
<script language="javascript1.1">
var dn
c1=new Image(); c1.src=http://www.webdeveloper.com/forum/archive/index.php/"c1.gif"
c2=new Image(); c2.src=http://www.webdeveloper.com/forum/archive/index.php/"c2.gif"
c3=new Image(); c3.src=http://www.webdeveloper.com/forum/archive/index.php/"c3.gif"
c4=new Image(); c4.src=http://www.webdeveloper.com/forum/archive/index.php/"c4.gif"
c5=new Image(); c5.src=http://www.webdeveloper.com/forum/archive/index.php/"c5.gif"
c6=new Image(); c6.src=http://www.webdeveloper.com/forum/archive/index.php/"c6.gif"
c7=new Image(); c7.src=http://www.webdeveloper.com/forum/archive/index.php/"c7.gif"
c8=new Image(); c8.src=http://www.webdeveloper.com/forum/archive/index.php/"c8.gif"
c9=new Image(); c9.src=http://www.webdeveloper.com/forum/archive/index.php/"c9.gif"
c0=new Image(); c0.src=http://www.webdeveloper.com/forum/archive/index.php/"c0.gif"
cb=new Image(); cb.src=http://www.webdeveloper.com/forum/archive/index.php/"cb.gif"
cam=new Image(); cam.src=http://www.webdeveloper.com/forum/archive/index.php/"cam.gif"
cpm=new Image(); cpm.src=http://www.webdeveloper.com/forum/archive/index.php/"cpm.gif"
function extract(h,m,s,type){
if (!document.images)
return
if (h<=9){
document.images.a.src=http://www.webdeveloper.com/forum/archive/index.php/cb.src
document.images.b.src=http://www.webdeveloper.com/forum/archive/index.php/eval("c"+h+".src")
}
else {
document.images.a.src=http://www.webdeveloper.com/forum/archive/index.php/eval("c"+Math.floor(h/10)+".src")
document.images.b.src=http://www.webdeveloper.com/forum/archive/index.php/eval("c"+(h%10)+".src")
}
if (m<=9){
document.images.d.src=http://www.webdeveloper.com/forum/archive/index.php/c0.src
document.images.e.src=http://www.webdeveloper.com/forum/archive/index.php/eval("c"+m+".src")
}
else {
document.images.d.src=http://www.webdeveloper.com/forum/archive/index.php/eval("c"+Math.floor(m/10)+".src")
document.images.e.src=http://www.webdeveloper.com/forum/archive/index.php/eval("c"+(m%10)+".src")
}
if (s<=9){
document.g.src=http://www.webdeveloper.com/forum/archive/index.php/c0.src
document.images.h.src=http://www.webdeveloper.com/forum/archive/index.php/eval("c"+s+".src")
}
else {
document.images.g.src=http://www.webdeveloper.com/forum/archive/index.php/eval("c"+Math.floor(s/10)+".src")
document.images.h.src=http://www.webdeveloper.com/forum/archive/index.php/eval("c"+(s%10)+".src")
}
if (dn=="AM") document.j.src=http://www.webdeveloper.com/forum/archive/index.php/cam.src
else document.images.j.src=http://www.webdeveloper.com/forum/archive/index.php/cpm.src
}
function show3(){
if (!document.images)
return

//adjust clock
var serverhours = '$hours'
var serverminutes = '$minutes'
var serverseconds = '$seconds'

var Digital=new Date()
var hours=Digital.getHours()
var minutes=Digital.getMinutes()
var seconds=Digital.getSeconds()

if (hours<=9) {
hours="0"+ hours;
}
if (minutes<=9) {
minutes="0"+minutes;
}
if (seconds<=9) {
seconds="0"+seconds;
}

var actualhours = serverhours - hours;
var actualminutes = serverminutes - minutes;
var actualseconds = serverseconds - seconds;

var chours = Number(hours) + Number(actualhours);
var cminutes = Number(minutes) + Number(actualminutes);
var cseconds = Number(seconds) + Number(actualseconds);

dn="AM"
if ((chours>=12)&&(cminutes>=1)||(chours>=13)){
dn="PM"
chours=chours-12
}
if (chours==0)
chours=12
extract(chours,cminutes,cseconds,dn)
setTimeout("show3()",1000)
}
</script>

EOM;

?>
<style type="text/css">
#clock img {padding:0;margin:0}
</style>
</head>
<body onLoad="show3()">
<div id="clock">
<img src=http://www.webdeveloper.com/forum/archive/index.php/"cb.gif" name="a"><img src="cb.gif" name="b">
<img src=http://www.webdeveloper.com/forum/archive/index.php/"colon.gif" name="c"><img src="cb.gif" name="d">
<img src=http://www.webdeveloper.com/forum/archive/index.php/"cb.gif" name="e"><img src="colon.gif" name="f">
<img src=http://www.webdeveloper.com/forum/archive/index.php/"cb.gif" name="g"><img src="cb.gif" name="h">
<img src=http://www.webdeveloper.com/forum/archive/index.php/"cam.gif" name="j">
</div>
</body>
</html>thank you :) I will test.
 
Back
Top