[Debian-handbook-translators] The Debian Administrator's Handbook ready to be translated!

AYANOKOUZI, Ryuunosuke i38w7i3 at yahoo.co.jp
Thu Nov 5 08:47:57 UTC 2015


Hi Raphael

Thanks for comments. I have rewrote codes[1].
It would be greatly appreciated,
if you review it and give me any suggestion
for making it acceptable to your original repository.

[1] https://github.com/l/debian-handbook/commit/57d7168f05e8826e9c14751ef24a66d0348f73e8

> > "-E" force font embedded.
> > But Japanese font license issues is very complicated for me
> > (What operation is allowd without extra license fee?
> > Using the font in the hard-copy commercial products,
> > embedding the font into PDF, etc...).
> > Avoiding legal issues and saving checking time,
> > I want to check font embedding flag is allowed to embed the font into PDF.
> > If target fonts are allowed to embed, the fonts are embedded.
> >
> > "-q" suppress warnings which is useful for PDF debugging.
> > I want to check such warning is acceptable or not also.
> >
> > If you don't think
> > we need to take font embedding license into account and confirm warning.
> > Please direct me to remove corresponding section.
> > I'll follow your decision.
>
> I build the PDF with DFSG-free packages coming from Debian main. Those packages
> should not have any special clause imposing extra license fee or similar.
> We should be free to use them in a commercial setting.
>
> Thus I believe this change to be useless.

Removed.

> > > 2/ Can you explain the role of each LaTeX command you add (except
> > > \set{main,sans,mono}font that I clearly understand)?
> >
> > \XeTeXtracingfonts=1
> > % Matching Unicode in source file and PDF file.
> > % I can't exactly say in what case, but sometimes these are not exactly same.
> > % This will be a problem when searching word or converting PDF into text file.
>
> This command only prints where fonts files are found according to
> http://mirror.math.ku.edu/tex-archive/info/xetexref/xetex-reference.pdf
>
> So it's not really needed (except maybe during your tests).

Removed.

> > \defaultfontfeatures+{Scale=0.8}
> > % Reducing all font size 80%. The value is chosen
> > % to have the same total page numbers as English PDF.
>
> Why do you want the same number of pages? Does that impact readability?

The reason to set the scaling factor is that
I want to steer readability into a better direction.
But the reason why the value of scaling factor is chosen is long story.

It is just my personal opinion, but I think Japanese font size is too large
and space between the lines is too narrow if default scale used. This spoils readability.
Usually English typesetting is not suitable for Japanese typesetting.
Standard Japanese publication use ~9pt for body text font size and ~15pt for line spacing.
So, setting 9pt option to report class seems to be reasonable.

But unfortunately according to ./build/dblatex/librement.sty,
for some elements (ex. footer, sidebar title etc...)
absolute font size is set using \fontsize{}{} command.
This is quite good as far as 11pt option for report class is used
(this value is defined in ./build/dblatex/librement.xsl).
I tried to set 9pt option instead of 11pt,
such visual difference was lost and line spacing issue still existed.

Keeping such visual difference and making body text font size smaller.
I decided to change font scale. It effects only for text not for line spacing.
So relative size difference between fonts is kept and
line spacing issue is solved by selecting proper value.

Honestly, the scaling factor 0.8 is taken from 9pt/11pt = 0.8181...

> > \setmainfont{DejaVu Serif}
> > \setsansfont{DejaVu Sans}
> > \setmonofont{DejaVu Sans Mono}
>
> Here you change the fonts I guess because they have better coverage of the
> japanese characters... but why do you need the zxjafont package too in
> that case?

The reason to reverting {main|sans|mono}font according to
/usr/share/xml/docbook/stylesheet/dblatex/xsl/lang.xsl is better coverage of
font glyph which is not defined in Japanese font file which will be set by zxjafont.
And the reason of using zxjafont package is
zxjafont package automatically set appropriately Japanese fonts.

> > \usepackage[AutoFallBack=true]{zxjatype}
> > % Including 'zxjatype' package.
> > % zxjatype is used for achieving standard Japanese typesetting.
> > % if this package is not used, like break and hyphenation rule will
> > % not be good for Japanese (line break are added only after white space).
> > % When option AutoFallBack=true, {main|sans|mono}fonts are used
> > % if corresponding glyph for Unicode doesn't exist in
> > % Japanese font file being set in next line.

When zxjatype is used, font selecting rule to a character is slightly modified
(the scope of font set by \set{main|sans|mono}font commands is limited to non-CJK chars,
if \setCJK{main|sans|mono}font commands are initiated afterwards).
Strictly saying this functionality is not implemented by zxjatype but by xeCJK package,
which is called from zxjatype.
However default xeCJK configuration is not enough for for Japanese typesetting,
so zxjatype is used.

> > \usepackage[ipa,scale=0.8]{zxjafont}
> > % Including 'zxjafont' package.
> > % zxjafont is used for achieving standard Japanese font family setting.
> > % if this package is not used, all Japanese characters will not be displayed.
> > % This is because default {main|sans|mono}fonts has no Japanese glyph.
> > % Default font settings are defined in ./build/dblatex/config.xsl and are...
> > % \setmainfont{Gentium Basic}
> > % \setsansfont[Scale=MatchLowercase]{Linux Biolinum O}
> > % \setmonofont[Scale=MatchLowercase]{DejaVu Sans Mono}
>
> Those default fonts are overriden by you own change above...

Here, I wanted to say if <xsl:when test="/book[@lang='ja-JP']"> is false.
In any way, I think zxjafont is required, because of following functionality.

To put it simply, when zxjafont with ipa option called after zxjatype.
\setCJKmainfont{IPAMincho},
\setCJKsansfont{IPAMincho} and
\setCJKmonofont{IPAGothic} are also automatically initiated.
And if zxjatype was called with AutoFallBack=true.
\setCJKmainfont[FallBack]{DejaVu Serif},
\setCJKsansfont[FallBack]{DejaVu Sans} and
\setCJKmonofont[FallBack]{DejaVu Sans Mono} are also automatically initiated.

if (the char is non-CJK) {
  use mainfont (DejaVu Serif) glyph;
} else {
  if (glyph of the char is defined in CJKmainfont) {
    use CJKmainfont (IPAMincho) glyph;
  } else {
    use CJKmainfont fallback (DejaVu Serif) glyph;
  }
}

> > > they are just hacks like moving text around or adding short TeX commands
> > > to force a pagebreak, etc.).
> >
> > I understand. So in what case we need to hack?
> > I find some problems on generated Japanese and English PDF.
> > There are many more issues but out of them...
> > * Sometime text inside sidebar disappeared.
> >   It looks background (shaded) and foreground (text) have same color.
> > * Sidebar "GOING FURTHER Installing a non-Debian system in a domU"
> >   overwrap next list item "--dhcp states that...".
> > In these cases we need to hack?
>
> Yes, also sometimes because we want to avoid having a sidebar split over two
> pages (in particular when the two pages are on each side of a single
> sheet).

I understand. Who will do such activity? Please assign.
I, you, any other volunteers, or professional copy-editor in freexian.com will do?
I am willing to do if I assigned, but I'm not professional copy-editor after all.

> Please squash your changes in a single commit.

Ok, after we reach a consensus on above issues,
I'll squash all commit according to jessie/master/typesetting/pdf/00_add_code_for_building_japanese_pdf branch
into single commit and push the commit onto jessie/master branch.

Regards,
Ryuunosuke Ayanokouzi
--
AYANOKOUZI, Ryuunosuke <i38w7i3 at yahoo.co.jp>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 473 bytes
Desc: OpenPGP Digital Signature
URL: <http://lists.alioth.debian.org/pipermail/debian-handbook-translators/attachments/20151105/a6a976bf/attachment.sig>


More information about the Debian-handbook-translators mailing list