GNU bug report logs -
#70708
[PATCH] gnu: hyperrogue: correct font path
Previous Next
To reply to this bug, email your comments to 70708 AT debbugs.gnu.org.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
guix-patches <at> gnu.org
:
bug#70708
; Package
guix-patches
.
(Thu, 02 May 2024 04:41:02 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Tadhg McDonald-Jensen <tadhgmister <at> gmail.com>
:
New bug report received and forwarded. Copy sent to
guix-patches <at> gnu.org
.
(Thu, 02 May 2024 04:41:02 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
* gnu/packages/games.scm (hyperrogue):
correct font path to use font-dejavu package instead of
font in hyperrogue source code.
Change-Id: I12a108e3fc2375d9bacd1ab1d2ad4e15144b602f
---
gnu/packages/games.scm | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/gnu/packages/games.scm b/gnu/packages/games.scm
index 57e6c23f41..0ebe18c4be 100644
--- a/gnu/packages/games.scm
+++ b/gnu/packages/games.scm
@@ -6473,9 +6473,9 @@ (define-public hyperrogue
(replace 'configure
(lambda* (#:key inputs #:allow-other-keys)
(let ((share-dir (string-append #$output
"/share/hyperrogue/"))
- (fonts-dir (dirname
- (search-input-file inputs
-
"DejaVuSans-Bold.ttf"))))
+ (fonts-dir (string-append
+ (assoc-ref inputs "font-dejavu")
+ "/share/fonts/truetype")))
;; Set fonts and music path.
(substitute* "sysconfig.h"
(("(#define HYPERPATH ).*" _ lead)
base-commit: 4514239971895fc7ad47c7752e30d98a0c44a154
--
2.41.0
Information forwarded
to
guix-patches <at> gnu.org
:
bug#70708
; Package
guix-patches
.
(Thu, 20 Feb 2025 13:04:02 GMT)
Full text and
rfc822 format available.
Message #8 received at 70708 <at> debbugs.gnu.org (full text, mbox):
Hi Tadhg,
Your patch in #70708 embeds the font in hyperrogue to be font-dejavu [0]. Can you explain why this is necessary please? I'm not familiar with this game, but I just quickly ran it and the font appeared to be fine in the tutorial.
Thanks,
Steve / Futurile
[0] https://debbugs.gnu.org/cgi/bugreport.cgi?bug=70708
Message sent on
to
Tadhg McDonald-Jensen <tadhgmister <at> gmail.com>
:
bug#70708.
(Thu, 20 Feb 2025 13:04:05 GMT)
Full text and
rfc822 format available.
Message #12 received at 70708-quiet <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
The game source code includes a copy of the dejavusans.ttf
https://github.com/zenorogue/hyperrogue/blob/master/DejaVuSans.ttf
Since the source is considered the first input to the package the
function `search-input-file` finds it in the games source code and thus
the checkout of the code becomes a runtime dependency. This means that
the music and sounds folders which are copied to the package build must
be downloaded twice (one in checkout and one in built package) to use
the game.
If you run `guix graph hyperrogue --type=references -M 1 | grep
checkout` you will see the runtime dependency on the code checkout and
if you remove font-dejavu from the dependencies without my patch you
will see it still renders text fine in game. With my patch it correctly
uses the font from the dejavu package and no longer depends on the checkout.
If this is intended then at least we should remove the dependency on
font-dejavu since it is not used at all and reference the music and
sound from the checkout instead of copying it over and then also needing
the original.
On 2025-02-20 8:03 a.m., Steve George wrote:
> Hi Tadhg,
>
> Your patch in #70708 embeds the font in hyperrogue to be font-dejavu [0]. Can you explain why this is necessary please? I'm not familiar with this game, but I just quickly ran it and the font appeared to be fine in the tutorial.
>
> Thanks,
>
> Steve / Futurile
>
> [0] https://debbugs.gnu.org/cgi/bugreport.cgi?bug=70708
>
>
[OpenPGP_0x85C0C8DCBBF44EE7.asc (application/pgp-keys, attachment)]
[OpenPGP_signature.asc (application/pgp-signature, attachment)]
Message #13 received at 70708-quiet <at> debbugs.gnu.org (full text, mbox):
Hi,
Ah OK, I understand.
In that case would you be up for updating the patch to remove the font
files using a snippet please?
Thanks,
Steve / Futurile
On 20/02/2025 15:39, tadhgmister <at> gmail.com wrote:
> The game source code includes a copy of the dejavusans.ttf
> https://github.com/zenorogue/hyperrogue/blob/master/DejaVuSans.ttf
>
> Since the source is considered the first input to the package the
> function `search-input-file` finds it in the games source code and thus
> the checkout of the code becomes a runtime dependency. This means that
> the music and sounds folders which are copied to the package build must
> be downloaded twice (one in checkout and one in built package) to use
> the game.
>
> If you run `guix graph hyperrogue --type=references -M 1 | grep
> checkout` you will see the runtime dependency on the code checkout and
> if you remove font-dejavu from the dependencies without my patch you
> will see it still renders text fine in game. With my patch it correctly
> uses the font from the dejavu package and no longer depends on the checkout.
>
> If this is intended then at least we should remove the dependency on
> font-dejavu since it is not used at all and reference the music and
> sound from the checkout instead of copying it over and then also needing
> the original.
>
>
> On 2025-02-20 8:03 a.m., Steve George wrote:
>> Hi Tadhg,
>>
>> Your patch in #70708 embeds the font in hyperrogue to be font-dejavu [0]. Can you explain why this is necessary please? I'm not familiar with this game, but I just quickly ran it and the font appeared to be fine in the tutorial.
>>
>> Thanks,
>>
>> Steve / Futurile
>>
>> [0] https://debbugs.gnu.org/cgi/bugreport.cgi?bug=70708
>>
Message #14 received at 70708-quiet <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
Hi again,
If I just delete the font file the build fails since `search-input-file`
doesn't recursively check subfolders to find dejavu/share/fonts/truetype.
If we specify the folder of dejavu as I wrote in my patch then the file
in the source will be ignored and I do not understand the benefit of
also deleting it.
Is there a less hardcoded more general purpose way to identify the
folder with the font files? If so I can submit a modified patch to
delete the one from source and then detect the appropriate folder from
dejavu package but otherwise I feel like the patch I submitted is the
best solution.
Regards,
Tadhg
On 2025-02-20 2:36 p.m., Steve George wrote:
> Hi,
>
> Ah OK, I understand.
>
> In that case would you be up for updating the patch to remove the font
> files using a snippet please?
>
> Thanks,
>
> Steve / Futurile
>
> On 20/02/2025 15:39, tadhgmister <at> gmail.com wrote:
>> The game source code includes a copy of the dejavusans.ttf
>> https://github.com/zenorogue/hyperrogue/blob/master/DejaVuSans.ttf
>>
>> Since the source is considered the first input to the package the
>> function `search-input-file` finds it in the games source code and thus
>> the checkout of the code becomes a runtime dependency. This means that
>> the music and sounds folders which are copied to the package build must
>> be downloaded twice (one in checkout and one in built package) to use
>> the game.
>>
>> If you run `guix graph hyperrogue --type=references -M 1 | grep
>> checkout` you will see the runtime dependency on the code checkout and
>> if you remove font-dejavu from the dependencies without my patch you
>> will see it still renders text fine in game. With my patch it correctly
>> uses the font from the dejavu package and no longer depends on the checkout.
>>
>> If this is intended then at least we should remove the dependency on
>> font-dejavu since it is not used at all and reference the music and
>> sound from the checkout instead of copying it over and then also needing
>> the original.
>>
>>
>> On 2025-02-20 8:03 a.m., Steve George wrote:
>>> Hi Tadhg,
>>>
>>> Your patch in #70708 embeds the font in hyperrogue to be font-dejavu [0]. Can you explain why this is necessary please? I'm not familiar with this game, but I just quickly ran it and the font appeared to be fine in the tutorial.
>>>
>>> Thanks,
>>>
>>> Steve / Futurile
>>>
>>> [0] https://debbugs.gnu.org/cgi/bugreport.cgi?bug=70708
>>>
>
[OpenPGP_0x85C0C8DCBBF44EE7.asc (application/pgp-keys, attachment)]
[OpenPGP_signature.asc (application/pgp-signature, attachment)]
This bug report was last modified 14 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.