From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/10169 Path: main.gmane.org!not-for-mail From: "Cho, Jin-Hwan" Newsgroups: gmane.comp.tex.context Subject: Re: UTF8 problems with Hangul Syllables Date: Thu, 19 Dec 2002 10:53:33 +0900 Organization: Korean TeX Users Group Sender: ntg-context-admin@ntg.nl Message-ID: <3E01269D.67D45D75@ktug.or.kr> References: <5.1.0.14.1.20021218143635.0231c0b0@server-1> Reply-To: ntg-context@ntg.nl NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Trace: main.gmane.org 1040263061 12683 80.91.224.249 (19 Dec 2002 01:57:41 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Thu, 19 Dec 2002 01:57:41 +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 18OpwR-0003IP-00 for ; Thu, 19 Dec 2002 02:57:39 +0100 Original-Received: from ref.ntg.nl (localhost.localdomain [127.0.0.1]) by ref.ntg.nl (Postfix) with ESMTP id ECF3010AE9; Thu, 19 Dec 2002 02:58:04 +0100 (MET) Original-Received: from rabit.kias.re.kr (unknown [210.219.50.14]) by ref.ntg.nl (Postfix) with SMTP id CA6A010AE7 for ; Thu, 19 Dec 2002 02:56:22 +0100 (MET) Original-Received: from ktug.or.kr (spin.kias.re.kr [210.98.29.127]) by ns.kias.re.kr (8.9.3/8.9.3) with ESMTP id LAA15605 for ; Thu, 19 Dec 2002 11:01:34 +0900 (KST) X-Mailer: Mozilla 4.79 [en] (Windows NT 5.0; U) X-Accept-Language: en,ko Original-To: ntg-context@ntg.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:10169 X-Report-Spam: http://spam.gmane.org/gmane.comp.tex.context:10169 Hans Hagen wrote: > > 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 Even though I used \utfunifontglyph{\numexpr("C000)} instead of ^^ec^^80^^80, the result was the same, that is, the character was not shown correctly (= empty). I forgot one thing to comment. Bitstream Cyberbit font does not have the glyph for the character U+C000. So it may be better to test the character U+C0C1 (= ^^ec^^83^^81). Bitstream Cyberbit font (Cyberbit.ZIP) can be download from http://ftp.netscape.com/pub/communicator/extras/fonts/windows/ Here is the log message after turnning on \tracingmacros. The difference is that "BFE1 calls \unicodeglyph, but "C0C1 calls \doutfunihsh. 1. Log message for \utfunifontglyph{\numexpr("BFE1)} ================================================= \utfunifontglyph #1->\xdef \unidiv {\number \utfdiv {#1}}\xdef \unimod {\number \utfmod {#1}}\ifnum #1<\utf@i \char \unimod \else \ifcsname \@@univector \unid iv \endcsname \csname \doutfunihash {\unidiv }{#1}\endcsname \else \unicodeglyp h \unidiv \unimod \fi \fi #1<-\numexpr ("BFE1) \utfdiv #1->\number \numexpr ((#1-\utf@g )/\utf@h ) #1<-\numexpr ("BFE1) \utfmod #1->\number \numexpr (#1-\utf@h *((#1-\utf@g )/\utf@h )) #1<-\numexpr ("BFE1) \@@univector ->univ \unidiv ->191 \unicodeglyph #1#2->\bgroup \getvalue {@@\currentucharmapping \strippedcsname \ uchar }{#1}{#2}\bodyfontsize \unicodescale \bodyfontsize \font \unicodefont =\t ruefontname {\truefontname \unicodestyle \unicodeone } at \currentfontscale \bo dyfontsize \unicodestrut \unicodefont \unicodecharcommand {\char \unicodetwo \r elax }\egroup #1<-\unidiv #2<-\unimod ... [REMOVED] 2. Log message for \utfunifontglyph{\numexpr("C0C1)} ================================================= \utfunifontglyph #1->\xdef \unidiv {\number \utfdiv {#1}}\xdef \unimod {\number \utfmod {#1}}\ifnum #1<\utf@i \char \unimod \else \ifcsname \@@univector \unid iv \endcsname \csname \doutfunihash {\unidiv }{#1}\endcsname \else \unicodeglyp h \unidiv \unimod \fi \fi #1<-\numexpr ("C0C1) \utfdiv #1->\number \numexpr ((#1-\utf@g )/\utf@h ) #1<-\numexpr ("C0C1) \utfmod #1->\number \numexpr (#1-\utf@h *((#1-\utf@g )/\utf@h )) #1<-\numexpr ("C0C1) \@@univector ->univ \unidiv ->192 \doutfunihash #1#2->\ifcsname \@@univector \number #1\endcsname \csname \@@univ ector #1\endcsname {\utfmod {#2}}\else \@@unknownchar \fi #1<-\unidiv #2<-\numexpr ("C0C1) \@@univector ->univ \unidiv ->192 \@@univector ->univ \unidiv ->192 \univ192 #1-> #1<-\utfmod {\numexpr ("C0C1)} [NO MESSAGE FURTHER] Best, ChoF. -- *** ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ *** ^ ^ | ChoF := Jin-Hwan Cho | *^ ^* o | chofchof@ktug.or.kr | * o * *** ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ *** *^ ^* | Project Manager of | ^ ^ * O * | DVIPDFMx and MiKTeX-KTUG | O ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | Research Fellow, School of Mathematics | | Korea Institute for Advanced Study | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~