Opened 8 months ago

Last modified 6 months ago

#29122 new New feature

Add a better font for Persian/Farsi to the admin

Reported by: Mohammad Hossein Mojtahedi Owned by:
Component: contrib.admin Version: 2.0
Severity: Normal Keywords: Persian, font, Farsi
Cc: Triage Stage: Someday/Maybe
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: yes

Description

Hi,

By every definition of design, Tahoma, Arial, Times New Roman and other default fonts are horrible in Persian (Farsi) script and can't be read properly.

There is this fantastic font called Vazir which has become the industry standard in open-source fonts.

Should we fix this in Django admin? How?

Should it be like this:

html[lang='fa-IR']{
    font-family: 'Vazir', tahoma, Arial !important;
}

html[lang='fa-IR'] code,
html[lang='fa-IR'] pre,
html[lang='fa-IR'] kbd{
    font-family: 'Vazir-code', "Bitstream Vera Sans Mono", Monaco, "Courier New", Courier, monospace; // Vazir-Code is a monospace font based on Vazir
}

And have a @font-face block before it or a <link> in HTML?

I'm looking for an approach that considers performance, font load time, multilingual.

Or even more options for the future. Maybe even a SETTING variable which people could easily load a font for their admin, regardless of language.

Change History (5)

comment:1 Changed 8 months ago by Tim Graham

Easy pickings: unset
Summary: A better font for Persian/FarsiAdd a better font for Persian/Farsi to the admin
Triage Stage: UnreviewedSomeday/Maybe

A possible solution is to override the {% extrastyle %} block of the base_site.html template to add the styles you mentioned. I'm not sure if there would be consensus to vendor the extra font in Django. Discussion for ideas like this usually happens more readily on the DevelopersMailingList. If you have colleagues who may have an opinion, please ask them to chime in.

comment:2 Changed 6 months ago by Kelly Hogan

Owner: changed from nobody to Kelly Hogan
Status: newassigned

comment:3 Changed 6 months ago by Tim Graham

Hi Kelly, I think it's a bit premature to assign the ticket as it has "someday/maybe" status. The first step is to propose a solution (if a change in Django needs to be made at all) on the DevelopersMailingList as I suggested in comment 1.

comment:4 Changed 6 months ago by Kelly Hogan

Owner: Kelly Hogan deleted
Status: assignednew

comment:5 Changed 6 months ago by Kelly Hogan

Thanks for reaching out Tim! My group and I are new to contributing to Django. We will take this approach with tickets that have a "someday/maybe" status in the future.

Note: See TracTickets for help on using tickets.
Back to Top