asciidocfx / AsciidocFX

Asciidoc Editor and Toolchain written with JavaFX 21 (Build PDF, Epub, Mobi and HTML books, documents and slides)
http://www.asciidocfx.com/
Apache License 2.0
1.91k stars 298 forks source link

font alignment problem #418

Open njhuanghua opened 5 years ago

njhuanghua commented 5 years ago

When I'm writing the English and Chinese fonts in the same line, the two fonts are not aligned correctly in generated PDF. You can see that the Chinese font is lower than the English font. Sometimes, there is a big space between the two English words in the PDF, but in the source .adoc file, only one space between the two English words. I cannot find any fields that can be configured in the fo-pdf.xsl file. Can you give me some advices? Thanks a lot.

image

rahmanusta commented 5 years ago

Modify this line in your local file: https://github.com/asciidocfx/AsciidocFX/blob/master/conf/docbook-config/fo-pdf.xsl#L127

Change 'alignment' to one of you desire here http://docbook.sourceforge.net/release/xsl/current/doc/fo/alignment.html

njhuanghua commented 5 years ago

Thanks, but it does not work. The line 127 "alignment" parameter is used to specify the horizontal alignment of body text, but what I would like to specify is the vertical alignment of the texts written in the different fonts. Can you see the snapshot in my question?

rahmanusta commented 5 years ago

Can you ask it in the FOP email group? https://xmlgraphics.apache.org/fop/maillist.html