Hello,
a package I co-mainatin bundles google-noto-sans-fonts and google-noto-sans-cjk-fonts upstream.
The fonts are removed from the package. We want to add a dependency on them, like this:
Requires: google-noto-sans-fonts Requires: google-noto-sans-cjk-fonts
However, it was pointed out in [1] that the cjk fonts are quire large and probably no use for non-APAC users. (CJK is the shorthand collective name for the Chinese, Japanese, and Korean writing systems.)
We could do:
Requires: google-noto-sans-fonts Recommends: google-noto-sans-cjk-fonts
But that still installs it to everybody by default.
I was wondering if there is a rich dep magic I could use.
E.g.
Requires: google-noto-sans-fonts Requires: (google-noto-sans-cjk-fonts if langpacks-fonts-...)
However, there seem to be no general langpack for cjk.
I could try to reverse engineering all the langpacks that need cjk fonts from, the code [2], but perhaps there is a more general way?
I see that langpacks-fonts-ja/ko/zh_* Requires google-noto-sans-mono-cjk-vf-fonts and google-noto-serif-cjk-vf-fonts. So I can do:
Requires: (google-noto-sans-cjk-fonts if google-noto-serif-cjk-vf-fonts)
But can I assume this will always be the case?
[1] https://bugzilla.redhat.com/show_bug.cgi?id=2281392#c12 [2] https://github.com/prusa3d/PrusaSlicer/blob/version_2.8.0/src/slic3r/GUI/ImG...
Hi,
langpacks-<langcode> packages aren't necessarily installed for a primary locale. So I don't think such rich deps works as expected, particularly to figure out the regions for users. Plus, we have font packages installed by default to cover the majority of languages for convenience. So requiring font packages conditionally may not work too.
BTW is there any reason that the package requires a non variable font package? If it works with the variable font, I think you can simply drop its dependency since we have google-noto-sans-cjk-vf-fonts installed by default as well as google-noto-sans-vf-fonts. Otherwise it may be better to fix it.
On Wed, Aug 14, 2024 at 6:23 PM Miro Hrončok mhroncok@redhat.com wrote:
Hello,
a package I co-mainatin bundles google-noto-sans-fonts and google-noto-sans-cjk-fonts upstream.
The fonts are removed from the package. We want to add a dependency on them, like this:
Requires: google-noto-sans-fonts Requires: google-noto-sans-cjk-fonts
However, it was pointed out in [1] that the cjk fonts are quire large and probably no use for non-APAC users. (CJK is the shorthand collective name for the Chinese, Japanese, and Korean writing systems.)
We could do:
Requires: google-noto-sans-fonts Recommends: google-noto-sans-cjk-fonts
But that still installs it to everybody by default.
I was wondering if there is a rich dep magic I could use.
E.g.
Requires: google-noto-sans-fonts Requires: (google-noto-sans-cjk-fonts if langpacks-fonts-...)
However, there seem to be no general langpack for cjk.
I could try to reverse engineering all the langpacks that need cjk fonts from, the code [2], but perhaps there is a more general way?
I see that langpacks-fonts-ja/ko/zh_* Requires google-noto-sans-mono-cjk-vf-fonts and google-noto-serif-cjk-vf-fonts. So I can do:
Requires: (google-noto-sans-cjk-fonts if google-noto-serif-cjk-vf-fonts)
But can I assume this will always be the case?
[1] https://bugzilla.redhat.com/show_bug.cgi?id=2281392#c12 [2] https://github.com/prusa3d/PrusaSlicer/blob/version_2.8.0/src/slic3r/GUI/ImG... -- Miro Hrončok -- Phone: +420777974800 Fedora Matrix: mhroncok
-- _______________________________________________ packaging mailing list -- packaging@lists.fedoraproject.org To unsubscribe send an email to packaging-leave@lists.fedoraproject.org Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/ List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines List Archives: https://lists.fedoraproject.org/archives/list/packaging@lists.fedoraproject.... Do not reply to spam, report it: https://pagure.io/fedora-infrastructure/new_issue
-- Akira TAGOH
On 16. 08. 24 15:29, Akira TAGOH wrote:
Hi,
langpacks-<langcode> packages aren't necessarily installed for a primary locale. So I don't think such rich deps works as expected, particularly to figure out the regions for users. Plus, we have font packages installed by default to cover the majority of languages for convenience. So requiring font packages conditionally may not work too.
BTW is there any reason that the package requires a non variable font package? If it works with the variable font, I think you can simply drop its dependency since we have google-noto-sans-cjk-vf-fonts installed by default as well as google-noto-sans-vf-fonts. Otherwise it may be better to fix it.
Thanks,
What does a variable font mean in this context? I don't know much about our font packaging.
The package has:
https://github.com/prusa3d/PrusaSlicer/blob/version_2.8.0/src/slic3r/GUI/ImG...
AddFontFromFileTTF((Slic3r::resources_dir() + "/fonts/" + "NotoSans-Regular.ttf")... if (s_font_cjk) { AddFontFromFileTTF((Slic3r::resources_dir() + "/fonts/" + "NotoSansCJK-Regular.ttc")....
The fonts are normally vendored. We delete them and wanted to replace them with symbolic links to files in /usr/share/fonts/google-noto.
See https://bugzilla.redhat.com/show_bug.cgi?id=2281392
On Tue, Aug 20, 2024 at 9:55 PM Miro Hrončok mhroncok@redhat.com wrote:
What does a variable font mean in this context? I don't know much about our font packaging.
That is https://en.wikipedia.org/wiki/Variable_font
I have another idea after sending the previous mail though, if you are going to have a symlink for a font file, you could separate it to a sub package as a langpack[*1] and then add a certain dependency there.
[*1] https://docs.fedoraproject.org/en-US/packaging-guidelines/Langpacks/
Hope this helps,
The package has:
https://github.com/prusa3d/PrusaSlicer/blob/version_2.8.0/src/slic3r/GUI/ImG...
AddFontFromFileTTF((Slic3r::resources_dir() + "/fonts/" + "NotoSans-Regular.ttf")... if (s_font_cjk) { AddFontFromFileTTF((Slic3r::resources_dir() + "/fonts/" + "NotoSansCJK-Regular.ttc")....
The fonts are normally vendored. We delete them and wanted to replace them with symbolic links to files in /usr/share/fonts/google-noto.
See https://bugzilla.redhat.com/show_bug.cgi?id=2281392
-- Miro Hrončok -- Phone: +420777974800 Fedora Matrix: mhroncok
packaging@lists.fedoraproject.org