At 01:49 PM 12/18/2002 +0900, you wrote:
Here is my comment and question on the new feature of ConTeXt supportingI'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 )
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?
\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
# 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" ;
-------------------------------------------------------------------------
Hans Hagen | PRAGMA ADE | [EMAIL PROTECTED]
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
-------------------------------------------------------------------------
