Saudi Riyal Symbol in Frappe / ERPNext

Author
Jul 28, 2026
Saudi Riyal Symbol in Frappe / ERPNext

The official Saudi Riyal Sign is U+20C1, assigned in Unicode 17.0. This guide covers a fresh Frappe/ERPNext server with a single site.

The work splits cleanly in two: the server administrator installs the font and sets the currency symbol, then print format designers use it in templates.


Part A — For the server administrator

Set your site name once:

1. Install the font

The Saudi Central Bank publishes the symbol as SVG/EPS/PNG artwork, not as a font. Use the community font, licensed SIL OFL 1.1. Install the regular weight:

saudi_riyalshould appear in the output.

The font is now available system-wide as a fallback. Leave your CSS and print formats alone at this stage — fontconfig will supply this font for U+20C1 only, and take every other character from your normal fonts.

2. Set the currency symbol

E2 83 81 is UTF-8 for U+20C1, so this writes the exact bytes with nothing to mistype:

clear-cache is required — get_currency_symbol() is cached and direct SQL bypasses the ORM.

Alternatively, do it through the UI: copy this character — — then go to Awesome bar → Currency → SAR → Symbol, paste and Save. The field will look almost blank afterwards because the glyph is thin and narrow; that is normal.

3. Verify

Check the stored value by its bytes rather than by eye:

bench --site "$SITE" mariadb -e \
  "SELECT HEX(symbol) FROM tabCurrency WHERE name='SAR';"

E28381 confirms U+20C1 is stored correctly.

Then confirm a real PDF embeds the glyph:

sudo apt install -y poppler-utils
bench --site "$SITE" console
pdf = frappe.get_print("Quotation", "<your-quotation-name>", as_pdf=True)
open('/tmp/t.pdf','wb').write(pdf)
pdffonts /tmp/t.pdf

saudi_riyalregular in that list means the symbol rendered — wkhtmltopdf only embeds fonts it actually used during layout.

This works on both the wkhtmltopdf and Chrome PDF generators with no further configuration.

Author
Written by ERPGulf Team