all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* [bug#51774] [PATCH] gnu: Add font-source-code-pro.
@ 2021-11-11 19:22 phodina via Guix-patches via
  2021-11-15 19:56 ` Liliana Marie Prikler
  2021-11-16 19:07 ` [bug#51774] [PATCH v2] gnu: font-adobe-source-code-pro: Update to 2.032R-ro-1.052R-it-1.012R-VAR phodina via Guix-patches via
  0 siblings, 2 replies; 7+ messages in thread
From: phodina via Guix-patches via @ 2021-11-11 19:22 UTC (permalink / raw)
  To: 51774

* gnu/packages/fonts.scm (font-source-code-pro): New variable.

diff --git a/gnu/packages/fonts.scm b/gnu/packages/fonts.scm
index 3f36a71bdd..9ac7e9e127 100644
--- a/gnu/packages/fonts.scm
+++ b/gnu/packages/fonts.scm
@@ -1470,6 +1470,26 @@ (define-public font-sarasa-gothic
      "Sarasa Gothic is a programming font based on Iosevka and Source Han Sans,
 most CJK characters are same height, and double width as ASCII characters.")))

+(define-public font-source-code-pro
+  (package
+    (name "font-source-code-pro")
+    (version "2.038")
+    (source (origin
+              (method git-fetch)
+              (uri (git-reference
+                    (url "https://github.com/adobe-fonts/source-code-pro")
+                    (commit (string-append version "R-ro/1.058R-it/1.018R-VAR"))))
+              (file-name (git-file-name name version))
+              (sha256
+               (base32
+                "00h4v3rmxyyaxni6nywacxvjnji2g2pi0b4js1yx0g67fvrv2gag"))))
+    (build-system font-build-system)
+    (synopsis "Font for coding environments")
+    (description "Font Source Code Pro is sedigned as a companion to Source
+Sans.")
+    (home-page "https://fonts.google.com/specimen/Source+Code+Pro")
+    (license license:silofl1.1)))
+
 (define-public font-space-grotesk
   (package
     (name "font-space-grotesk")
--
2.33.0




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

* [bug#51774] [PATCH] gnu: Add font-source-code-pro.
  2021-11-11 19:22 [bug#51774] [PATCH] gnu: Add font-source-code-pro phodina via Guix-patches via
@ 2021-11-15 19:56 ` Liliana Marie Prikler
  2021-11-15 22:12   ` phodina via Guix-patches via
  2021-11-16 19:07 ` [bug#51774] [PATCH v2] gnu: font-adobe-source-code-pro: Update to 2.032R-ro-1.052R-it-1.012R-VAR phodina via Guix-patches via
  1 sibling, 1 reply; 7+ messages in thread
From: Liliana Marie Prikler @ 2021-11-15 19:56 UTC (permalink / raw)
  To: phodina, 51774

Hi,

Am Donnerstag, den 11.11.2021, 19:22 +0000 schrieb phodina:
> * gnu/packages/fonts.scm (font-source-code-pro): New variable.
> 
> diff --git a/gnu/packages/fonts.scm b/gnu/packages/fonts.scm
> index 3f36a71bdd..9ac7e9e127 100644
> --- a/gnu/packages/fonts.scm
> +++ b/gnu/packages/fonts.scm
> @@ -1470,6 +1470,26 @@ (define-public font-sarasa-gothic
>       "Sarasa Gothic is a programming font based on Iosevka and
> Source Han Sans,
>  most CJK characters are same height, and double width as ASCII
> characters.")))
> 
> +(define-public font-source-code-pro
> +  (package
> +    (name "font-source-code-pro")
> +    (version "2.038")
> +    (source (origin
> +              (method git-fetch)
> +              (uri (git-reference
> +                    (url "
> https://github.com/adobe-fonts/source-code-pro")
> +                    (commit (string-append version "R-ro/1.058R-
> it/1.018R-VAR"))))
Am I allowed to ask WTF this versioning scheme is?  Should we just pin
a hash instead?
> +              (file-name (git-file-name name version))
> +              (sha256
> +               (base32
> +                "00h4v3rmxyyaxni6nywacxvjnji2g2pi0b4js1yx0g67fvrv2ga
> g"))))
> +    (build-system font-build-system)
> +    (synopsis "Font for coding environments")
> +    (description "Font Source Code Pro is sedigned as a companion to
> Source
> +Sans.")
This scrediption is not very scrediptive ;)  Jokes aside, I'd add "[It]
preserves the design features and vertical proportions of Source Sans,
but alters the glyph widths so that they are uniform across all glyphs
and weights." so that Adobe bois know what they're getting.
> +    (home-page "https://fonts.google.com/specimen/Source+Code+Pro")
I'm not sure whether linking to Google fonts of all places is good
praxis.  Might want to link to Github instead.  FWIW the repo
advertises this: https://adobe-fonts.github.io/source-code-pro/

Cheers





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

* [bug#51774] [PATCH] gnu: Add font-source-code-pro.
  2021-11-15 19:56 ` Liliana Marie Prikler
@ 2021-11-15 22:12   ` phodina via Guix-patches via
  0 siblings, 0 replies; 7+ messages in thread
From: phodina via Guix-patches via @ 2021-11-15 22:12 UTC (permalink / raw)
  To: Liliana Marie Prikler; +Cc: 51774

Hi Liliana,


> > https://github.com/adobe-fonts/source-code-pro")
> >
> > -                      (commit (string-append version "R-ro/1.058R-
> >
> >
> >
> > it/1.018R-VAR"))))
>
> Am I allowed to ask WTF this versioning scheme is? Should we just pin
>
> a hash instead?

Hilarious, right? I agree that a hash commit would be better suited here.

>
> > -                (file-name (git-file-name name version))
> >
> >
> > -                (sha256
> >
> >
> > -                 (base32
> >
> >
> > -                  "00h4v3rmxyyaxni6nywacxvjnji2g2pi0b4js1yx0g67fvrv2ga
> >
> >
> >
> > g"))))
> >
> > -   (build-system font-build-system)
> > -   (synopsis "Font for coding environments")
> > -   (description "Font Source Code Pro is sedigned as a companion to
> >
> >     Source
> >
> >     +Sans.")
>
> This scrediption is not very scrediptive ;) Jokes aside, I'd add "[It]
>
> preserves the design features and vertical proportions of Source Sans,
>
> but alters the glyph widths so that they are uniform across all glyphs
>
> and weights." so that Adobe bois know what they're getting.
>

Thanks for the tip!

> > -   (home-page "https://fonts.google.com/specimen/Source+Code+Pro")
>
> I'm not sure whether linking to Google fonts of all places is good
>
> praxis. Might want to link to Github instead. FWIW the repo
>
> advertises this: https://adobe-fonts.github.io/source-code-pro/
>
> Cheers

Sure, github might be more prefereble.

PS: Though at the end it comes to which is better: Google vs Microsoft ;-)




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

* [bug#51774] [PATCH v2] gnu: font-adobe-source-code-pro: Update to 2.032R-ro-1.052R-it-1.012R-VAR.
  2021-11-11 19:22 [bug#51774] [PATCH] gnu: Add font-source-code-pro phodina via Guix-patches via
  2021-11-15 19:56 ` Liliana Marie Prikler
@ 2021-11-16 19:07 ` phodina via Guix-patches via
  2021-11-16 20:29   ` Liliana Marie Prikler
  1 sibling, 1 reply; 7+ messages in thread
From: phodina via Guix-patches via @ 2021-11-16 19:07 UTC (permalink / raw)
  To: Liliana Marie Prikler; +Cc: 51774, jlicht@fsfe.org

Hi,

Jelle pointed out, that this font is already packaged as adobe-source-code-pro. Thanks, indeed it is.

Unfortunately since the version string changed (another backslash) the regexp now looks horrible. Maybe it would be better to define it with let to keep the code cleaner. What do you think?

Petr


* gnu/packages/fonts (font-adobe-source-code-pro): Update to
  2.032R-ro-1.052R-it-1.012R-VAR and update regexp in commit.

diff --git a/gnu/packages/fonts.scm b/gnu/packages/fonts.scm
index 3f36a71bdd..eddbeaba7e 100644
--- a/gnu/packages/fonts.scm
+++ b/gnu/packages/fonts.scm
@@ -975,19 +975,20 @@ (define-public font-hack
 (define-public font-adobe-source-code-pro
   (package
     (name "font-adobe-source-code-pro")
-    (version "2.030R-ro-1.050R-it")
+    (version "2.032R-ro-1.052R-it-1.012R-VAR")
     (source
      (origin
        (method git-fetch)
        (uri (git-reference
              (url "https://github.com/adobe-fonts/source-code-pro")
-             (commit (regexp-substitute/global
-                      ;; The upstream tag uses "/" between the roman and italic
-                      ;; versions, so substitute our "-" separator here.
-                      #f "R-ro-" version 'pre "R-ro/" 'post))))
+             (commit (regexp-substitute/global #f "it-" (regexp-substitute/global
+                                                         ;; The upstream tag uses "/" between the roman and italic
+                                                         ;; versions, so substitute our "-" separator here.
+                                                         #f "R-ro-" version 'pre "R-ro/" 'post) 'pre "it/"
+                                                         'post))))
        (file-name (git-file-name name version))
        (sha256
-        (base32 "0hc5kflr8xzqgdm0c3gbgb1paygznxmnivkylid69ipc7wnicx1n"))))
+        (base32 "1lqchm8z0ah5y675ycmciqvr8y1v1gcj22ysfs443gm291vy0z4v"))))
     (build-system font-build-system)
     (home-page "https://github.com/adobe-fonts/source-code-pro")
     (synopsis
--
2.33.0




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

* [bug#51774] [PATCH v2] gnu: font-adobe-source-code-pro: Update to 2.032R-ro-1.052R-it-1.012R-VAR.
  2021-11-16 19:07 ` [bug#51774] [PATCH v2] gnu: font-adobe-source-code-pro: Update to 2.032R-ro-1.052R-it-1.012R-VAR phodina via Guix-patches via
@ 2021-11-16 20:29   ` Liliana Marie Prikler
  2021-11-17 12:25     ` phodina via Guix-patches via
  0 siblings, 1 reply; 7+ messages in thread
From: Liliana Marie Prikler @ 2021-11-16 20:29 UTC (permalink / raw)
  To: phodina; +Cc: 51774, jlicht@fsfe.org

Hi,

Am Dienstag, den 16.11.2021, 19:07 +0000 schrieb phodina:
> Hi,
> 
> Jelle pointed out, that this font is already packaged as adobe-
> source-code-pro. Thanks, indeed it is.
> 
> Unfortunately since the version string changed (another backslash)
> the regexp now looks horrible. Maybe it would be better to define it
> with let to keep the code cleaner. What do you think?
In principle both are fine solutions to me, but the implementation
matters.  Perhaps someone else has another reason why to use one or the
other, but that's it for me.  As for the implementation here, see
below.

> * gnu/packages/fonts (font-adobe-source-code-pro): Update to
>   2.032R-ro-1.052R-it-1.012R-VAR and update regexp in commit.
Normally, you'd insert two dashes here and comments after that.  These 
lines don't appear in the commit log or the diff.

> diff --git a/gnu/packages/fonts.scm b/gnu/packages/fonts.scm
> index 3f36a71bdd..eddbeaba7e 100644
> --- a/gnu/packages/fonts.scm
> +++ b/gnu/packages/fonts.scm
> @@ -975,19 +975,20 @@ (define-public font-hack
>  (define-public font-adobe-source-code-pro
>    (package
>      (name "font-adobe-source-code-pro")
> -    (version "2.030R-ro-1.050R-it")
> +    (version "2.032R-ro-1.052R-it-1.012R-VAR")
>      (source
>       (origin
>         (method git-fetch)
>         (uri (git-reference
>               (url "https://github.com/adobe-fonts/source-code-pro")
> -             (commit (regexp-substitute/global
> -                      ;; The upstream tag uses "/" between the roman
> and italic
> -                      ;; versions, so substitute our "-" separator
> here.
> -                      #f "R-ro-" version 'pre "R-ro/" 'post))))
> +             (commit (regexp-substitute/global #f "it-" (regexp-
> substitute/global
> +                                                         ;; The
> upstream tag uses "/" between the roman and italic
> +                                                         ;;
> versions, so substitute our "-" separator here.
> +                                                         #f "R-ro-"
> version 'pre "R-ro/" 'post) 'pre "it/"
> +                                                         'post))))
This regexp could be simplified by noticing that it's always
<VERSION>R-<TAG>/<VERSION>R-<TAG>/<VERSION>R-<TAG>, whereas we use
<VERSION>R-<TAG>-<VERSION>R-<TAG>-<VERSION>R-<TAG>.  So simply use a
regexp that matches <VERSION>R-<TAG>- and then replace just the dash
with a slash.  That being said, I'm not sure how much cleaner this is
compared to let-binding

Cheers.





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

* [bug#51774] [PATCH v2] gnu: font-adobe-source-code-pro: Update to 2.032R-ro-1.052R-it-1.012R-VAR.
  2021-11-16 20:29   ` Liliana Marie Prikler
@ 2021-11-17 12:25     ` phodina via Guix-patches via
  2021-11-17 17:17       ` bug#51774: " Liliana Marie Prikler
  0 siblings, 1 reply; 7+ messages in thread
From: phodina via Guix-patches via @ 2021-11-17 12:25 UTC (permalink / raw)
  To: Liliana Marie Prikler; +Cc: 51774, jlicht@fsfe.org

Hi Liliana,

> This regexp could be simplified by noticing that it's always
>
> <VERSION>R-<TAG>/<VERSION>R-<TAG>/<VERSION>R-<TAG>, whereas we use
>
> <VERSION>R-<TAG>-<VERSION>R-<TAG>-<VERSION>R-<TAG>. So simply use a
>
> regexp that matches <VERSION>R-<TAG>- and then replace just the dash
>
> with a slash. That being said, I'm not sure how much cleaner this is
>
> compared to let-binding
>
> Cheers.

Thanks. I saw the pattern just I have issue writing down the regexp in Guile. Now you made me learn them properly :-D


* gnu/packages/fonts (font-adobe-source-code-pro): Update to
  2.032R-ro-1.052R-it-1.012R-VAR and update regexp in commit.

diff --git a/gnu/packages/fonts.scm b/gnu/packages/fonts.scm
index 3f36a71bdd..c3ad57f203 100644
--- a/gnu/packages/fonts.scm
+++ b/gnu/packages/fonts.scm
@@ -975,7 +975,7 @@ (define-public font-hack
 (define-public font-adobe-source-code-pro
   (package
     (name "font-adobe-source-code-pro")
-    (version "2.030R-ro-1.050R-it")
+    (version "2.032R-ro-1.052R-it-1.012R-VAR")
     (source
      (origin
        (method git-fetch)
@@ -984,10 +984,12 @@ (define-public font-adobe-source-code-pro
              (commit (regexp-substitute/global
                       ;; The upstream tag uses "/" between the roman and italic
                       ;; versions, so substitute our "-" separator here.
-                      #f "R-ro-" version 'pre "R-ro/" 'post))))
+                      #f "((R-ro)|(R-it))(-)" version
+                      'pre 1 "/" 'post
+                      ))))
        (file-name (git-file-name name version))
        (sha256
-        (base32 "0hc5kflr8xzqgdm0c3gbgb1paygznxmnivkylid69ipc7wnicx1n"))))
+        (base32 "1lqchm8z0ah5y675ycmciqvr8y1v1gcj22ysfs443gm291vy0z4v"))))
     (build-system font-build-system)
     (home-page "https://github.com/adobe-fonts/source-code-pro")
     (synopsis
--
2.33.0




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

* bug#51774: [PATCH v2] gnu: font-adobe-source-code-pro: Update to 2.032R-ro-1.052R-it-1.012R-VAR.
  2021-11-17 12:25     ` phodina via Guix-patches via
@ 2021-11-17 17:17       ` Liliana Marie Prikler
  0 siblings, 0 replies; 7+ messages in thread
From: Liliana Marie Prikler @ 2021-11-17 17:17 UTC (permalink / raw)
  To: phodina; +Cc: jlicht@fsfe.org, 51774-done

Hi,

Am Mittwoch, den 17.11.2021, 12:25 +0000 schrieb phodina:
> Hi Liliana,
> 
> > This regexp could be simplified by noticing that it's always
> > 
> > <VERSION>R-<TAG>/<VERSION>R-<TAG>/<VERSION>R-<TAG>, whereas we use
> > 
> > <VERSION>R-<TAG>-<VERSION>R-<TAG>-<VERSION>R-<TAG>. So simply use a
> > 
> > regexp that matches <VERSION>R-<TAG>- and then replace just the
> > dash
> > 
> > with a slash. That being said, I'm not sure how much cleaner this
> > is
> > 
> > compared to let-binding
> > 
> > Cheers.
> 
> Thanks. I saw the pattern just I have issue writing down the regexp
> in Guile. Now you made me learn them properly :-D
> 
> 
> * gnu/packages/fonts (font-adobe-source-code-pro): Update to
>   2.032R-ro-1.052R-it-1.012R-VAR and update regexp in commit.
--
Please really really really insert comments that shouldn't turn up in
the commit log here.  It makes it way easier if we don't have to strip
them.

Pushed with some slight adjustments to the ChangeLog and aforementioned
stripping.

Cheers





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

end of thread, other threads:[~2021-11-17 17:22 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-11-11 19:22 [bug#51774] [PATCH] gnu: Add font-source-code-pro phodina via Guix-patches via
2021-11-15 19:56 ` Liliana Marie Prikler
2021-11-15 22:12   ` phodina via Guix-patches via
2021-11-16 19:07 ` [bug#51774] [PATCH v2] gnu: font-adobe-source-code-pro: Update to 2.032R-ro-1.052R-it-1.012R-VAR phodina via Guix-patches via
2021-11-16 20:29   ` Liliana Marie Prikler
2021-11-17 12:25     ` phodina via Guix-patches via
2021-11-17 17:17       ` bug#51774: " Liliana Marie Prikler

Code repositories for project(s) associated with this external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.