APL Characters on the World Wide Web
Vector 13:4, page 14
Transcribed from the printed issue; not yet reviewed. Read it in the PDF of the issue, page 14
Background¶
World Wide Web pages are scripts written in a language called HTML (hyper text mark-up language: a sub-set of STML). A "web-browser" is a program that (amongst other things) interprets HTML to create a web page on your screen. In HTML, text is marked with "TAGS" which define how the page is to be displayed. Some "TAGS" have "OPTIONS". An "OPTION" normally consists of a string such as "keyword=value". Unknown tags or unknown options within tags are ignored by web browsers.
Until recently, it was not possible for the author of a web page to specify the font to be used, just its size and spacing (via the "FONT" tag). Now, a new option of the "FONT" tag has been added (FACE), that allows a web author to specify a list of preferred fonts by name, e.g. "<FONT FACE=APLNET,APLPLUS>"
The two most common types of web browser for the PC are currently Netscape Navigator and Microsoft Internet Explorer. The latest versions (3.0 and above) of these recognise the "FACE=font list" option.
Suggested Standard APL Font Face¶
This means it is now possible to put APL characters directly into web pages and specify a set of alternative fonts to view them with. The resulting page with APL text can then be seen by any recipient using a PC with a suitable browser if they have at least one of the specified fonts installed on their PC.
(See http://www.vector.org.uk/aplfont.html for information on how to configure some older browsers which do NOT support the <FONT FACE=xxxx> tag.)
It will be a great help if we (the APL community) can standardise on a single font encoding for displaying APL characters in web pages. By that I mean that any APL font meeting this standard will have the same APL characters in the same relative positions. Note, this is not the same as the ⎕AV order.
I propose that we adopt the font encoding shared by two of the most popular APL for Windows interpreters: APL+WIN and Dyalog APL/W. This is also the font encoding used by Adrian Smith’s freely available APL2741 font.
To be able to produce HTML pages with APL, which are also compatible with older web browsers (via the method referenced above) the fonts used need to be (internally) flagged as Monospaced (i.e. fixed pitch) and ANSI (as against Symbol). Not all the fonts with the "proposed standard APL encoding" meet these two requirements. However, Adrian has made a Monospaced ANSI version of his APL2741 font available for Web use under the name of APLNET, which can be downloaded from the Vector web site (www.vector.org.uk). Dyadic have also recently modified their DYALOG STD TT font to match these requirements, which can be downloaded from their site (www.dyadic.com).
Since the "face" tag may contain a list of fonts, I suggest we should specify a minimum of 3 fonts, one from the APL2000/Manugistics/APL*Plus stable, one from Dyadic and one from Adrian.
For example: <font face="APLNET, DYALOG STD TT, APLPLUS">
Other APLs¶
Now, I know that this font encoding is not compatible with many other APLs (e.g. IBM APL2 , APL68000, APLIWIN or any EBCDIC-based mainframe APL), but then no single font is. However both APLNET and Dyalog STD TT are available for free over the Internet, whereas there is no APL2 encoded font that I know of in the public domain. (There is for instance no "TryAPL2 for Windows 95/NT" to the best of my knowledge.)
If say IBM APL2 users want to put up web pages for other IBM APL2 users, then it makes sense to use an IBM APL2 font (e.g. APL2ital). However, unless that font is freely available, the author cannot expect non-APL2ers to be able to read the APL on that page, since they will have no access to the IBM APL2 fonts.
Here are a few possible solutions to this problem:
- We get IBM to change the font encoding they use for APL2 for Windows to match that used by APL+WIN or Dyalog APL/W. (Best solution for APL in general, but unlikely to happen.)
- We ask Adrian Smith to produce a new font APL2NET so we can all at least read APL2 web pages. (A poor solution for APL in general but easily achieved.)
- I put up on the Vector web site a "converter" written in Perl, which given some text and the name of the encoding, converts the APL text into ASCII (using Jim Weigang’s transliteration) on a new web page. Workspaces are available to convert ASCII back to APL from:
ftp://archive.uwaterloo.ca/languages/apl/workspaces/aplascii.
(A little "messy", but workable.) - I put up on the Vector web site a "converter" written in Perl, which given some text and the name of the to and from font encoding, converts the text (and
<FONT FACE=font name list>) and re-displays the modified page. (Sounds OK but will be very hard to get working correctly.)
Web References¶
Jim Weigang, APL-ASCII transliteration technique, http://www.chilton.com/~jimw
Ray Cannon, Demo of APL fonts on the Web, http://www.vector.org.uk/aplfont.html
Adrian Smith, APLNET font, http://www.causeway.co.uk