[XeTeX] ZHSPACING - Newbie questions

Yin Dian yindian at gmail.com
Wed Nov 7 03:19:21 CET 2007


Hi,

On 11/7/07, Jon Babcock <jon at kanji.com> wrote:
> Jonathan Kew wrote:
> >> Now I'm trying to figure out why the enclosed number characters, e.g. ①
> >> , show as a blank in the PDF.
> >> E.g.,【泰】水-5-10 tài  >〈形〉①順適如意﹑命運亨通。
> >>
> >
> > Could it be that they're not actually present in the font you're using? Note that interactive text editors tend to use "fallback" mechanisms, so they might show you the characters from a different font.
> >
> Thank you.
>
> Indeed, the Chinese text as well as circled digit 1 display in my text
> editors and other apps because they are substituting other fonts. I'm
> beginning to see the light, but exactly what is happening is still not
> quite clear.
>
> In the preamble, I have:
>
> \usepackage{fontspec,xltxtra,xunicode,zhspacing}
> \setromanfont{Charis SIL}
> \newfontfamily\zhfont{Bitstream Cyberbit}
>
> The \XeTeXcharclass`"=6 lines are included right after the
> \begin{document}, including, fwiw, the line\XeTeXcharclass`①=6.
>
> With this alone, neither the Chinese nor the enclosed alphanumeric
> (U+2460) is displayed in the PDF.
>
> When I include \zhspacing in the preamble, the Chinese is displayed in
> the PDF, but circled digit 1 (U+2460) is not.
>
> When I further include \zhfont, both the Chinese and circled digit
> 1(U+2460) are displayed in the PDF.
>
> zhspacing.sty is unmodified. It is still using its default font SimSun,
> a font which I've installed and tried system-wide. SimSun appears to
> have glyphs for the 'enclosed alphanumerics' block of characters. (I
> need a better app than Character Map to verify this because Character
> Map seems to display the missing characters of a font in the font that
> it had previously found them in rather than just leaving them blank or
> with Unicode points.)
>
> It would seem that once I've turned on \zhspacing and it is using
> SimSun, its default font, the circled digit 1 (U+2460) should display in
> the PDF. But it doesn't. It is only after I invoke my defined \zhfont
> that I get both the Chinese and the circled digit 1 to display in the
> PDF. Scratching head.
It seems that you're not using the font specified in \zhfont to type
out the circled digit 1. Because you have changed its character class
to 6, which is for halfwidth punctuations, which are to be displayed
using the main font (Charis SIL in your example), not \zhfont. To get
the circled digit 1 with \zhfont, you should let them have character
class 1.

However, it seems that the circled digits are not set to class 1 in
unicode-letters.tex, so you have to set them manually. I know most
Chinese fonts can display the circled digits, which are also encoded
in GBK, but they seem to be missing in most Latin script fonts.

By the way, my name in Chinese is 尹甸. grin:)

Regards.

-YIN Dian
>
> --
> Jon Babcock
>
>
> _______________________________________________
> XeTeX mailing list
> postmaster at tug.org
> http://tug.org/mailman/listinfo/xetex
>


More information about the XeTeX mailing list