unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
* [FONTS]: Media Type Specification Changed.
@ 2020-05-10 14:41 Raghav Gururajan
  2020-05-10 15:55 ` Tobias Geerinckx-Rice
  0 siblings, 1 reply; 7+ messages in thread
From: Raghav Gururajan @ 2020-05-10 14:41 UTC (permalink / raw)
  To: guix-devel


[-- Attachment #1.1.1: Type: text/plain, Size: 523 bytes --]

Hello Guix!

As of 2017, IANA (www.iana.org) has changed the standard template for
font media types.

SOURCE: https://www.iana.org/assignments/media-types/media-types.xhtml#font

So, font/freetype and font/opentype has to be updated to font/ttf and
font/otf, respectively.

Almost all font packages in guix, are using the old specification. I
have updated font-gnu-freefont a while ago. We need to update other
packages. Any ideas on how to change them all in a time-saving way?

Thank you!

Regards,
RG.

[-- Attachment #1.1.2: 0xAE6EF3046D6F7B57.asc --]
[-- Type: application/pgp-keys, Size: 2877 bytes --]

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [FONTS]: Media Type Specification Changed.
  2020-05-10 14:41 [FONTS]: Media Type Specification Changed Raghav Gururajan
@ 2020-05-10 15:55 ` Tobias Geerinckx-Rice
  2020-05-10 16:13   ` Raghav Gururajan
  0 siblings, 1 reply; 7+ messages in thread
From: Tobias Geerinckx-Rice @ 2020-05-10 15:55 UTC (permalink / raw)
  To: Raghav Gururajan; +Cc: guix-devel

[-- Attachment #1: Type: text/plain, Size: 1645 bytes --]

Raghav,

Raghav Gururajan 写道:
> Hello Guix!

o/

I haz returned.

> As of 2017, IANA (www.iana.org) has changed the standard 
> template for
> font media types.
>

Not so much changed, but that there was previously no standard. 
The W3C was displeased with the proliferation of ad-hoc, 
inconsistent font MIME types and created [SOURCE].

> So, font/freetype and font/opentype has to be updated to 
> font/ttf and
> font/otf, respectively.

For people who deal with MIMEs, yes, but how does this affect a 
package manager like Guix?  We don't.

> Almost all font packages in guix, are using the old 
> specification.

Where?

> I have updated font-gnu-freefont a while ago. We need to update 
> other
> packages. Any ideas on how to change them all in a time-saving 
> way?

Are you talking about 5483a2d0a913fe533744699e9ef5757c6e3f6983?

Aside... I know others have mentioned this before, and this is 
another example of a commit that should have been split.  It 
silently moves the TTF fonts from /share/fonts/truetype to 
/share/fonts/ttf for reasons that aren't explained anywhere and 
aren't related to the stated goal.

Was this RFC the reason?  If so you're confusing two unrelated 
things.

  $ ls ~/.guix-profile/share/fonts
  cantarell/  opentype/  truetype/

(Seeing this I might change cantarell to use ‘opentype’, or not, 
because it's purely a matter of taste.)

These directory names are for humans.  I think ‘truetype’ was 
better than ‘ttf’.

Kind regards,

T G-R

> [SOURCE]: 
> https://www.iana.org/assignments/media-types/media-types.xhtml#font

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 227 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [FONTS]: Media Type Specification Changed.
  2020-05-10 15:55 ` Tobias Geerinckx-Rice
@ 2020-05-10 16:13   ` Raghav Gururajan
  2020-05-10 18:09     ` Tobias Geerinckx-Rice
  0 siblings, 1 reply; 7+ messages in thread
From: Raghav Gururajan @ 2020-05-10 16:13 UTC (permalink / raw)
  To: Tobias Geerinckx-Rice; +Cc: guix-devel


[-- Attachment #1.1.1: Type: text/plain, Size: 1825 bytes --]

Hey Tobias!

>> Hello Guix!
> 
> o/
> 
> I haz returned.

Nice! I was wondering what happend to you. ;-)

>> As of 2017, IANA (www.iana.org) has changed the standard template for
>> font media types.
>>
> 
> Not so much changed, but that there was previously no standard. The W3C
> was displeased with the proliferation of ad-hoc, inconsistent font MIME
> types and created [SOURCE].
> 
>> So, font/freetype and font/opentype has to be updated to font/ttf and
>> font/otf, respectively.
> 
> For people who deal with MIMEs, yes, but how does this affect a package
> manager like Guix?  We don't.

Never mind, I was researching in the mean time and was about send
another email to ignore my email.

>> Almost all font packages in guix, are using the old specification.
> 
> Where?
> 
>> I have updated font-gnu-freefont a while ago. We need to update other
>> packages. Any ideas on how to change them all in a time-saving way?
> 
> Are you talking about 5483a2d0a913fe533744699e9ef5757c6e3f6983?
> 
> Aside... I know others have mentioned this before, and this is another
> example of a commit that should have been split.  It silently moves the
> TTF fonts from /share/fonts/truetype to /share/fonts/ttf for reasons
> that aren't explained anywhere and aren't related to the stated goal.
> 
> Was this RFC the reason?  If so you're confusing two unrelated things.

No, my goal was to enable other types. I happened to update it like that
and assumed I did it correctly when I came across this MIME thing. But
anyway, before merging I well-tested the patch. It does not affect
anything. What ever is next to /share/fonts/ like /share/fonts/foobar,
font-config finds it correctly. So all good i'd say. :-). Also, I hope
the used acronyms are not confusing.

Regards,
RG.

[-- Attachment #1.1.2: 0xAE6EF3046D6F7B57.asc --]
[-- Type: application/pgp-keys, Size: 2877 bytes --]

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [FONTS]: Media Type Specification Changed.
  2020-05-10 16:13   ` Raghav Gururajan
@ 2020-05-10 18:09     ` Tobias Geerinckx-Rice
  2020-05-11  4:11       ` Raghav Gururajan
  0 siblings, 1 reply; 7+ messages in thread
From: Tobias Geerinckx-Rice @ 2020-05-10 18:09 UTC (permalink / raw)
  To: Raghav Gururajan; +Cc: guix-devel

[-- Attachment #1: Type: text/plain, Size: 1332 bytes --]

Raghav,

Raghav Gururajan 写道:
> Nice! I was wondering what happend to you. ;-)

The bad things.  All of them.  In order.

> No, my goal was to enable other types. I happened to update it 
> like that
> and assumed I did it correctly when I came across this MIME 
> thing.

You did fine, only renaming ‘truetype’ -> ‘ttf’ should have been 
separate.  If it had been, I don't think it would have been 
merged.  Also omitting it from the change log feels... sneaky, 
while I'm sure that wasn't your intention.

Writing commits (*including* the diff) firstly for humans is 
important!  Even if it feels tedious and you really really want to 
git commit -a.

Anyway: since ‘share/fonts/ttf’ makes font-gnu-freefont 
inconsistent with our other fonts[0] for little reason I'd like to 
revert it back to ‘truetype’ & change ‘share/fonts/otf’ to 
‘opentype’ as well.  What do you think?

(Not sure what to do with ‘woff’ so I won't touch it.)

> But anyway, before merging I well-tested the patch. It does not 
> affect
> anything.

I know :-)  Fontconfig doesn't care about the subdirectory names, 
it just scans them all.  The names are for humans.  All the more 
reason not to abbreviate them IMO.

Kind regards,

T G-R

[0]: At least the ones I have installed.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 227 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [FONTS]: Media Type Specification Changed.
  2020-05-10 18:09     ` Tobias Geerinckx-Rice
@ 2020-05-11  4:11       ` Raghav Gururajan
  2020-05-13 16:13         ` Tobias Geerinckx-Rice
  0 siblings, 1 reply; 7+ messages in thread
From: Raghav Gururajan @ 2020-05-11  4:11 UTC (permalink / raw)
  To: Tobias Geerinckx-Rice; +Cc: guix-devel


[-- Attachment #1.1.1: Type: text/plain, Size: 1472 bytes --]

Hi Tobias!

> The bad things.  All of them.  In order.

Oh! How are you doing now? Let me know if you need anything. I can try
and help in any way plausible. :-)

> You did fine, only renaming ‘truetype’ -> ‘ttf’ should have been
> separate.  If it had been, I don't think it would have been merged.

That change has been discussed during review and was only merged after I
gave the fact of about fontconfig. :-)
 
> Also omitting it from the change log feels... sneaky, while I'm sure
> that wasn't your intention.

I understand. I should have mentioned in the log. But it was not sneaky.
As mentioned above, it was discussed during review. ;-)

But yeah, I should add that to my workflow of making comments/logs.

> Anyway: since ‘share/fonts/ttf’ makes font-gnu-freefont inconsistent
> with our other fonts[0] for little reason I'd like to revert it back to
> ‘truetype’ & change ‘share/fonts/otf’ to ‘opentype’ as well.  What do
> you think?
> 
> (Not sure what to do with ‘woff’ so I won't touch it.)

Agreed! I do not like inconsistencies either. Please find the patch
attached with this email.

>> But anyway, before merging I well-tested the patch. It does not affect
>> anything.
> 
> I know :-)  Fontconfig doesn't care about the subdirectory names, it
> just scans them all.  The names are for humans.  All the more reason not
> to abbreviate them IMO.

Makes sense.

Regards,
RG.


[-- Attachment #1.1.2: 0001-gnu-font-gnu-freefont-Correct-fonts-sub-directory-na.patch --]
[-- Type: text/x-patch, Size: 1788 bytes --]

From 6f709f5dcdb452df365a2f6927c761fc386c0b0e Mon Sep 17 00:00:00 2001
From: Raghav Gururajan <raghavgururajan@disroot.org>
Date: Sun, 10 May 2020 23:57:23 -0400
Subject: [PATCH] gnu: font-gnu-freefont: Correct fonts' sub-directory names.

* gnu/packages/fonts.scm (font-gnu-freefont): Fix /share/fonts/*.
[arguments]<#:phases>: Change sub-dir strings from ttf, otf and woff;
to truetype, opentype and webopen; respectively.
---
 gnu/packages/fonts.scm | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/gnu/packages/fonts.scm b/gnu/packages/fonts.scm
index 6e9b080299..8924c377c6 100644
--- a/gnu/packages/fonts.scm
+++ b/gnu/packages/fonts.scm
@@ -255,11 +255,11 @@ The Lato 2.010 family supports more than 100 Latin-based languages, over
                      (let ((doc-dir  (string-append %output "/share/doc/"
                                                     ,name "-" ,version))
                            (ttf-font-dir (string-append %output
-                                                        "/share/fonts/ttf"))
+                                                        "/share/fonts/truetype"))
                            (otf-font-dir (string-append %output
-                                                        "/share/fonts/otf"))
+                                                        "/share/fonts/opentype"))
                            (woff-font-dir (string-append %output
-                                                         "/share/fonts/woff")))
+                                                         "/share/fonts/webopen")))
                        (mkdir-p doc-dir)
                        (substitute* "Makefile"
                          (("\\$\\(TMPDIR\\)") doc-dir)
-- 
2.26.2


[-- Attachment #1.1.3: 0xAE6EF3046D6F7B57.asc --]
[-- Type: application/pgp-keys, Size: 2877 bytes --]

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply related	[flat|nested] 7+ messages in thread

* Re: [FONTS]: Media Type Specification Changed.
  2020-05-11  4:11       ` Raghav Gururajan
@ 2020-05-13 16:13         ` Tobias Geerinckx-Rice
  2020-05-13 19:04           ` Raghav Gururajan
  0 siblings, 1 reply; 7+ messages in thread
From: Tobias Geerinckx-Rice @ 2020-05-13 16:13 UTC (permalink / raw)
  To: Raghav Gururajan; +Cc: guix-devel

[-- Attachment #1: Type: text/plain, Size: 1187 bytes --]

Raghav,

Raghav Gururajan 写道:
> Oh! How are you doing now? Let me know if you need anything. I 
> can try
> and help in any way plausible. :-)

Thanks!  I'm better than I've been, don't worry.

> That change has been discussed during review and was only merged 
> after I
> gave the fact of about fontconfig. :-)

All right!

> I understand. I should have mentioned in the log. But it was not 
> sneaky.

I tried to be very clear that I didn't actually think so.  Sorry 
if I failed.

> But yeah, I should add that to my workflow of making 
> comments/logs.

Sweet.

> Agreed! I do not like inconsistencies either. Please find the 
> patch
> attached with this email.

LGTM, apart from one nitpick.

Both /share/fonts/{true,open}type are extremely common on other 
distributions, while /share/fonts/webopen would be unique to Guix. 
The de facto ’standard’ for (the much newer) WOFF seems to be, 
well, /share/fonts/woff.  So despite my previous comments about 
avoiding acronyms, I'll keep the latter.  We can always revisit 
this later.

Applied as 7d426c5b0e27cc3e72c6e12e07b8c42055cedba0.  Thanks!

Kind regards,

T G-R

[0]: 

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 227 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [FONTS]: Media Type Specification Changed.
  2020-05-13 16:13         ` Tobias Geerinckx-Rice
@ 2020-05-13 19:04           ` Raghav Gururajan
  0 siblings, 0 replies; 7+ messages in thread
From: Raghav Gururajan @ 2020-05-13 19:04 UTC (permalink / raw)
  To: Tobias Geerinckx-Rice; +Cc: guix-devel


[-- Attachment #1.1: Type: text/plain, Size: 769 bytes --]

Hi Tobias!

> Thanks!  I'm better than I've been, don't worry.
> 
>> That change has been discussed during review and was only merged after I
>> gave the fact of about fontconfig. :-)

I am glad.

> LGTM, apart from one nitpick.
> 
> Both /share/fonts/{true,open}type are extremely common on other
> distributions, while /share/fonts/webopen would be unique to Guix. The
> de facto ’standard’ for (the much newer) WOFF seems to be, well,
> /share/fonts/woff.  So despite my previous comments about avoiding
> acronyms, I'll keep the latter.  We can always revisit this later.
> 
> Applied as 7d426c5b0e27cc3e72c6e12e07b8c42055cedba0.  Thanks!

Thank you!

I was wondering if you could share your thoughts on #40708?

Regards,
RG.




[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2020-05-13 19:04 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-10 14:41 [FONTS]: Media Type Specification Changed Raghav Gururajan
2020-05-10 15:55 ` Tobias Geerinckx-Rice
2020-05-10 16:13   ` Raghav Gururajan
2020-05-10 18:09     ` Tobias Geerinckx-Rice
2020-05-11  4:11       ` Raghav Gururajan
2020-05-13 16:13         ` Tobias Geerinckx-Rice
2020-05-13 19:04           ` Raghav Gururajan

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).