From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/10163 Path: main.gmane.org!not-for-mail From: Hans Hagen Newsgroups: gmane.comp.tex.context Subject: Re: UTF8 problems with Hangul Syllables Date: Wed, 18 Dec 2002 14:39:38 +0100 Sender: ntg-context-admin@ntg.nl Message-ID: <5.1.0.14.1.20021218143635.0231c0b0@server-1> References: <3DFFFE50.BBC4099A@ktug.or.kr> Reply-To: ntg-context@ntg.nl NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=====================_19093494==_" X-Trace: main.gmane.org 1040218906 23175 80.91.224.249 (18 Dec 2002 13:41:46 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Wed, 18 Dec 2002 13:41:46 +0000 (UTC) Return-path: Original-Received: from ref.vet.uu.nl ([131.211.172.13] helo=ref.ntg.nl) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 18OeSE-00061G-00 for ; Wed, 18 Dec 2002 14:41:42 +0100 Original-Received: from ref.ntg.nl (localhost.localdomain [127.0.0.1]) by ref.ntg.nl (Postfix) with ESMTP id CA91610AE9; Wed, 18 Dec 2002 14:42:08 +0100 (MET) Original-Received: from mail.solcon.nl (mail.solcon.nl [212.45.33.11]) by ref.ntg.nl (Postfix) with ESMTP id AD58510AE7 for ; Wed, 18 Dec 2002 14:40:01 +0100 (MET) Original-Received: from server-1.pragma-ade.nl (wc-58016.solcon.nl [212.45.58.16]) by mail.solcon.nl (8.12.5/pre1.0-MySQL/8.12.5) with ESMTP id gBIDdqaC018185 for ; Wed, 18 Dec 2002 14:39:52 +0100 Original-Received: from LAPTOP-3.wxs.nl (laptop-3 [10.100.1.191]) by server-1.pragma-ade.nl (8.12.2/8.12.2) with ESMTP id gBIDdtgg008861 for ; Wed, 18 Dec 2002 14:39:55 +0100 X-Sender: hagen-mail@server-1 X-Mailer: QUALCOMM Windows Eudora Version 5.1 Original-To: ntg-context@ntg.nl In-Reply-To: <3DFFFE50.BBC4099A@ktug.or.kr> X-RAVMilter-Version: 8.4.1(snapshot 20020919) (mail.solcon.nl) 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:10163 X-Report-Spam: http://spam.gmane.org/gmane.comp.tex.context:10163 --=====================_19093494==_ Content-Type: text/plain; charset="us-ascii"; format=flowed At 01:49 PM 12/18/2002 +0900, you wrote: >Here is my comment and question on the new feature of ConTeXt supporting >the UTF8 encoding. > >Actually I tried to test the following short ConTeXt document containing >two Korean characters. At the second line I used the Bitstream Cyberbit >font and the corresponding TFM files were generated by ttf2tfm with >Unicode.sfd >(the same way as the UTF8 support in CJK-LaTeX). > >\enableregime [utf] >\definefontsynonym [UnicodeRegular] [cyberb] >\chardef\utfunihashmode=1 >\starttext >^^eb^^bf^^a1 >^^ec^^80^^80 >\stoptext > >Here, ^^eb^^bf^^a1 = U+BFE1 and ^^ec^^80^^80 = U+C000. > >1. Without the third line (\chardef\utfunihashmode=1), I could not see > any characters. Why? > >2. After enabling \utfunihashmode, I could see the first character. But > not the second character. The difference was that the value of \unidiv > were 191 for the first character and 192 for the second character. > In fact, all characters with \unidiv >= 192 and \unidiv <= 223 > (from U+C000 to U+DFFF; half of Hangul Syllables) were not shown > correctly. Why? I'll work this out asap; this is what i use as test file (unfortunately this font does not show chars, so i have do download a proper font first); i attached a script that i apply to a ttf file ( ttftfmxx.pl htfs.ttf 0 255 ) \chardef\utfunihashmode=1 \pdfmapfile{+htfsxx.map} \definefontsynonym [TestRegular] [htfs] \defineunicodefont [SomeFont] [Test] \SomeFont \enableregime[utf] % todo: autoutf, else problem \starttekst %^^eb^^bf^^a1 %^^ec^^80^^80 \utfunifontglyph{\numexpr("BFE1)} \utfunifontglyph{\numexpr("C000)} \stoptekst --=====================_19093494==_ Content-Type: text/plain; charset="us-ascii" Content-Disposition: attachment; filename="TTFTFMXX.PL" # author : Hans Hagen / PRAGMA-ADE / www.pragma-ade.com / 07-12-2003 # script : splits ttf file into series pfb's using ttf2pt1 & afm2tfm # usage : ttftfmxx filename.ttf [from plane] [to plane] unless ($ARGV[0]) { print "provide ttf filename\n" ; exit } ($filename,$filetype) = split(/\./, $ARGV[0]) ; $filetype = 'ttf' unless $filetype ; unless (lc $filetype eq 'ttf') { print "provide ttf filename\n" ; exit } $mapfile = $filename . "xx.map" ; $from = $ARGV[1] ; $to = $ARGV[2] ; if ($from eq '') { $from = 0 ; $to = 2 } elsif ($to eq '') { $to = $from ; $from = 0 } $from = 255 if ($from>255) ; $to = 255 if ($to >255) ; open(MAP,">$mapfile") ; for ($i=$from;$i<=$to;$i++) { $str = sprintf("%02x",$i) ; $splitname = "$filename$str" ; system("ttf2pt1 -l plane+0x$str -W 0 -b $filename.$filetype $splitname") ; system("afm2tfm $splitname.afm $splitname.tfm") ; unlink "$splitname.afm" ; print MAP "$splitname <$splitname.pfb\n" } close(MAP) ; print "ttffile : $filename.$filetype\n" ; print "tfmfile : $filename$from.tfm .. $filename$to.tfm\n" ; print "mapfile : $mapfile\n" ; --=====================_19093494==_ Content-Type: text/plain; charset="us-ascii"; format=flowed ------------------------------------------------------------------------- Hans Hagen | PRAGMA ADE | pragma@wxs.nl Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: +31 (0)38 477 53 69 | fax: +31 (0)38 477 53 74 | www.pragma-ade.com ------------------------------------------------------------------------- information: http://www.pragma-ade.com/roadmap.pdf documentation: http://www.pragma-ade.com/showcase.pdf ------------------------------------------------------------------------- --=====================_19093494==_--