# Font setting in x-pack reporting?

**URL:** <https://discuss.elastic.co/t/font-setting-in-x-pack-reporting/72147>\
**Category:** Elasticsearch\
**Created:** [January 19, 2017, 10:25am UTC](https://discuss.elastic.co/t/font-setting-in-x-pack-reporting/72147 "2017-01-19T10:25:17Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![YuWatanabe](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/yuwatanabe/32/13259_2.png) [@YuWatanabe](https://discuss.elastic.co/u/YuWatanabe)\
**Post date:** [January 19, 2017, 10:25am UTC](https://discuss.elastic.co/t/font-setting-in-x-pack-reporting/72147/1 "2017-01-19T10:25:17Z")

</div>

Hi I am searching a way to generate pdf report including Japanese language.

When I try to download dashboard including Japanese character like below,

 ![](https://us1.discourse-cdn.com/elastic/original/2X/f/fe46e19d3245e266f74e28af1e7f5f5b9bd2ba1b.PNG)

Japanese character is gone in the report.

 ![](https://us1.discourse-cdn.com/elastic/original/2X/c/c7cfdb3313f646c0486758118941ed615b9fc5e3.PNG)

 ![](https://us1.discourse-cdn.com/elastic/original/2X/9/9682984e197fcabbbb962684c522b3ee435a58a9.PNG)

Is there a way in x-pack reporting module which you can set **language code**?

---

<div class="post-metadata">

**Author:** ![YuWatanabe](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/yuwatanabe/32/13259_2.png) [@YuWatanabe](https://discuss.elastic.co/u/YuWatanabe)\
**Post date:** [January 26, 2017, 9:45am UTC](https://discuss.elastic.co/t/font-setting-in-x-pack-reporting/72147/2 "2017-01-26T09:45:15Z")

</div>

I have an update with this issue. I have downloaded japanese font and then regenerated the pdf file.

I have installed Japanese fonts in the kibana machine as below.

`yum install ipa-gothic-fonts.noarch`

[root@filebeat xxx]# fc-list  
/usr/share/X11/fonts/Type1/c0611bt\_.pfb: Courier 10 Pitch:style=Bold Italic  
/usr/share/X11/fonts/Type1/UTBI\_\_\_\_.pfa: Utopia:style=Bold Italic  
/usr/share/X11/fonts/Type1/c0419bt\_.pfb: Courier 10 Pitch:style=Regular  
**/usr/share/fonts/ipa-gothic/ipag.ttf: IPAGothic,IPAゴシック:style=Regular**  
/usr/share/X11/fonts/Type1/c0648bt\_.pfb: Bitstream Charter:style=Regular  
/usr/share/X11/fonts/Type1/cursor.pfa: Cursor:style=Regular  
/usr/share/X11/fonts/Type1/UTB\_\_\_\_\_.pfa: Utopia:style=Bold  
/usr/share/X11/fonts/Type1/c0583bt\_.pfb: Courier 10 Pitch:style=Bold  
/usr/share/X11/fonts/Type1/UTI\_\_\_\_\_.pfa: Utopia:style=Italic  
/usr/share/X11/fonts/Type1/c0582bt\_.pfb: Courier 10 Pitch:style=Italic  
/usr/share/X11/fonts/Type1/c0633bt\_.pfb: Bitstream Charter:style=Bold Italic  
/usr/share/X11/fonts/Type1/c0649bt\_.pfb: Bitstream Charter:style=Italic  
/usr/share/X11/fonts/Type1/c0632bt\_.pfb: Bitstream Charter:style=Bold  
/usr/share/X11/fonts/Type1/UTRG\_\_\_\_.pfa: Utopia:style=Regular

Looks like the characters inside the visualization objects appeared correctly but the object name is still broken. In the below image vis-object-name is **リンゴ** but nothing is shown.

 ![](https://us1.discourse-cdn.com/elastic/original/2X/8/8ebec312553187497f7b2b881eae3f3a67e77b81.PNG)

I appreciate if the font setting in the reporting module become configurable.

---

<div class="post-metadata">

**Author:** ![m-kiuchi](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/m-kiuchi/32/15219_2.png) [@m-kiuchi](https://discuss.elastic.co/u/m-kiuchi)\
**Post date:** [January 31, 2017, 6:04am UTC](https://discuss.elastic.co/t/font-setting-in-x-pack-reporting/72147/3 "2017-01-31T06:04:03Z")

</div>

Hi Yu.

Report plugin includes pdfmake ( [https://github.com/bpampuch/pdfmake](https://github.com/bpampuch/pdfmake) ). It embeded ttf files into pdf file itself.

TTF is Roboto only at off-the-shelf environment and you cannot change. Roboto doesn't include CJK charactor. So it result that you can see only single-byte charactor in pdf.

You can change fonts modifing /usr/share/kibana/plugins/x-pack/plugins/reporting/server/lib/pdf.js .

```
    const fonts = {
  Roboto: {
    normal: fontPath('Roboto-Regular.ttf'),
    bold: fontPath('Roboto-Medium.ttf'),
    italics: fontPath('Roboto-Italic.ttf'),
    bolditalics: fontPath('Roboto-Italic.ttf'),
  }
--
defaultStyle: {
  fontSize: 12,
  font: 'Roboto',
},

```

Then replace ttf files under /usr/share/kibana/plugins/x-pack/plugins/reporting/server/assets/fonts .

But I seems that multi-byte character isn't correctly rendered. You need more help from someone, I think...

 ![](https://us1.discourse-cdn.com/elastic/original/2X/e/e5062db6a842379ba73e4914770537b8f6a87324.png)

Regards,

MK

---

<div class="post-metadata">

**Author:** ![m-kiuchi](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/m-kiuchi/32/15219_2.png) [@m-kiuchi](https://discuss.elastic.co/u/m-kiuchi)\
**Post date:** [February 7, 2017, 1:40am UTC](https://discuss.elastic.co/t/font-setting-in-x-pack-reporting/72147/4 "2017-02-07T01:40:43Z")

</div>

I've succeed with IPA P gothic.  
Configuration is same as above.

![](https://us1.discourse-cdn.com/elastic/original/2X/e/ef499ce0ddbc7d4062888e4a8872c61d3714ca48.png)

MK

---

<div class="post-metadata">

**Author:** ![YuWatanabe](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/yuwatanabe/32/13259_2.png) [@YuWatanabe](https://discuss.elastic.co/u/YuWatanabe)\
**Post date:** [February 21, 2017, 1:31am UTC](https://discuss.elastic.co/t/font-setting-in-x-pack-reporting/72147/5 "2017-02-21T01:31:46Z")

</div>

I appreciate if custom font setting will be available in **kibana.yml** in future releases.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [March 21, 2017, 1:31am UTC](https://discuss.elastic.co/t/font-setting-in-x-pack-reporting/72147/6 "2017-03-21T01:31:47Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
