ELL: Unicode Font for the Mac

Chuck Coker chuckc at TYRELL.COM
Fri Oct 5 15:28:51 UTC 2001


>From Peter Constable (to Randy LaPolla):
[... snip ...]
> I've not done much with HTML and CSS, so I'm not sure what options exist
> as far as controlling what fonts get used. I know that you can create a
> page without specifying any font, in which case it is up to the user's
> browser to determine what font to use. I know that IE 5.x on Windows will
> handle English and Chinese text encoded in Unicode, and it can also handle
> IPA, though that might require adjusting some settings (I haven't
> experimented with this so I'm not sure -- also, if you have IPA with lots
> of diacritics or contour tone letters, I think it will be another six
> months or so before IE can deal with stacking diacritics or ligating the
> tone letters). I haven't researched what might happen with other browsers
> or other platforms.
[... snip ...]
> If you want to mix English, IPA and Chinese in HTML without resorting to
> graphics, then the best way to do it would be by encoding all of the text
> in Unicode. You could use a custom-encoded font for the IPA, but then
> you'll probably have to specify an encoding other than Unicode for the
> page, and then you'll have to use numeric character references for all of
> the Chinese text. (Either that or you use a bunch of hacked fonts for the
> Chinese, but I wouldn't recommend that.)

Sorry if this is over-simplified, no offense is intended. I've learned that
I cannot assume how much technical skill people have.

First of all, browsers vary widely in the adherence to the HTML standard, so
your mileage may vary. For most web sites, target the Netscape 4.7 or higher
and Internet Explorer 5.0 or higher people. This will probably include more
than 90% of your visitors. If you have a specialized web site, look at your
server logs to determine what browsers are used and target the browsers that
will cover the highest percentage of visitors.

Since Randy has an EDU (university) web site, he should be able to contact
the computing services department (the people that run the university's
computers) and ask them for server logs.

You ~should~ be able to use UTF-8 encoding for a web page. Whatever editor
you use for Chinese will probably be able to save pages in UTF-8 encoding
too. If you FTP the web pages to the web server, make sure to do a BINARY
transfer rather than an ASCII transfer -- you don't want anything translated
during the uploading process.

Put this is the <head> section of your HTML:

<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">

If all of your fonts are properly Unicode encoded, you should be all ready
to go.

There is a nice little Windows editor called SC UniPad that works great
for typing Unicode in mixed languages. You can find it at
http://www.unipad.org/main/.

Now if you don't have properly encoded fonts, things are a bit more
difficult ...

If you use CSS (Cascading Style Sheets), you can include multiple style
sheets in the <head> section like this:

<link rel="stylesheet" type="text/css" href="my-chinese-style.css">
<link rel="stylesheet" type="text/css" href="my-english-style.css">
<link rel="stylesheet" type="text/css" href="my-ipa-style.css">

In the my-chinese-style.css file, add entries like this (and similar entries
in the other CSS files):

.ChineseText { font-family: WinChineseFontName,MacChineseFontName;}

If you don't use CSS, do this in the <head> section:

<style type="text/css">
<!--
    .ChineseText { font-family: WinChineseFontName,MacChineseFontName;}
    .EnglishText { font-family: WinEnglishFontName,MacEnglishFontName; }
    .IpaText { font-family: WinIpaFontName,MacIpaFontName; }
    -->
</style>

If your font names have spaces in the names, use quotes around the
individual font name like this:

font-family: "Arial Unicode MS",NextFontName;

In the <body> section of you HTML, you can do things like this:

<span class=IpaText>IPA Characters Here</span>

or

<td class=IpaText>IPA Table Cell</td>

You can use the 'class' attribute in most HTML tags.

You can find the official HTML and CSS specs at http://www.w3.org/. Be aware
that I haven't found a browser yet that complies 100% with the specs. You
still have to look at each page to make sure that everything is displayed
properly -- don't assume anything.

If you need to combine diacritics, etc. that aren't in Unicode, you'll have
to find a font that includes the finished characters (already combined) you
want and enter the characters using the A method within the <span> tags
(or other HTML tags).

I don't know anything about Chinese other than I can't speak it and the
characters look funny to me. However, if you have any questions about any of
this you can write to me in private email or on the list, whichever you
think would be more appropriate. I ~should~ be able to help you with most of
your web page questions -- I make my living as a computer geek and only
study languages as a personal interest. Once in a while I get to combine the
two. :^)

Chuck

----------------------------------------------------------------------
Chuck Coker <chuckc at tyrell.com>
Software Developer, Tyrell Software Corporation
23151 Verdugo Drive, Suite 204
Laguna Hills, California 92653 United States
+1 949 458 1911 ext. 3

----
Endangered-Languages-L Forum: endangered-languages-l at cleo.murdoch.edu.au
Web pages http://cleo.murdoch.edu.au/lists/endangered-languages-l/
Subscribe/unsubscribe and other commands: majordomo at cleo.murdoch.edu.au
----



More information about the Endangered-languages-l mailing list