[Django] #29122: A better font for Persian/Farsi

40 views
Skip to first unread message

Django

unread,
Feb 10, 2018, 7:29:43 AM2/10/18
to django-...@googlegroups.com
#29122: A better font for Persian/Farsi
-------------------------------------+-------------------------------------
Reporter: Mohammad | Owner: nobody
Hossein Mojtahedi |
Type: New | Status: new
feature |
Component: | Version: 2.0
contrib.admin | Keywords: Persian, font,
Severity: Normal | Farsi
Triage Stage: | Has patch: 0
Unreviewed |
Needs documentation: 0 | Needs tests: 0
Patch needs improvement: 0 | Easy pickings: 1
UI/UX: 1 |
-------------------------------------+-------------------------------------
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 [https://github.com/rastikerdar/vazir-
font Vazir] which has become the industry standard in open-source fonts.

Should we fix this in Django admin? How?

Should it be like this:

{{{#!css
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.

--
Ticket URL: <https://code.djangoproject.com/ticket/29122>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

Django

unread,
Feb 10, 2018, 11:56:29 AM2/10/18
to django-...@googlegroups.com
#29122: Add a better font for Persian/Farsi to the admin
-------------------------------------+-------------------------------------
Reporter: Mohammad Hossein | Owner: nobody
Mojtahedi |
Type: New feature | Status: new
Component: contrib.admin | Version: 2.0
Severity: Normal | Resolution:
Keywords: Persian, font, | Triage Stage:
Farsi | Someday/Maybe
Has patch: 0 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 1
-------------------------------------+-------------------------------------
Changes (by Tim Graham):

* easy: 1 => 0
* stage: Unreviewed => Someday/Maybe


Comment:

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.

--
Ticket URL: <https://code.djangoproject.com/ticket/29122#comment:1>

Django

unread,
Apr 18, 2018, 3:08:50 PM4/18/18
to django-...@googlegroups.com
#29122: Add a better font for Persian/Farsi to the admin
-------------------------------------+-------------------------------------
Reporter: Mohammad Hossein | Owner: Kelly
Mojtahedi | Hogan
Type: New feature | Status: assigned

Component: contrib.admin | Version: 2.0
Severity: Normal | Resolution:
Keywords: Persian, font, | Triage Stage:
Farsi | Someday/Maybe
Has patch: 0 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 1
-------------------------------------+-------------------------------------
Changes (by Kelly Hogan):

* owner: nobody => Kelly Hogan
* status: new => assigned


--
Ticket URL: <https://code.djangoproject.com/ticket/29122#comment:2>

Django

unread,
Apr 18, 2018, 9:38:17 PM4/18/18
to django-...@googlegroups.com
#29122: Add a better font for Persian/Farsi to the admin
-------------------------------------+-------------------------------------
Reporter: Mohammad Hossein | Owner: Kelly
Mojtahedi | Hogan
Type: New feature | Status: assigned
Component: contrib.admin | Version: 2.0
Severity: Normal | Resolution:
Keywords: Persian, font, | Triage Stage:
Farsi | Someday/Maybe
Has patch: 0 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 1
-------------------------------------+-------------------------------------

Comment (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.

--
Ticket URL: <https://code.djangoproject.com/ticket/29122#comment:3>

Django

unread,
Apr 20, 2018, 4:02:03 PM4/20/18
to django-...@googlegroups.com
#29122: Add a better font for Persian/Farsi to the admin
-------------------------------------+-------------------------------------
Reporter: Mohammad Hossein | Owner: (none)

Mojtahedi |
Type: New feature | Status: new
Component: contrib.admin | Version: 2.0
Severity: Normal | Resolution:
Keywords: Persian, font, | Triage Stage:
Farsi | Someday/Maybe
Has patch: 0 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 1
-------------------------------------+-------------------------------------
Changes (by Kelly Hogan):

* owner: Kelly Hogan => (none)
* status: assigned => new


--
Ticket URL: <https://code.djangoproject.com/ticket/29122#comment:4>

Django

unread,
Apr 20, 2018, 4:03:29 PM4/20/18
to django-...@googlegroups.com
#29122: Add a better font for Persian/Farsi to the admin
-------------------------------------+-------------------------------------
Reporter: Mohammad Hossein | Owner: (none)
Mojtahedi |
Type: New feature | Status: new
Component: contrib.admin | Version: 2.0
Severity: Normal | Resolution:
Keywords: Persian, font, | Triage Stage:
Farsi | Someday/Maybe
Has patch: 0 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 1
-------------------------------------+-------------------------------------

Comment (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.

--
Ticket URL: <https://code.djangoproject.com/ticket/29122#comment:5>

Django

unread,
Oct 20, 2020, 8:06:17 AM10/20/20
to django-...@googlegroups.com
#29122: Add a better font for Persian/Farsi to the admin
-------------------------------------+-------------------------------------
Reporter: Mohammad Hossein | Owner: SaNjU
Mojtahedi | Saini

Type: New feature | Status: assigned
Component: contrib.admin | Version: 2.0
Severity: Normal | Resolution:
Keywords: Persian, font, | Triage Stage:
Farsi | Someday/Maybe
Has patch: 0 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 1
-------------------------------------+-------------------------------------
Changes (by SaNjU Saini):

* owner: (none) => SaNjU Saini


* status: new => assigned


--
Ticket URL: <https://code.djangoproject.com/ticket/29122#comment:6>

Django

unread,
Aug 17, 2022, 4:23:32 AM8/17/22
to django-...@googlegroups.com
#29122: Add a better font for Persian/Farsi to the admin
-------------------------------------+-------------------------------------
Reporter: Mohammad Hossein | Owner: (none)
Mojtahedi |
Type: New feature | Status: closed
Component: contrib.admin | Version: 2.0
Severity: Normal | Resolution: fixed
Keywords: Persian, font, | Triage Stage: Accepted
Farsi |
Has patch: 0 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 1
-------------------------------------+-------------------------------------
Changes (by Carlton Gibson):

* status: new => closed
* resolution: => fixed
* stage: Someday/Maybe => Accepted


Comment:

This should be resolved by #33878 (for Django 4.2) which added `--font-
family-primary` and `--font-family-monospace` variables that can be
overridden as per [https://docs.djangoproject.com/en/dev/ref/contrib/admin
/#theming-support Theming support docs].

Reply all
Reply to author
Forward
0 new messages