From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/14426 Path: main.gmane.org!not-for-mail From: "Adam Lindsay" Newsgroups: gmane.comp.tex.context Subject: Re: unicode and out-of-box usability Date: Mon, 5 Jan 2004 13:43:49 +0000 Sender: ntg-context-admin@ntg.nl Message-ID: <20040105134349.11800@smtp.btinternet.com> References: <6.0.1.1.2.20040103232206.01e51ec0@localhost> Reply-To: ntg-context@ntg.nl NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1073311669 26078 80.91.224.253 (5 Jan 2004 14:07:49 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Mon, 5 Jan 2004 14:07:49 +0000 (UTC) Original-X-From: ntg-context-admin@ntg.nl Mon Jan 05 15:07:42 2004 Return-path: Original-Received: from ref.vet.uu.nl ([131.211.172.13] helo=ref.ntg.nl) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1AdVOQ-00079e-00 for ; Mon, 05 Jan 2004 15:07:42 +0100 Original-Received: from ref.ntg.nl (localhost.localdomain [127.0.0.1]) by ref.ntg.nl (Postfix) with ESMTP id 8A68F10B3C; Mon, 5 Jan 2004 15:07:12 +0100 (MET) Original-Received: from protactinium.btinternet.com (protactinium.btinternet.com [194.73.73.176]) by ref.ntg.nl (Postfix) with ESMTP id CCC4110B26 for ; Mon, 5 Jan 2004 15:06:32 +0100 (MET) Original-Received: from [81.135.38.209] (helo=[81.135.38.209]) by protactinium.btinternet.com with esmtp (Exim 3.22 #25) id 1AdVNg-00033v-00; Mon, 05 Jan 2004 14:06:57 +0000 Original-To: , "Hans Hagen" In-Reply-To: <6.0.1.1.2.20040103232206.01e51ec0@localhost> X-Mailer: CTM PowerMail 4.2.1 us Carbon Errors-To: ntg-context-admin@ntg.nl X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.0.13 Precedence: bulk List-Help: List-Post: List-Subscribe: , List-Id: mailing list for ConTeXt users List-Unsubscribe: , List-Archive: Xref: main.gmane.org gmane.comp.tex.context:14426 X-Report-Spam: http://spam.gmane.org/gmane.comp.tex.context:14426 Hi Hans. Thanks for the reply. Hans Hagen said this at Sat, 3 Jan 2004 23:38:02 +0100: >>In unic-ini: >>\chardef\utfunihashmode=0 % 1 = enabled >> >>Actually, if I understand things correctly, '1' means "disabled", which >>is what I preferred, having not yet created any unicode vectors. So the >>internal documentation there seems wrong, and I would argue the default >>case (0) makes it harder for beginners. > >hm, did you look at the unic-001 etc files? the trick is in fast and efficient >expansion without the need to define lots of named glyphs I looked at them, but perhaps I didn't "get" it. What I saw was precisely lots and lots of named glyphs in these hashes. I was setting some greek and cyrillic text, so was dealing with glyphs that would be described in a non-existent unic-003, unic-004 and other vectors. Basically, with utfunihashmode set to zero, I saw lots and lots of black rectangles, even though I had correctly defined and installed the unicode fonts. When I disabled it by setting it to one, it worked. That seemed confusing to a beginner for two reasons. (documentation & not looking for fonts when characters are not in a hash). >>More confusingly, in font-uni: > >forget about that one, although it's called unicode, it's actually a >mechanism for >the many vectors derived from unicode / related to unicode but not entirely >i.e. cjk fonts As you know, I'm somewhat unhealthily obsessed with fonts, and the \defineunicodefont mechanism seemed to be the only one that 1) allowed multiple unicode fonts to be defined, and 2) made an effort to synchronise with document styles. This becomes especially sensitive with typesetting things like Vietnamese, where you're sliding between named glyphs that fall into a "normal" encoding vector and glyphs that are in unicode space. I might be wrong on those points, but it seemed as though the UTF-8 mechanism assumed only one font. Japanese can bold things for emphasis, Greek can be in italic, and there are both Sans and Serif fonts for very many of the world's languages. On a first pass, the defineunicodefont mechanism (aside from the \useregime[unicode]) worked fairly well for those purposes. >>\def\unicodeasciicharacter{\uchar{0}} >> >>(I'm not certain the above is release-quality code, but I've been testing >>it with a stripped down \utfunifontglyph that should be functionally >>equivalent.) > >play with it and we'll see I've been playing with it. It works for me. Wouldn't publicly suggest it otherwise. :) >>Working with the unicode code makes me appreciate that it's really >>powerful part of ConTeXt. Thanks, Hans! > >how about the following: > >there are many font encodings around but none is really complete enough to >deal with basic unicode (0/1/2 range) > >why not define a new font encoding with characters only so that we can have >as many chars as needed in a 0-255 vector, all those >special characters (registered, and so) are (1) used seldom, Okay, I think I get what you're saying, a hyper-dense letter-only encoding. One of the reasons I got into your support for Unicode was that "seldom"-used is very relative term, and requires a prioritisation of languages, and that a vector of 256 glyphs just wasn't going to cut it. I got tired of hand-rolling encodings, and wanted to use someone else's hard work for a while. :) Another reason is that Eddie Kohler's OpenType tools uses /.notdefs in an encoding as a place for extended glyphs like swashes and ligatures. I'm rather fond of those features, and so such a dense encoding is not that useful to me. >(2) not >related to hyphenation and kerning; it is also a way to get >rid of some 'ligatures' like --- becoming an emdash (in context and xml we >can conformtably directly call symbols, and these may >come from a different instance of the font So you would make all punctuation active, essentially? Interesting... Here's another question for folks working in non-latin languages: how does hyphenation work? -- =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= Adam T. Lindsay atl@comp.lancs.ac.uk Computing Dept, Lancaster University +44(0)1524/594.537 Lancaster, LA1 4YR, UK Fax:+44(0)1524/593.608 -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-