ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* Still have no idea about how to specify fonts in JavaScript fields.
@ 2006-11-22 12:14 Zhichu Chen
  2006-11-22 14:03 ` Hans Hagen
  0 siblings, 1 reply; 4+ messages in thread
From: Zhichu Chen @ 2006-11-22 12:14 UTC (permalink / raw)


Hello everyone,

Thanks for suggesting some great documents last time. But after
looking up in AcroJS Guide, and PDF Reference , etc., I still don't
know how can I use special fonts in a JavaScript field.


My JS code is:
------------------------------------------------------------------------------------------
  function start_clock()
{ var thetime=new Date();
  var nhours=thetime.getHours();
  var nmins=thetime.getMinutes();
  var nsecn=thetime.getSeconds();
  if (nhours<0)   nhours="0"+nhours;
  if (nsecn<10)   nsecn="0"+nsecn;
  if (nmins<10)   nmins="0"+nmins;
  font.Digital = font.CourBI ;
  vv = this.getField("time.clock") ;
  if (vv) { vv.value = nhours+":"+nmins+":"+nsecn;
  vv.readonly = true ;
  vv.textColor = color.red ;
  vv.textFont = font.Digital ; // font.TimesBI Cour HelvB Symbol ZapfD
  this.dirty = false }}

  timeout=app.setInterval('start_clock()',1000);
------------------------------------------------------------------------------------------

I guess there are already some definitions about ``font.CourBI'' but
where can I find the original code of the definition which I can
imitate it to create a new font.

Thanks



-- 
Sincerely yours,
Chen
----------------------------------------------------------------

          Zhi-chu Chen | Shanghai Synchrotron Radiation Facility
         No. 2019 | Jialuo Rd. | Jiading | Shanghai | P.R. China
             tel: 086 21 5955 3405 | zhichu.chen.googlepages.com
                                               | www.sinap.ac.cn
----------------------------------------------------------------

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2006-11-23 11:42 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-11-22 12:14 Still have no idea about how to specify fonts in JavaScript fields Zhichu Chen
2006-11-22 14:03 ` Hans Hagen
2006-11-23  2:46   ` Zhichu Chen
2006-11-23 11:42     ` Hans Hagen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).