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.
* 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>
* owner: nobody => Kelly Hogan
* status: new => assigned
--
Ticket URL: <https://code.djangoproject.com/ticket/29122#comment:2>
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>
* owner: Kelly Hogan => (none)
* status: assigned => new
--
Ticket URL: <https://code.djangoproject.com/ticket/29122#comment:4>
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>
* owner: (none) => SaNjU Saini
* status: new => assigned
--
Ticket URL: <https://code.djangoproject.com/ticket/29122#comment:6>
* 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].
--
Ticket URL: <https://code.djangoproject.com/ticket/29122#comment:6>