Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 404463 - app-i18n/uim shouldn't depend on fonts
Summary: app-i18n/uim shouldn't depend on fonts
Status: RESOLVED CANTFIX
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: CJK Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 401143
  Show dependency tree
 
Reported: 2012-02-19 00:28 UTC by Maxim Kammerer
Modified: 2018-05-28 15:17 UTC (History)
0 users

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 Maxim Kammerer 2012-02-19 00:28:29 UTC
The ebuild depends on media-fonts/intlfonts, and in addition on several more fonts, if some LINGUAS are enabled.

All of these fonts are bitmap fonts, for which there are truetype alternatives. Moreover, LINGUAS are used only to decide the fonts to depend on.

I think that uim ebuild shouldn't decide which fonts are required - especially as none of the fonts in the ebuild are actually required (I am running a system without bitmap fonts without issues).

A suggestion:
  - drop all font dependencies
  - drop linguas_* use-flags
  - drop the xft use-flag, and supply --with-xft unconditionally (libXft is already an unconditional dependency)
  - write fonts recommendations in pkg_postinst()
Comment 1 Maxim Kammerer 2012-02-19 00:30:41 UTC
Sorry, "intlfonts" above should be "font-sony-misc".
Comment 2 Naohiro Aota gentoo-dev 2012-03-08 07:01:51 UTC
I've considered font removal and try to check the code. I think it's difficult (or too early) to remove fonts dependss.

uim/xim/convdisp.cpp has the follwoing lines to hardcode font names:

> const char *fontset_zhCN = "-sony-fixed-medium-r-normal--16-*-*-*-c-80-iso8859-1, -isas-fangsong ti-medium-r-normal--16-160-72-72-c-160-gb2312.1980-0";
> const char *fontset_zhTW = "-sony-fixed-medium-r-normal--16-*-*-*-c-80-iso8859-1, -taipei-fixed-medium-r-normal--16-150-75-75-c-160-big5-0";
> const char *fontset_ja = "-sony-fixed-medium-r-normal--16-*-*-*-c-80-iso8859-1, -jis-fixed-medium-r-normal--16-*-75-75-c-160-jisx0208.1983-0, -sony-fixed-medium-r-normal--16-*-*-*-c-80-jisx0201.1976-0";
> const char *fontset_ko = "-sony-fixed-medium-r-normal--16-*-*-*-c-80-iso8859-1, -daewoo-gothic-medium-r-normal--16-120-100-100-c-160-ksc5601.1987-0";

and without font-jis-misc, uim-xim output "Critical: XCreateFontSet failed!".
(Actually, it's not so critical.. it works fine even this "critical" output.)

Also notice that even if USE="xft" (and so --with-xft), /usr/share/uim/im-custom.scm set xft font future default to be disabled:

> (define-custom 'uim-xim-use-xft-font? #f
>   '(xim xim-preedit)
>   '(boolean)
>   (N_ "Use anti-aliased fonts for Over-the-Spot/Root-Window preedit")
>   (N_ "long description will be here."))

When it came to default to be enabled, I'd agree to drop font deps, but not now.
Comment 3 Maxim Kammerer 2012-03-08 07:52:15 UTC
(In reply to comment #2)
> and without font-jis-misc, uim-xim output "Critical: XCreateFontSet failed!".
> (Actually, it's not so critical.. it works fine even this "critical" output.)

I can't reproduce this message, did you just run uim-xim? I tried running LANG=ja_JP.UTF-8 uim-xim --direct, and also running midori with same LANG, selecting xim input afterwards, and typing some Japanese input. No message from uim-xim. I set uim-xim-use-xft-font? to #f before doing all that.

> When it came to default to be enabled, I'd agree to drop font deps, but not
> now.

Non-default Xft looks like legacy to me, maybe ask upstream?
Comment 4 Naohiro Aota gentoo-dev 2012-03-09 09:26:57 UTC
(In reply to comment #3)
> (In reply to comment #2)
> > and without font-jis-misc, uim-xim output "Critical: XCreateFontSet failed!".
> > (Actually, it's not so critical.. it works fine even this "critical" output.)
> 
> I can't reproduce this message, did you just run uim-xim? I tried running
> LANG=ja_JP.UTF-8 uim-xim --direct, and also running midori with same LANG,
> selecting xim input afterwards, and typing some Japanese input. No message
> from uim-xim. I set uim-xim-use-xft-font? to #f before doing all that.

strange...

$ vi ~/.uim.d/customs/custom-uim.scm
(set uim-xim-use-xft-font? to #f)
$ sudo emerge -C font-jis-misc
$ env -i HOME=$HOME DISPLAY=$DISPLAY LANG=ja_JP.UTF-8 uim-xim
$ (another shell) XMODIFIERS=@im=uim xterm
Turn on uim and type something 

arise this result:

uim <-> XIM bridge. Supporting multiple locales.
Using full-synchronous XIM event flow
Supported conversion engines:
  direct (*)
  tutcode (ja)
  anthy-utf8 (ja)
XMODIFIERS=@im=uim registered, selecting anthy-utf8 (ja) as default conversion engine
Critical: XCreateFontSet failed!
Critical: XCreateFontSet failed!
Critical: XCreateFontSet failed!

..and "uim-xim --engine=direct" didn't show the critical message above.

> > When it came to default to be enabled, I'd agree to drop font deps, but not
> > now.
> 
> Non-default Xft looks like legacy to me, maybe ask upstream?

Yes. This part is upstream issue.
Comment 5 Maxim Kammerer 2012-03-11 01:34:06 UTC
Still cannot reproduce the error. Oh well, I guess that one needs an actual legacy X application for that, like xterm.
Comment 6 Naohiro Aota gentoo-dev 2012-03-13 14:37:11 UTC
(In reply to comment #5)
> Still cannot reproduce the error. Oh well, I guess that one needs an actual
> legacy X application for that, like xterm.

aha, may be yes. The code is in xim/*.c Since midori is gtk based application, it might use gtk im module instead of xim...