Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 769263 - media-fonts/iosevka: build from source to allow different styles to be installed
Summary: media-fonts/iosevka: build from source to allow different styles to be installed
Status: CONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal with 1 vote (vote)
Assignee: Arsen Arsenović
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-02-07 07:47 UTC by Joonas Niilola
Modified: 2023-05-07 21:30 UTC (History)
4 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 Joonas Niilola gentoo-dev 2021-02-07 07:47:46 UTC
The release we use doesn't contain all available styles to iosevka, but downloading ALL styles is worth ~1,1 GB tarball. So I suggest to rework iosevka package so it downloads the source, and then builds the fonts based on USE flags, adding different styles requested by user. With -* it'd build the minimal core, that is installed currently by iosevka.

Apparently to build iosevka fonts from source, two extra packages are required: 
ttfautohint and otfcc. A user also suggested 'savedconfig' USE flag to be added, which may easen up src_configure a bit, but I wouldn't implement it at least just yet.
https://github.com/gentoo/gentoo/pull/15505
Comment 1 Sorrow 2021-09-11 02:56:50 UTC
I'm looking into this. Is there a way to install npm packages for build without disabling network-sandbox?
Comment 2 Joonas Niilola gentoo-dev 2021-09-11 05:12:36 UTC
(In reply to Eternal Sorrow from comment #1)
> I'm looking into this. Is there a way to install npm packages for build
> without disabling network-sandbox?

You can fetch the nodes, package tarball on your own, and put that to SRC_URI.

Although didn't upstream kind of fix this bug already?
Comment 3 Arsen Arsenović gentoo-dev 2023-05-06 17:14:27 UTC
are the current variants provided by the reworked ebuild sufficient to consider this bug resolved?

declare -A MY_FONT_VARIANTS=(
	["iosevka"]="Iosevka"
	["iosevka-slab"]="Iosevka Slab"
	["iosevka-curly"]="Iosevka Curly"
	["iosevka-curly-slab"]="Iosevka Curly Slab"
	["iosevka-ss01"]="Iosevka SS01"
	["iosevka-ss02"]="Iosevka SS02"
	["iosevka-ss03"]="Iosevka SS03"
	["iosevka-ss04"]="Iosevka SS04"
	["iosevka-ss05"]="Iosevka SS05"
	["iosevka-ss06"]="Iosevka SS06"
	["iosevka-ss07"]="Iosevka SS07"
	["iosevka-ss08"]="Iosevka SS08"
	["iosevka-ss09"]="Iosevka SS09"
	["iosevka-ss10"]="Iosevka SS10"
	["iosevka-ss11"]="Iosevka SS11"
	["iosevka-ss12"]="Iosevka SS12"
	["iosevka-ss13"]="Iosevka SS13"
	["iosevka-ss14"]="Iosevka SS14"
	["iosevka-ss15"]="Iosevka SS15"
	["iosevka-ss16"]="Iosevka SS16"
	["iosevka-ss17"]="Iosevka SS17"
	["iosevka-ss18"]="Iosevka SS18"
	["iosevka-aile"]="Iosevka Aile"
	["iosevka-etoile"]="Iosevka Etoile"
)
Comment 4 Sorrow 2023-05-06 19:05:45 UTC
No, even remotely not. The number of possible combinations if you build the font manually is much higher than these predefined variants.
Comment 5 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2023-05-07 11:46:21 UTC
(In reply to Sorrow from comment #4)
> No, even remotely not. The number of possible combinations if you build the
> font manually is much higher than these predefined variants.

I don't think he meant mathematically. He was asking if the list currently installed, or perhaps a few more (list them) would be enough to make people happy.
Comment 6 Sorrow 2023-05-07 12:06:24 UTC
I also did not mean mathematically. I meant that none of the font variants in this list have all the options I would prefer. So having an ability to customize how the font looks would be better for me.
Comment 7 Sorrow 2023-05-07 12:07:15 UTC
Can't speak for "people" though.
Comment 8 Arsen Arsenović gentoo-dev 2023-05-07 15:25:56 UTC
(In reply to Sorrow from comment #6)
> I also did not mean mathematically. I meant that none of the font variants
> in this list have all the options I would prefer. So having an ability to
> customize how the font looks would be better for me.

the number of possible products from the iosevka build system is indeed extremely high (i gave up on counting the magnitude of that number)

the above list is an exhaustive list of the 'factory' provided superttc variants.

savedconfig could definitely work.

the external build dependencies don't worry me much, however, nodejs does.

do we need some dist tarball with js deps vendored in to build fonts or such?  i don't see any such asset attached to current releases.

i presume you have experience building iosevka - does it only need the node deps and ttfautohint?

thanks in advance
Comment 9 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2023-05-07 15:30:37 UTC
(In reply to Sorrow from comment #6)
> I also did not mean mathematically. I meant that none of the font variants
> in this list have all the options I would prefer. So having an ability to
> customize how the font looks would be better for me.

... so, to be clear, could you list the variansts you'd like? That's what we're interested in?
Comment 10 Arsen Arsenović gentoo-dev 2023-05-07 15:43:17 UTC
(In reply to Sam James from comment #9)
> (In reply to Sorrow from comment #6)
> > I also did not mean mathematically. I meant that none of the font variants
> > in this list have all the options I would prefer. So having an ability to
> > customize how the font looks would be better for me.
> 
> ... so, to be clear, could you list the variansts you'd like? That's what
> we're interested in?
that works today but you can also make custom remixes of the font, see https://typeof.net/Iosevka/specimen
Comment 11 Andreas Proteus 2023-05-07 18:24:59 UTC
(In reply to Arsen Arsenović from comment #3)
> are the current variants provided by the reworked ebuild sufficient to
> consider this bug resolved?

This ebuild now installs 24 ttc font collections each containing 162 fonts except Aile and Etoile that contain only 27 variants.  A total of 3618 font variants.  I think this bug is resolved.  Thank you.
Comment 12 Sorrow 2023-05-07 21:30:14 UTC
>i presume you have experience building iosevka - does it only need the node deps and ttfautohint?

ttfautohint, otfcc and node. But I built it very long time ago and don't remember the details. You'll need to download the list of npm packages and vendor them manually for node build system.

>... so, to be clear, could you list the variansts you'd like? That's what we're interested in?

I built Iosevka manually a long time ago and I already lost the config that I used then. So, to do that, I need to spend quite a lot time reading the config and fiddling the Iosevka specimen to find the variant that I like. I would prefer to do that when I will have the ability to build the font.