Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 940255 - x11-terms/kitty - USE flag to avoid media-fonts/symbols-nerd-font?
Summary: x11-terms/kitty - USE flag to avoid media-fonts/symbols-nerd-font?
Status: RESOLVED CANTFIX
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Ionen Wolkens
URL: https://github.com/kovidgoyal/kitty/i...
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-09-26 08:01 UTC by squatted_posture785
Modified: 2024-09-26 21:29 UTC (History)
3 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description squatted_posture785 2024-09-26 08:01:05 UTC
Since 0.36.0, x11-terms/kitty depends on media-fonts/symbols-nerd-font. I'm aware this is to reflect upstream change:

From 0.36.0 changelog:
> Add NERD fonts builtin so that users don’t have to install them to use NERD symbols in kitty. The builtin font is used only if the symbols are not available in some system font

However, for users already using a patched font (like me), pulling media-fonts/symbols-nerd-font is unnecessary.

Any chance a USE flag (maybe "symbols" or "nerd-symbols"?) could be added so that one can avoid installing media-fonts/symbols-nerd-font?
Comment 1 Ionen Wolkens gentoo-dev 2024-09-26 20:41:09 UTC
Kitty's build system will abort if the font is not found and it specifically looks for "Symbols NERD Font Mono" and not other patched fonts, and there's no option to stop that as far as I can see.

e.g. if try to force it by ignoring the dependencies:
    $ emerge -C symbols-nerd-font
    $ emerge --nodeps kitty
    <snip>
    The font 'Symbols NERD Font Mono' was not found on your system, please install it
    * ERROR: x11-terms/kitty-0.36.3::gentoo failed (compile phase):

Error is from: https://github.com/kovidgoyal/kitty/blob/f8bdc3d86b/setup.py#L882

fwiw, from kitty's point of view, they're meant to "ship" with the bundled font rather than the system installing it, but it still need to be present on the system to build the kitty package (which we need to on Gentoo). What we do right now is just use the system's copy at both build and runtime (with a symlink).

Odds are kitty also uses this font specifically to extract glyphs disregarding what font you're using right now, and it wouldn't know which patched font to look for (it doesn't ask users to "use" a NERD font). So it's technically not unused even if you use one.

tl;dr don't think can do anything about this, I'd say that you could try asking upstream to make it optional but they already shot down one request for this: https://github.com/kovidgoyal/kitty/issues/7866 and don't think I want to modify the build system downstream more than we already do (like for optional X+wayland choice) esp. over a prebuilt ttf file.
Comment 2 squatted_posture785 2024-09-26 21:29:13 UTC
(In reply to Ionen Wolkens from comment #1)
> Kitty's build system will abort if the font is not found and it specifically
> looks for "Symbols NERD Font Mono" and not other patched fonts, and there's
> no option to stop that as far as I can see.
> 
> e.g. if try to force it by ignoring the dependencies:
>     $ emerge -C symbols-nerd-font
>     $ emerge --nodeps kitty
>     <snip>
>     The font 'Symbols NERD Font Mono' was not found on your system, please
> install it
>     * ERROR: x11-terms/kitty-0.36.3::gentoo failed (compile phase):
> 
> Error is from:
> https://github.com/kovidgoyal/kitty/blob/f8bdc3d86b/setup.py#L882
> 
> fwiw, from kitty's point of view, they're meant to "ship" with the bundled
> font rather than the system installing it, but it still need to be present
> on the system to build the kitty package (which we need to on Gentoo). What
> we do right now is just use the system's copy at both build and runtime
> (with a symlink).
> 
> Odds are kitty also uses this font specifically to extract glyphs
> disregarding what font you're using right now, and it wouldn't know which
> patched font to look for (it doesn't ask users to "use" a NERD font). So
> it's technically not unused even if you use one.
> 
> tl;dr don't think can do anything about this, I'd say that you could try
> asking upstream to make it optional but they already shot down one request
> for this: https://github.com/kovidgoyal/kitty/issues/7866 and don't think I
> want to modify the build system downstream more than we already do (like for
> optional X+wayland choice) esp. over a prebuilt ttf file.

Thank you for the detailed reply, much appreciated!