[Django] #29832: Update Roboto font bundled with django admin

12 views
Skip to first unread message

Django

unread,
Oct 9, 2018, 12:25:10 AM10/9/18
to django-...@googlegroups.com
#29832: Update Roboto font bundled with django admin
------------------------------------------+------------------------
Reporter: eternal-sorrow | Owner: nobody
Type: Bug | Status: new
Component: contrib.admin | Version: 2.1
Severity: Normal | Keywords:
Triage Stage: Unreviewed | Has patch: 0
Needs documentation: 0 | Needs tests: 0
Patch needs improvement: 0 | Easy pickings: 0
UI/UX: 0 |
------------------------------------------+------------------------
Django admin by default uses outdated version of Roboto font, that has
some visual bugs, for example, in light weight the right french quotation
mark is ugly and cyrillic "щ" looks just like "ш"
[[Image(https://pic4a.ru/810/xFE.png)]]

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

Django

unread,
Oct 9, 2018, 12:26:12 AM10/9/18
to django-...@googlegroups.com
#29832: Update Roboto font bundled with django admin
--------------------------------+--------------------------------------

Reporter: eternal-sorrow | Owner: nobody
Type: Bug | Status: new
Component: contrib.admin | Version: 2.1
Severity: Normal | Resolution:

Keywords: | Triage Stage: Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
--------------------------------+--------------------------------------
Changes (by eternal-sorrow):

* Attachment "cb2dfbdb-6065-4313-b1e1-b4692777005a.png" added.

screenshot

Django

unread,
Oct 9, 2018, 12:26:28 AM10/9/18
to django-...@googlegroups.com
#29832: Update Roboto font bundled with django admin
--------------------------------+--------------------------------------

Reporter: eternal-sorrow | Owner: nobody
Type: Bug | Status: new
Component: contrib.admin | Version: 2.1
Severity: Normal | Resolution:

Keywords: | Triage Stage: Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
--------------------------------+--------------------------------------
Description changed by eternal-sorrow:

Old description:

> Django admin by default uses outdated version of Roboto font, that has
> some visual bugs, for example, in light weight the right french
> quotation mark is ugly and cyrillic "щ" looks just like "ш"
> [[Image(https://pic4a.ru/810/xFE.png)]]

New description:

Django admin by default uses outdated version of Roboto font, that has
some visual bugs, for example, in light weight the right french quotation

mark is ugly and cyrillic "щ" looks just like "ш".

--

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

Django

unread,
Oct 9, 2018, 12:27:08 AM10/9/18
to django-...@googlegroups.com
#29832: Update Roboto font bundled with django admin
--------------------------------+--------------------------------------

Reporter: eternal-sorrow | Owner: nobody
Type: Bug | Status: new
Component: contrib.admin | Version: 2.1
Severity: Normal | Resolution:

Keywords: | Triage Stage: Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
--------------------------------+--------------------------------------
Description changed by eternal-sorrow:

Old description:

> Django admin by default uses outdated version of Roboto font, that has


> some visual bugs, for example, in light weight the right french

> quotation mark is ugly and cyrillic "щ" looks just like "ш".

New description:

Django admin by default uses outdated version of Roboto font, that has
some visual bugs, for example, in light weight the right french quotation

mark is ugly and cyrillic "щ" looks just like "ш" (see attachments).

--

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

Django

unread,
Oct 9, 2018, 8:42:13 AM10/9/18
to django-...@googlegroups.com
#29832: Update Roboto font bundled with django admin
--------------------------------+--------------------------------------

Reporter: eternal-sorrow | Owner: nobody
Type: Bug | Status: new
Component: contrib.admin | Version: 2.1
Severity: Normal | Resolution:

Keywords: | Triage Stage: Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
--------------------------------+--------------------------------------

Comment (by veryhappythings):

Looks like the webfont that Django originally sourced from hasn't been
updated in a long time. I guess we'd need to generate new woffs from
https://github.com/google/roboto.git.

* The commit that added the font to Django:
https://github.com/django/django/commit/35901e64b043733acd1687734274553cf994511b
#diff-29ba8bf0e3d3ed401111c144b1842edeR1
* Woff downloads, last changed 2012: https://code.google.com/archive/p
/roboto-webfont/downloads

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

Django

unread,
Oct 9, 2018, 10:37:55 AM10/9/18
to django-...@googlegroups.com
#29832: Update Roboto font
--------------------------------+------------------------------------

Reporter: eternal-sorrow | Owner: nobody
Type: Bug | Status: new
Component: contrib.admin | Version: 2.1
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted

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

* stage: Unreviewed => Accepted


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

Django

unread,
Oct 10, 2018, 9:06:07 AM10/10/18
to django-...@googlegroups.com
#29832: Update Roboto font
-------------------------------------+-------------------------------------
Reporter: eternal-sorrow | Owner:
| veryhappythings
Type: Bug | Status: assigned
Component: contrib.admin | Version: 2.1

Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by veryhappythings):

* status: new => assigned
* owner: nobody => veryhappythings


Comment:

I've built the fonts from source and got this working locally. I'll turn
it into a PR shortly.

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

Django

unread,
Oct 10, 2018, 9:45:17 AM10/10/18
to django-...@googlegroups.com
#29832: Update Roboto font
-------------------------------------+-------------------------------------
Reporter: eternal-sorrow | Owner:
| veryhappythings
Type: Bug | Status: assigned
Component: contrib.admin | Version: 2.1

Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------

Comment (by Tim Graham):

Could you document the steps to build the fonts here so that we have that
recorded?

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

Django

unread,
Oct 10, 2018, 11:02:21 AM10/10/18
to django-...@googlegroups.com
#29832: Update Roboto font
-------------------------------------+-------------------------------------
Reporter: eternal-sorrow | Owner:
| veryhappythings
Type: Bug | Status: assigned
Component: contrib.admin | Version: 2.1

Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------

Comment (by veryhappythings):

Yeah, sure thing. I'm looking at working upstream to just present the
woffs somewhere there - it's possible that I'm just missing them but I
can't find them easily available. For the sake of including a valid
licence etc it'd be best to just grab them from an official release.

--
Ticket URL: <https://code.djangoproject.com/ticket/29832#comment:7>

Django

unread,
Oct 10, 2018, 12:01:59 PM10/10/18
to django-...@googlegroups.com
#29832: Update Roboto font
-------------------------------------+-------------------------------------
Reporter: eternal-sorrow | Owner:
| veryhappythings
Type: Bug | Status: assigned
Component: contrib.admin | Version: 2.1

Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------

Comment (by veryhappythings):

Right, I've got the best I can do here, I think. I've pulled the latest
TTFs down from https://fonts.google.com/specimen/Roboto and converted them
to WOFF's using woff-tools.

The readme at https://github.com/mozilla/zilla-slab contains pretty
detailed notes on how to do this. I did this in Docker to avoid installing
the requirements locally:

{{{
FROM buildpack-deps:stretch

RUN mkdir /src
WORKDIR /src
COPY . /src

RUN apt-get update && \
apt-get -y install ttfautohint woff-tools

RUN \
for font in $(ls *.ttf); \
do \
sfnt2woff $font; \
done;
}}}

There's some chatter about web fonts on the Roboto repo
https://github.com/google/roboto/issues/287 - I don't know a lot about
fonts so I don't know if there's a good reason for them not shipping WOFFs
as standard.

--
Ticket URL: <https://code.djangoproject.com/ticket/29832#comment:8>

Django

unread,
Oct 10, 2018, 2:19:03 PM10/10/18
to django-...@googlegroups.com
#29832: Update Roboto font
-------------------------------------+-------------------------------------
Reporter: eternal-sorrow | Owner:
| veryhappythings
Type: Bug | Status: assigned
Component: contrib.admin | Version: 2.1

Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------

Comment (by Tim Graham):

Can you explain how you got the TTF URLs from the fonts.google.com page?
Do you know what version of the font this is? (e.g. I see some version
numbers at https://github.com/google/roboto/releases).

--
Ticket URL: <https://code.djangoproject.com/ticket/29832#comment:9>

Django

unread,
Oct 10, 2018, 3:26:08 PM10/10/18
to django-...@googlegroups.com
#29832: Update Roboto font
-------------------------------------+-------------------------------------
Reporter: eternal-sorrow | Owner:
| veryhappythings
Type: Bug | Status: assigned
Component: contrib.admin | Version: 2.1

Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------

Comment (by veryhappythings):

If you click "select this font" on Google Fonts, there's a download link
on the menu that pops up.

The version of the fonts is in the TTF metadata: "Version 2.137; 2017"
(which, helpfully, is not available on the Roboto repo). Looking into
this, it looks like I can set a version when I create the WOFF file,
although I have not yet figured out how to read the version from a WOFF
file to confirm that it's been added. I'll see if I can get it into the
file, and if that doesn't work I'll put it in the readme.

--
Ticket URL: <https://code.djangoproject.com/ticket/29832#comment:10>

Django

unread,
Oct 10, 2018, 3:27:01 PM10/10/18
to django-...@googlegroups.com
#29832: Update Roboto font
-------------------------------------+-------------------------------------
Reporter: eternal-sorrow | Owner:
| veryhappythings
Type: Bug | Status: assigned
Component: contrib.admin | Version: 2.1

Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------

Comment (by veryhappythings):

Oh, here's the commit that adds the TTFs to Google Fonts - that's
something https://github.com/google/fonts/pull/727

--
Ticket URL: <https://code.djangoproject.com/ticket/29832#comment:11>

Django

unread,
Oct 11, 2018, 10:58:48 AM10/11/18
to django-...@googlegroups.com
#29832: Update Roboto font
--------------------------------+---------------------------------------
Reporter: Eternal Sorrow | Owner: Mac Chapman
Type: Bug | Status: assigned
Component: contrib.admin | Version: 2.1

Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
--------------------------------+---------------------------------------

Comment (by Mac Chapman):

The roboto devs just pointed me at the excellent
https://github.com/majodev/google-webfonts-helper which absolves me of any
need to compile things on my own machine. I'll push the legit Google woffs
ASAP.

--
Ticket URL: <https://code.djangoproject.com/ticket/29832#comment:12>

Django

unread,
Oct 11, 2018, 12:17:56 PM10/11/18
to django-...@googlegroups.com
#29832: Update Roboto font
--------------------------------+---------------------------------------
Reporter: Eternal Sorrow | Owner: Mac Chapman
Type: Bug | Status: assigned
Component: contrib.admin | Version: 2.1

Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
--------------------------------+---------------------------------------

Comment (by Mac Chapman):

Right, I've used https://github.com/majodev/google-webfonts-helper to pull
the v2.137 font files from Google Fonts. I now believe they're the same
files as Google themselves serve. I've added a mention of the webfonts
helper to the font readme, too.

--
Ticket URL: <https://code.djangoproject.com/ticket/29832#comment:13>

Django

unread,
Oct 11, 2018, 1:16:31 PM10/11/18
to django-...@googlegroups.com
#29832: Update Roboto font
--------------------------------+---------------------------------------
Reporter: Eternal Sorrow | Owner: Mac Chapman
Type: Bug | Status: assigned
Component: contrib.admin | Version: 2.1

Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
--------------------------------+---------------------------------------

Comment (by Tim Graham):

Nice! Which charsets did you select? I selected them all (not sure if
that's the right thing to do) and it seems like I received different files
than what's in your PR.

--
Ticket URL: <https://code.djangoproject.com/ticket/29832#comment:14>

Django

unread,
Oct 11, 2018, 2:15:08 PM10/11/18
to django-...@googlegroups.com
#29832: Update Roboto font
--------------------------------+---------------------------------------
Reporter: Eternal Sorrow | Owner: Mac Chapman
Type: Bug | Status: assigned
Component: contrib.admin | Version: 2.1

Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
--------------------------------+---------------------------------------

Comment (by Mac Chapman):

Hmm, I selected them all too - seemed sensible given that this is a
cyrillic issue - and went for weights 300, regular (400), and 700, as
listed in the readme.

Here are the files I used prior to renaming them to match the existing
ones:

{{{
➜ shasum *.woff
3ea2c95e21cc88d82bb111c99883484c64d657db roboto-v18-cyrillic-
ext_vietnamese_latin-ext_latin_greek-ext_greek_cyrillic-300.woff
e4774be50a91e83c4fdc647e27342d03a29fd215 roboto-v18-cyrillic-
ext_vietnamese_latin-ext_latin_greek-ext_greek_cyrillic-700.woff
96eca9934dff83a12371dd54fc6c1bf29256815a roboto-v18-cyrillic-
ext_vietnamese_latin-ext_latin_greek-ext_greek_cyrillic-regular.woff
➜ ls -l *.woff
-rw-r--r--@ 1 mac staff 85692 11 Oct 18:03 roboto-v18-cyrillic-
ext_vietnamese_latin-ext_latin_greek-ext_greek_cyrillic-300.woff
-rw-r--r--@ 1 mac staff 86184 11 Oct 18:03 roboto-v18-cyrillic-
ext_vietnamese_latin-ext_latin_greek-ext_greek_cyrillic-700.woff
-rw-r--r--@ 1 mac staff 85876 11 Oct 18:03 roboto-v18-cyrillic-
ext_vietnamese_latin-ext_latin_greek-ext_greek_cyrillic-regular.woff
}}}

These match the files in my branch. What are you seeing?

(Thanks for your patience! I really appreciate it)

--
Ticket URL: <https://code.djangoproject.com/ticket/29832#comment:15>

Django

unread,
Oct 11, 2018, 11:24:48 PM10/11/18
to django-...@googlegroups.com
#29832: Update Roboto font to v2.137
-------------------------------------+-------------------------------------

Reporter: Eternal Sorrow | Owner: Mac
| Chapman
Type: Bug | Status: assigned
Component: contrib.admin | Version: 2.1
Severity: Normal | Resolution:
Keywords: | Triage Stage: Ready for
| checkin
Has patch: 1 | Needs documentation: 0

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

* has_patch: 0 => 1
* stage: Accepted => Ready for checkin


Comment:

Thanks, now I see the same.

--
Ticket URL: <https://code.djangoproject.com/ticket/29832#comment:16>

Django

unread,
Oct 11, 2018, 11:31:36 PM10/11/18
to django-...@googlegroups.com
#29832: Update Roboto font to v2.137
-------------------------------------+-------------------------------------
Reporter: Eternal Sorrow | Owner: Mac
| Chapman
Type: Bug | Status: closed
Component: contrib.admin | Version: 2.1
Severity: Normal | Resolution: fixed

Keywords: | Triage Stage: Ready for
| checkin
Has patch: 1 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Tim Graham <timograham@…>):

* status: assigned => closed
* resolution: => fixed


Comment:

In [changeset:"fb5dfd53a784ee76f71de12edee995ef984cc925" fb5dfd53]:
{{{
#!CommitTicketReference repository=""
revision="fb5dfd53a784ee76f71de12edee995ef984cc925"
Fixed #29832 -- Updated Roboto font to v2.137.
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/29832#comment:17>

Reply all
Reply to author
Forward
0 new messages