How to display text with different font-style with same baseline in XSL-FO?

In Apache FOP, I’m using TimesNewRoman font to render content text

SYK ( 단차 보상 도전 TAPE), Model: AMB136ZH01 REV0.4

This text contains special words (단차 보상 도전 - the Korean language) that TimesNewRoman font can’t render, so I must use the UnGungseo.ttf font to render these words. However, the text in rendered PDF hasn’t the same baseline as picture below:


How can I display text content in the same baseline?
The TimesNewRoman font I’m using times.ttf and the UnGungseo font to render special characters UnGungseo.ttf
My xsl-fo content file here and my fop.xconf file here and in fop.xconf file I include UnGungseo.ttf as below:

<font kerning="yes" embed-url="component/iam-einvoice/fonts/UnGungseo.ttf">
  <font-triplet name="KoreanRegular" style="normal" weight="normal"/>
</font>

While there might be someone with enough experience here to help you with this, you might have a wider audience with the apache fop community if you have not yet tried there.

1 Like

Hi jenshp, I’ve posted this question to StackOverflow, but now there is no answer to address this problem

not sure if you want this

<fo:block font-family="Verdana, Arial">
  Some text ...
</fo:block>

<fo:block font-family="'Times New Roman', Verdana">
  Some text...
</fo:block>
1 Like

Hi Zhangwei, this text (SYK ( 단차 보상 도전 TAPE), Model: AMB136ZH01 REV0.4) is typed by the end-user, it could be Chinese, Japanese, Korean characters, so I think it is too difficult to detect these characters