Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 520222 - media-fonts/terminus-font - add USE=minimal to only install UTF8 encoded fonts
Summary: media-fonts/terminus-font - add USE=minimal to only install UTF8 encoded fonts
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Library (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Fonts Team
URL:
Whiteboard:
Keywords: PATCH
Depends on:
Blocks:
 
Reported: 2014-08-19 06:08 UTC by Yichao Zhou
Modified: 2015-02-10 07:49 UTC (History)
2 users (show)

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


Attachments
terminus-font-4.39.ebuild (terminus-font-4.39.ebuild,2.41 KB, text/plain)
2014-08-19 06:09 UTC, Yichao Zhou
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Yichao Zhou 2014-08-19 06:08:50 UTC
By default, terminus-font will install a lot of pcf font in different encoding.  However, I only need the one with unicode, which is the superset of other fonts.

By introducing pcf fonts file with these unnecessary encoding, it causes problems with qt.  See bug report: https://bugreports.qt-project.org/browse/QTBUG-22599#comment-253138

The attachment is a ebuild with minimal uses flag.

Reproducible: Always
Comment 1 Yichao Zhou 2014-08-19 06:09:11 UTC
Created attachment 383100 [details]
terminus-font-4.39.ebuild
Comment 2 Jeroen Roovers (RETIRED) gentoo-dev 2014-08-19 09:06:19 UTC
Comment on attachment 383100 [details]
terminus-font-4.39.ebuild

--- terminus-font-4.38.ebuild   2013-09-10 17:00:54.144966860 +0200
+++ terminus-font-4.39.ebuild   2014-08-19 11:05:50.957617280 +0200
@@ -12,8 +12,8 @@

 LICENSE="OFL-1.1 GPL-2"
 SLOT="0"
-KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ppc64 ~s390 ~sh sparc x86 ~x86-fbsd ~x86-freebsd ~amd64-linux ~x86-linux ~ppc-macos ~x86-macos"
-IUSE="a-like-o +center-tilde distinct-l ru-dv +ru-g quote ru-i ru-k +psf raw-font-data +pcf"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~x86-fbsd ~x86-freebsd ~amd64-linux ~x86-linux ~ppc-macos ~x86-macos"
+IUSE="a-like-o +center-tilde distinct-l +minimal ru-dv +ru-g quote ru-i ru-k +psf raw-font-data +pcf"

 DEPEND="app-arch/gzip
        dev-lang/perl
@@ -68,6 +68,10 @@
        fi
        if use pcf; then
                emake DESTDIR="${D}" install-pcf
+               if use minimal; then
+                       rm -f ${D}/usr/share/fonts/terminus/ter-{1,2,5,7,9}*
+                       rm -f ${D}/usr/share/fonts/terminus/ter-{c,d,f,g,k,p,u}*
+               fi
        fi

        font_src_install
Comment 3 SpanKY gentoo-dev 2014-09-09 18:07:09 UTC
yes, you can say technically say "unicode is a superset of all other encodings" if you mean "every character that can be represented in other encodings can also be represented in unicode".  but it does not mean that they are codepoint compatible (data represented in one encoding does not directly convert to utf8).  only ascii & iso-8859-1 are compatible in that regard, and only when speaking of utf8 encoding.  there are still people who choose to use those encodings, so you can't really classify them as "unnecessary".

adding a flag (like USE=minimal) that only installs utf8 encodings seems reasonable to me as it's the long term convergence point.
Comment 4 Davide Pesavento (RETIRED) gentoo-dev 2014-09-09 18:12:23 UTC
Should USE=minimal be enabled by default?
Comment 5 SpanKY gentoo-dev 2014-09-09 19:38:13 UTC
(In reply to Davide Pesavento from comment #4)

i kind of want it to be, but maybe it should have a better name than the USE=minimal dumping ground ?  USE=pcf-unicode-only maybe ?  don't want to make it sound like the flag applies to psf files (since, iiuc, it's not possible to load a full unicode based font into the Linux console as it only supports up to 512 codepoints simultaneously).

the proposed patch could be simplified a bit by using wildcards:
 # Only the ter-x* fonts are unicode (ISO-10646-1) based
 rm -f "${ED}"/usr/share/fonts/terminus/ter-[0-9a-wy-z]* || die
Comment 6 Yichao Zhou 2015-02-10 07:06:50 UTC
Ping...  Is this patch really to go?
Comment 7 Ben de Groot (RETIRED) gentoo-dev 2015-02-10 07:49:22 UTC
+*terminus-font-4.39-r1 (10 Feb 2015)
+
+  10 Feb 2015; Ben de Groot <yngwin@gentoo.org> +terminus-font-4.39-r1.ebuild,
+  metadata.xml:
+  Add pcf-unicode-only useflag, enabled by default (bug #520222). Bump EAPI to
+  5. Alphabetize USE flags listing.

Done. Thanks for your contributions!