2

We are generating the PDF through RenderX and need to know open source font files which would generate chinese characters / multilanguage . We used arialuni.ttf for POC in windows. Kindly let us know any commercially free Fonts available.

Mads Hansen
  • 63,927
  • 12
  • 112
  • 147
user403386
  • 43
  • 1
  • 5

1 Answers1

0

A good source of open source fonts in OTF format is Google: https://www.google.com/get/noto/#/

I downloaded https://www.google.com/get/noto/#/family/noto-sans-hans for simplified chinese. I added to my configuration like this:

<font-group xml:base="Noto/" label="Noto" embed="true" subset="true" initial-encoding="standard">
  <font-family name="NotoSansCJKsc">
    <font><font-data otf="NotoSansCJKsc-Regular.otf"/></font>
    <font weight="bold"><font-data otf="NotoSansCJKsc-Bold.otf"/></font>
  </font-family>
</font-group>

Using this FO fragment:

    <fo:flow flow-name="xsl-region-body"  font-family="NotoSansCJKsc">
        <fo:block>不知 可这里零件真多 他的手好快呀</fo:block>
        <fo:block font-weight="bold">不知 可这里零件真多 他的手好快呀</fo:block>
    </fo:flow>

I get this output:

enter image description here

Kevin Brown
  • 8,805
  • 2
  • 20
  • 38