unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
From: Liliana Marie Prikler <liliana.prikler@gmail.com>
To: phodina <phodina@protonmail.com>
Cc: 51774@debbugs.gnu.org, "jlicht@fsfe.org" <jlicht@fsfe.org>
Subject: [bug#51774] [PATCH v2] gnu: font-adobe-source-code-pro: Update to 2.032R-ro-1.052R-it-1.012R-VAR.
Date: Tue, 16 Nov 2021 21:29:49 +0100	[thread overview]
Message-ID: <eaa8df516b60d38578d0ce9b95c3ac0b297eb189.camel@gmail.com> (raw)
In-Reply-To: <70rnBf4hiAtWtLXEZPbo9WBALUmUha4qT-xxVwBX-Z-TnfVEp5b6M-3cZ9H-oIg-VXpfqgP_4lSCX1Vzgy3IAFcYplL6gMeXI3L1gu_cNlI=@protonmail.com>

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.





  reply	other threads:[~2021-11-16 20:30 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
2021-11-17 12:25     ` phodina via Guix-patches via
2021-11-17 17:17       ` bug#51774: " Liliana Marie Prikler

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=eaa8df516b60d38578d0ce9b95c3ac0b297eb189.camel@gmail.com \
    --to=liliana.prikler@gmail.com \
    --cc=51774@debbugs.gnu.org \
    --cc=jlicht@fsfe.org \
    --cc=phodina@protonmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).