السلام عليكم،
The official Saudi Riyal symbol released by the Saudi Central Bank (SAMA) is now available in SVG format and works perfectly inside the Currency.symbol
field in ERPNext without any hacks or overrides.
This is the working HTML snippet to use in the SAR currency symbol field:
html
CopyEdit
<img src="https://www.sama.gov.sa/ar-sa/Currency/Documents/Saudi_Riyal_Symbol-2.svg"
style="height: 0.9em; vertical-align: middle;">
Tested:
- Appears correctly in standard form views (like Sales Invoice)
- Renders properly in print/PDF formats
- Does not require any font install or JS injection
Optional Improvement: To avoid relying on external URLs (in case SAMA changes the file path), it’s recommended to self-host the SVG inside your custom app:
htm
<img src="/assets/your_app/images/sar-symbol.svg"
style="height: 0.9em; vertical-align: middle;">
Official SAMA SVG Source:
https://www.sama.gov.sa/ar-sa/Currency/Documents/Saudi_Riyal_Symbol-2.svg
Thanks