[NTG-context] (Xe)ConTeXt and CJK support

S Barmeier severinbarmeier at googlemail.com
Tue Sep 14 11:10:51 CEST 2010


Thank you for your quick reply. In the above example neither IPAMincho
nor Sazanami Mincho (Regular) are loaded correctly. I get several
lines of

simplefonts   : font 'sazanamiminchoregular' not found

interspersed with

! fonts   : font database matches configuration and file hashes

The simplefonts message ignores spaces and caps... Any ideas?

Thank you.
Severin

On 9/14/10, Wolfgang Schuster <schuster.wolfgang at googlemail.com> wrote:
>
> Am 14.09.2010 um 02:28 schrieb S Barmeier:
>
>> Thank you all for your detailed answers. Wolfgang's suggestion does
>> not produce any errors and seems like the perfect solution except that
>> I have trouble loading any of my installed CJK fonts. I have tried to
>> play with \definefontsynonym for ConTeXt to find the font files. I
>> have
>> - OpenType fonts IPAMincho and IPAGothic as ipam.ttf and ipag.ttf
>> - TrueType font KanjiStrokeOrders as KanjiStrokeOrders_v2.014.ttf
>> - a bunch of *.tfm, *.vf, and *.pfb files for a font family called
>> Wadalab, of which half of them seem to be only suited for JIS
>> encoding, whilst the other half is suited for Unicode.
>>
>> I hope you don't find it too basic a question, but the font system is
>> not very transparent and I'd be most grateful if someone could outline
>> how I would write the preamble in order to set up the CJK in a way I
>> can use them for the \setcjk....font commands and (as an exercise)
>> redefine the Latin font to Palatino.
>>
>> I envision something like
>>
>> \usemodule[simplefonts]
>> \definefontsynonym[Palatino][uplr8t]
>> \setupbodyfont[Palatino,11pt]				% See 1.
>> \definefontsynonym[WadalabMincho][???]	% See 2.
>> \setcjkmainfont[WadalabMincho]
>> \setcjksansfont[IPAGothic]				% See 3.
>> \setcjkmonofont[KanjiStrokeOrders]		% See 4.
>> \starttext
>> Hello! 今日は!
>> \stoptext
>
>
> For a Palantino font you can use “TeX Gyre Pagella”, to use it as roman
> font you have to load it with \setmainfont.
>
> \usemodule[simplefonts]
>
> \setmainfont[TeX Gyre Pagella]
>
> \setcjkmainfont[IPAMincho]
> \setcjksansfont[IPAGothic]
> \setcjkmonofont[KanjiStrokeOrders]
>
> \starttext
> text 本 {\ss text 本} {\tt text 本}
> \stoptext
>
> Loading the Sazanami fonts isn’t a problem for me, the following code
> use them in the output instead of the IPA fonts.
>
> \usemodule[simplefonts]
>
> \setmainfont[TeX Gyre Pagella]
>
> \setcjkmainfont[Sazanami Mincho]
> \setcjksansfont[Sazanami Gothic]
> \setcjkmonofont[KanjiStrokeOrders]
>
> \starttext
> text 本 {\ss text 本} {\tt text 本}
> \stoptext
>
> but you can try “Sazanami Mincho Regular” because this is the real name
> of the fonts.
>
> Wolfgang
>
>


More information about the ntg-context mailing list