Re: [RFC]refactor Noto CJK fonts packaging

Takashi Iwai <[email protected]> Thu, 27 Apr 2017 10:51:27 +0200
Newsgroups gmane.linux.suse.m17n
Message-ID <[email protected]>
On Wed, 26 Apr 2017 17:25:35 +0200,
Marguerite Su wrote:
> 
> Hi, ftake
> 
> On Wed, Apr 26, 2017 at 10:18 PM, Fuminobu TAKEYAMA <[email protected]> wrote:
> > 1. Package naming
> > - According to font package naming rule, the prefix is not "-font" but
> > "-fonts"
> 
> But it's *really* just one font name with one weight. there's no 's' case in it.
> 
> I didn't make the 'noto-sans-sc-fonts' wrong...

Well, *-fonts is the standard suffix, so let's keep *-fonts suffix
consistently.  This will make it easier to filter / search packages.


> > - "noto-sans-*-mono-fonts" should be "noto-sans-mono-cjk-*" from the naming
> > rule?
> 
> why? because it's stripped from the language specific tarballs and
> contains all CJK support?
> 
> the old name was 'noto-sans-mono-cjksc-fonts' (but I think it should
> be 'noto-mono-cjksc-fonts')
> 
> but since I decided to use region specific variants, the 'cjksc' is no
> longer a proper name
> although it *correctly* reflects the fact that these monospace fonts
> cover all CJK locales.
> 
> anyway this is open to discuss because they're not installed by default.
> 
> they'll be dragged in only if the end users install
> 'noto-sans-sc-fonts' themselves.

The package name is always a matter of taste, so there is no strict
rule, and I don't argue strongly to both.  But, in general, the
package name is generated from either the original font name or the
file name.  In this case, it's "Noto Sans Mono CJKxx XXX" or
NotoSansMonoCJKxx-XXX.otf, so noto-sans-mono-*-fonts looks fitting
well, indeed.

Of course, this name brings too much confusion, we should rethink a
better alternative name.


> > - I am wondering if the prefix "-mini" is appropriate for our case.
> >   It is used, for example, in "systemd-mini", as an minimal *alternative* of
> > the package
> >   without "-mini".
> 
> Ha, yes, noto-sans-sc-fonts contains all weights and
> noto-sans-sc-fonts-mini contains
> regular and bold weights. the later is a minimal alternative of the former.
> 
> the later and those two weights can be put into the DVD, leaving everything else
> in the remote repository.
> 
> > 2. Meta packages
> > - I am not sure "noto-sans-cjk-*-fonts-mini" meta packages are really
> > necessary.
> > - We need noto-sans-cjk-fonts package, which "Requires" all those fonts for
> > upgrading
> >   (even though this requires much disk space)
> 
> I stripped the packages just to make sure every locale has it's own
> meta package.
> 
> There's no space for another mega package (or it can exist but not
> exist in DVD so
> that a default localized installation will not install all other fonts
> for other languages)
> 
> BTW now I can be sure that if you install noto-sans-jp-fonts-mini, the
> old noto-sans-cjk-fonts
> will be uninstalled. But I didn't find a way to update
> noto-sans-cjk-fonts and install noto-sans-jp-fonts-mini
> automatically accordingly. I wonder can it be called 'smooth update'?
> 
> PS: I think I should also make the noto-sans-jp-fonts-mini conflicts
> with noto-sans-jp-fonts
> because they both have regular and bold weights. the later should
> provide the former.

I've considered about this for a while.  From the functional POV, we
should install all (split) noto-sans-cjk* fonts by migration from the
old single noto-san-cjk-fonts.rpm.  But it'll bloat as the result.

Another option is to install the minimal cjk noto-san-* packages
(regular and bold) by upgrading noto-sans-cjk-fonts.rpm.  We keep
noto-sans-cjk-fonts.rpm but it becomes a meta package requiring only
regular and bold CJK fonts.
For users who really need the full fontset, we may provide another
meta package, e.g. noto-san-cjk-full-fonts or such that drags the all
relevant fonts in addition to the mini noto-san-cjk-fonts, but they'll
need to install manually.

DVD may contain noto-sans-cjk-fonts.rpm, and it'll bring the minimally
needed font sets.


> > - The meta packages does not need "%reconfigure_fonts_prereq"
> 
> Sure.
> 
> > I will try to hack fonts-config on vacation next week.
> 
> I've been working on it here in my fork:
> https://github.com/marguerite/fonts-config
> 
> 1. I modified the 'serif' to use 'Noto Serif SC' instead of 'AR PL
> UMing' by default
> 
> 2. I left the 'Noto Sans CJK SC' there in 59-*.conf
> 
> But since we will not use Super OTC or Language Specific variants any more,
> these font names will be non-existent actually.

I thought the font (family) names don't change after split?
If so, the workaround is still needed when multiple CJK fonts are
installed, I'm afraid.


> So I prepend/append the 'Noto Sans SC' stuff in 32-google-noto-cjk.conf to fake
> a font (although I don't know if my fontconfig grammar is correct, please help).
> 
> I didn't use 'alias' because in certain cases users may make those namespaces
> available by installing those variant themselves.
> 
> The same policy should be applied to serif too.
> 
> 3. I have a TODO in my fork, you can check that. it's the goal we need to do:
> 
> 3.1 *colored* emoji support out of the box (50-emoji.conf and a cairo patch)
> 
> https://github.com/googlei18n/noto-emoji/issues/36
> 
> 3.2 modern symbol font (what's the difference between emoji font and
> symbol font? are they the same?)

Conceptually yes.  The difference is how they were invented and
introduced to unicode :)


BTW, the SR for the noto emoji font addition has been blocked because
of the current noto-cjk rework.  Let's rip if out from
google-noto-fonts quickly, then improve fontconfig stuff.


> Deepin project have a 'deepin-opensymbol-fonts' which is 6 fonts that
> provide 'MT Extra' 'Webdings'
> 'Wingding' 'Wingding 2' and two other symbol fonts on M$.
> 
> So it's a 100% alternative. we don't need to rely on the ancient one
> from LibreOffice
> 
> 3.3 Adobe Source Hans vs. Google Noto CJK.
> 
> They're actually the same with minor difference. eg: the weight.
> https://qdan.me/list/VLPe5sfsxkFWYMmX
> 
> And Source Hans has a 'HW( half weight )' weight available only in its
> language specific variants.
> 
> So I think we should use fontconfig to provide Adobe Source Hans as we can.
> 
> And only package those missing weights.

Sounds like a good idea.


> But I didn't start working on this at all.

Don't worry, it should be in a lower priority.


> 3.4 re-evaluate the choicesin 60-family-prefer.conf
> 
> For example, we still have Wenquanyi Zen Hei in the preference of
> 'sans-serif', and those 'Shanghai Song Uni' and 'AR PL'
> 
> What are they? are they still installed on openSUSE by default?

I don't think so.  It was some commercial fonts which was installed as
default on SLE10 or such.

> our system fontconfig is not a trash...we shouldn't put everything here.
> 
> we should just have a working one, no need to prefer so many ancient
> things that few knows today.
> 
> I think we can have a start by cleaning CJK substitutes.

Agreed, we need a cleanup work in a lot of places.


> Because I will not be available from April. 28th to May 1st. (National
> Holiday leave).
> 
> So please just step in the any of these topics and send pull requests
> to openSUSE/fonts-config
> when you're ready.

Have a nice vacation.  Hopefully we can finish something before your
vacation, though :)


thanks,

Takashi
-- 
To unsubscribe, e-mail: [email protected]
To contact the owner, e-mail: [email protected]