# How to add a new font to Poster and Badge Designer

**URL:** <https://talk.getindico.io/t/how-to-add-a-new-font-to-poster-and-badge-designer/1584>\
**Category:** Administrators\
**Created:** [December 10, 2019, 6:29am UTC](https://talk.getindico.io/t/how-to-add-a-new-font-to-poster-and-badge-designer/1584 "2019-12-10T06:29:05Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![mohammad\_amro](https://talk.getindico.io/user_avatar/talk.getindico.io/mohammad_amro/32/385_2.png) [@mohammad\_amro](https://talk.getindico.io/u/mohammad_amro)\
**Post date:** [December 10, 2019, 6:29am UTC](https://talk.getindico.io/t/how-to-add-a-new-font-to-poster-and-badge-designer/1584/1 "2019-12-10T06:29:05Z")

</div>

Hi  
How to add a new font to Poster and Badge Designer to support the Arabic language.

---

<div class="post-metadata">

**Author:** ![kolodzie](https://talk.getindico.io/user_avatar/talk.getindico.io/kolodzie/32/18_2.png) [@kolodzie](https://talk.getindico.io/u/kolodzie)\
**Post date:** [December 12, 2019, 7:20am UTC](https://talk.getindico.io/t/how-to-add-a-new-font-to-poster-and-badge-designer/1584/2 "2019-12-12T07:20:29Z")

</div>

Hey,

so, currently unfortunately we don’t support Arabic fonts in the Badge/Poster Designer. However I took a few minutes to see how complicated it would be to actually make it work. What I will present might work for you if you manage your own instance of Indico.

1. The changes I applied to Indico:

```diff
diff --git a/indico/legacy/pdfinterface/base.py b/indico/legacy/pdfinterface/base.py
index 8b5554ad4e..d71b47d7a0 100644
--- a/indico/legacy/pdfinterface/base.py
+++ b/indico/legacy/pdfinterface/base.py
@@ -126,6 +126,7 @@ def setTTFonts():
         addMapping('LinuxLibertine', 1, 1, 'LinuxLibertine-Bold-Italic')
         pdfmetrics.registerFont(TTFont('Kochi-Mincho', os.path.join(font_dir, 'kochi-mincho-subst.ttf')))
         pdfmetrics.registerFont(TTFont('Kochi-Gothic', os.path.join(font_dir, 'kochi-gothic-subst.ttf')))
+ pdfmetrics.registerFont(TTFont('Geeza-Pro', os.path.join(font_dir, 'Geeza-Pro-Regular.ttf')))
         alreadyRegistered = True

diff --git a/indico/modules/designer/pdf.py b/indico/modules/designer/pdf.py
index e6e323bf7c..31d7249230 100644
--- a/indico/modules/designer/pdf.py
+++ b/indico/modules/designer/pdf.py
@@ -32,7 +32,8 @@ FONT_STYLES = {
     'LinuxLibertine': ['LinuxLibertine', 'LinuxLibertine-Bold', 'LinuxLibertine-Italic', 'LinuxLibertine-Bold-Italic'],
     'Kochi-Mincho': ['Kochi-Mincho', 'Kochi-Mincho', 'Kochi-Mincho', 'Kochi-Mincho'],
     'Kochi-Gothic': ['Kochi-Gothic', 'Kochi-Gothic', 'Kochi-Gothic', 'Kochi-Gothic'],
- 'Uming-CN': ['Uming-CN', 'Uming-CN', 'Uming-CN', 'Uming-CN']
+ 'Uming-CN': ['Uming-CN', 'Uming-CN', 'Uming-CN', 'Uming-CN'],
+ 'Geeza-Pro': ['Geeza-Pro', 'Geeza-Pro', 'Geeza-Pro', 'Geeza-Pro']
 }

 ALIGNMENTS = {
diff --git a/indico/modules/designer/templates/template.html b/indico/modules/designer/templates/template.html
index ed7a1bc58b..2d207bbcea 100644
--- a/indico/modules/designer/templates/template.html
+++ b/indico/modules/designer/templates/template.html
@@ -185,6 +185,7 @@
                                 <option>Kochi-Mincho</option>
                                 <option>Kochi-Gothic</option>
                                 <option>Uming-CN</option>
+ <option>Geeza-Pro</option>
                             </optgroup>
                         </select>
                     </div>

```

1. Then you need to make sure that `Geeza-Pro-Regular.ttf` ends up in the right directory. The fonts we are using are installed as a dependency (defined in `requirements.txt`) so you have two options here.

Having done that I managed to have a fixed text field in my Badge template with Arabic text.

Regards,  
Michal

---

<div class="post-metadata">

**Author:** ![mohammad\_amro](https://talk.getindico.io/user_avatar/talk.getindico.io/mohammad_amro/32/385_2.png) [@mohammad\_amro](https://talk.getindico.io/u/mohammad_amro)\
**Post date:** [December 15, 2019, 5:59am UTC](https://talk.getindico.io/t/how-to-add-a-new-font-to-poster-and-badge-designer/1584/3 "2019-12-15T05:59:08Z")

</div>

> [@kolodzie](#):
>
> `Geeza-Pro-Regular.ttf`

Thanks, I tried this solution and I received the following error messages:

# Something went wrong

ValueError: Can’t map determine family/bold/italic for geeza-pro.

---

<div class="post-metadata">

**Author:** ![mohammad\_amro](https://talk.getindico.io/user_avatar/talk.getindico.io/mohammad_amro/32/385_2.png) [@mohammad\_amro](https://talk.getindico.io/u/mohammad_amro)\
**Post date:** [January 14, 2020, 7:58am UTC](https://talk.getindico.io/t/how-to-add-a-new-font-to-poster-and-badge-designer/1584/4 "2020-01-14T07:58:57Z")

</div>

@kolodzie  
could you please share with me the font `Geeza-Pro-Regular.ttf`.  
still, I have a problem with Arabic font.

Thanks

---

<div class="post-metadata">

**Author:** ![kolodzie](https://talk.getindico.io/user_avatar/talk.getindico.io/kolodzie/32/18_2.png) [@kolodzie](https://talk.getindico.io/u/kolodzie)\
**Post date:** [January 14, 2020, 8:22am UTC](https://talk.getindico.io/t/how-to-add-a-new-font-to-poster-and-badge-designer/1584/5 "2020-01-14T08:22:10Z")

</div>

Hey,

I just found it somewhere on the Internet. I think I got it from here [http://fontsgeek.com/fonts/Geeza-Pro-Regular](http://fontsgeek.com/fonts/Geeza-Pro-Regular)

---

<div class="post-metadata">

**Author:** ![mohammad\_amro](https://talk.getindico.io/user_avatar/talk.getindico.io/mohammad_amro/32/385_2.png) [@mohammad\_amro](https://talk.getindico.io/u/mohammad_amro)\
**Post date:** [January 14, 2020, 11:29am UTC](https://talk.getindico.io/t/how-to-add-a-new-font-to-poster-and-badge-designer/1584/6 "2020-01-14T11:29:11Z")

</div>

Thanks, The characters are written in LTR instead of RTL. Also,the characters are not connected to each other (It should be like “سلام” not “س ل ا م”).

---

<div class="post-metadata">

**Author:** ![kolodzie](https://talk.getindico.io/user_avatar/talk.getindico.io/kolodzie/32/18_2.png) [@kolodzie](https://talk.getindico.io/u/kolodzie)\
**Post date:** [January 14, 2020, 11:49am UTC](https://talk.getindico.io/t/how-to-add-a-new-font-to-poster-and-badge-designer/1584/7 "2020-01-14T11:49:38Z")

</div>

Unfortunately, Indico is not yet ready for RTL languages hence these problems.
