From: Deri <deri@chuzzlewit.myzen.co.uk>
To: Alejandro Colomar <alx@kernel.org>
Cc: linux-man@vger.kernel.org
Subject: Re: Unable to generate glyphs for chinese letters
Date: Wed, 13 Mar 2024 16:38:41 +0000 [thread overview]
Message-ID: <2607548.uBY7QHFjlC@pip> (raw)
In-Reply-To: <ZfGpZTxUo4EelRlK@debian>
On Wednesday, 13 March 2024 13:25:51 GMT Alejandro Colomar wrote:
> Hi Deri,
>
> I've noticed another similar issue, this time with Chinese.
>
> I see chinese letters in the bookmarks, but they don't appear in the
> PDF body. If I read the manual page in the terminal, I do see them.
> When generating the PDF, I get a bunch of warnings about special
> characters not defined.
>
>
> See the page head(1):
>
> $ MANWIDTH=64 man ./man/zh_CN/man1/chage.1 | head -n4
> CHAGE(1) User Commands CHAGE(1)
>
> 名称
> chage - 更改用户密码过期信息
>
> And here's how I generated the pages:
>
> $ pwd
> /home/alx/src/linux/man-pages/man-pages/shadow
> $ MANDIR=~/src/shadow/shadow/build/man
> $ pdfdir=.tmp
> $ GROFFBINDIR=/opt/local/gnu/groff/deri-gropdf-ng/bin
> $ PRECONV=$GROFFBINDIR/preconv
> $ PIC=$GROFFBINDIR/pic
> $ TBL=$GROFFBINDIR/tbl
> $ EQN=$GROFFBINDIR/eqn
> $ TROFF=$GROFFBINDIR/troff
> $ GROPDF=$GROFFBINDIR/gropdf
> $ make_book()
>
> > {
> > make build-book PRECONV=$PRECONV PIC=$PIC TBL=$TBL EQN=$EQN TROFF=$TROFF
> > GROPDF=$GROPDF "$@"; }
>
> $ make_book_lang()
>
> > {
> > _LMB=$pdfdir/shadow-HEAD_$1.pdf; make_book MANDIR=$MANDIR/$1 _LMB=$_LMB;
> > }
>
> $ make_book MANDIR=$MANDIR _LMB=$pdfdir/shadow-HEAD.pdf
> MKDIR .tmp/
> Build .tmp/shadow-HEAD.pdf
> $ make_book_lang da
> Build .tmp/shadow-HEAD_da.pdf
> $ make_book_lang de
> Build .tmp/shadow-HEAD_de.pdf
> /opt/local/gnu/groff/deri-gropdf-ng/bin/troff:newusers.8:44: warning [p 1,
> 2.8i]: cannot break line $ make_book_lang fr
> Build .tmp/shadow-HEAD_fr.pdf
> $ make_book_lang it
> Build .tmp/shadow-HEAD_it.pdf
> $ make_book_lang pl
> Build .tmp/shadow-HEAD_pl.pdf
> $ make_book_lang ru
> Build .tmp/shadow-HEAD_ru.pdf
> /opt/local/gnu/groff/deri-gropdf-ng/bin/gropdf:chage.1: warning:
> Font 'Tinos (TINOR)' has 2639 glyphs
> You would see a noticeable speedup if you install the perl module Inline::C
>
> $ make_book_lang sv
> Build .tmp/shadow-HEAD_sv.pdf
> $ make_book_lang uk
> Build .tmp/shadow-HEAD_uk.pdf
> /opt/local/gnu/groff/deri-gropdf-ng/bin/gropdf:chage.1: warning:
> Font 'Tinos (TINOR)' has 2639 glyphs
> You would see a noticeable speedup if you install the perl module Inline::C
>
> $ make_book_lang zh_CN
> Build .tmp/shadow-HEAD_zh_CN.pdf
> /opt/local/gnu/groff/deri-gropdf-ng/bin/troff:chage.1:33: warning: special
> character 'u540D' not defined
> /opt/local/gnu/groff/deri-gropdf-ng/bin/troff:chage.1:33: warning: special
> character 'u79F0' not defined
> /opt/local/gnu/groff/deri-gropdf-ng/bin/troff:chage.1:34: warning: special
> character 'u66F4' not defined
> /opt/local/gnu/groff/deri-gropdf-ng/bin/troff:chage.1:34: warning: special
> character 'u6539' not defined
>
> [ And a bunch of similar warnings... ]
>
>
> Cheers,
> Alex
Hi Alex,
The chinese glyphs are present in the bookmarks because you are using my
branch. :-) They are missing in the text because you don't have a font
installed which contains those glyphs.
You can download a patch from here:-
http://chuzzlewit.co.uk/chinese.patch.gz
It is too large for email, it contains the UnifontMedium font which contains
the Chinese glyphs, typographically it is not the best font, a proper type 1
font which contains CJK glyphs would be better, also it does not do bold
glyphs.
Gunzip the file then use git apply. There will be two new files in the devpdf
directory which should be added to git.
Cheers
Deri
next prev parent reply other threads:[~2024-03-13 16:38 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-03-13 13:25 Unable to generate glyphs for chinese letters Alejandro Colomar
2024-03-13 13:27 ` Alejandro Colomar
2024-03-13 16:38 ` Deri [this message]
2024-03-13 16:41 ` Deri
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=2607548.uBY7QHFjlC@pip \
--to=deri@chuzzlewit.myzen.co.uk \
--cc=alx@kernel.org \
--cc=linux-man@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox