Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 20 Sep 2015 07:55:58 +0900 (JST)
From:      Hiroki Sato <hrs@FreeBSD.org>
To:        bapt@FreeBSD.org
Cc:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   Re: svn commit: r396872 - in head: Keywords Mk/Uses
Message-ID:  <20150920.075558.41121606053469872.hrs@allbsd.org>
In-Reply-To: <20150914055033.GA54344@ivaldir.etoilebsd.net>
References:  <201509132330.t8DNUMEd025676@repo.freebsd.org> <20150914055033.GA54344@ivaldir.etoilebsd.net>

next in thread | previous in thread | raw e-mail | index | archive | help
----Security_Multipart(Sun_Sep_20_07_55_58_2015_406)--
Content-Type: Text/Plain; charset=us-ascii
Content-Transfer-Encoding: 7bit

Baptiste Daroussin <bapt@FreeBSD.org> wrote
  in <20150914055033.GA54344@ivaldir.etoilebsd.net>:

ba> On Sun, Sep 13, 2015 at 11:30:22PM +0000, Hiroki Sato wrote:
ba> > Author: hrs
ba> > Date: Sun Sep 13 23:30:21 2015
ba> > New Revision: 396872
ba> > URL: https://svnweb.freebsd.org/changeset/ports/396872
ba> >
ba> > Log:
ba> >   Add "fc", "fcfontsdir", "fontsdir", and "none" arguments to USES=fonts.
ba> >   They controls whether fc-cache and/or mkfontdir run in
ba> >   post-{,de}install targets.
ba> >
ba> >   japanese/font-* use manually generates fonts.dir entries to utilize
ba> >   special modifiers which are useful for CJK fonts.  Because mkfontdir
ba> >   does not understand and silently remove them from fonts.dir,
ba> >   options like fonts:fc or fonts:none is required.
ba> >
ba> >   Approved by:	portmgr (bapt)
ba>
ba> Thank you! can you add a comment at the top of fonts.mk to explain this issue?
ba> That would avoid someone else coming in a few years making the same mistake as I
ba> did.

 Sorry for the delay.  I added some comments about this just now.

ba> Do you know how they do fix in linux land? because when working on the fonts, I
ba> found nothing special being done on any Linux distro, have I missed something?

 I do not think most of Linux distros care about CJK fonts in
 XLFD---at least for Japanese fonts.  Some distros for Japanese market
 use a small script to generate fonts.dir.  RedHat was using ttmkfdir
 utility (included as x11-fonts/ttmkfdir but removed a while ago), but
 there is no special handling of fonts.dir in RPM of Japanese fonts
 these days.  This may be because most of applications which support
 CJK fonts now use Xft/fontconfig only.

 ttmkfdir is one of the utilities which can understand extensions
 designed for CJK fonts (-x flag).  The difference from normal XFLD
 entries is modifiers.  In the following example:

 fn=1:dfhsg3.ttc -dynalab-dfhsgothicp-light-r-normal--0-0-0-0-p-0-jisx0208.1983-0

 "fn" specifies font number in TTC.  And since most of Japanese fonts
 do not have italic variant in the font glyphs, "ai" is used to
 generate "poor man's italic" glyphs:

 fn=1:ai=0.1:dfhsg3.ttc -dynalab-dfhsgothicp-light-i-normal--0-0-0-0-p-0-jisx0208.1983-0

 I am still not sure of what is the best way for us to maintain
 fonts.dir which mkfontdir cannot understand.  While ttmkfdir supports
 it, this utility is not upper-compatible with mkfontdir.  One of the
 practical ways is that putting a Japanese font to a separate
 directory and maintaining fonts.dir by pkg-{,de}install script.

-- Hiroki

----Security_Multipart(Sun_Sep_20_07_55_58_2015_406)--
Content-Type: application/pgp-signature
Content-Transfer-Encoding: 7bit

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1

iEYEABECAAYFAlX95/8ACgkQTyzT2CeTzy1qEgCfXrI8qEBokkZEDrsLUI2OOGuq
CS8AoIlnG0brMG4EBaSuewp9VUori0k9
=YhX5
-----END PGP SIGNATURE-----

----Security_Multipart(Sun_Sep_20_07_55_58_2015_406)----



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20150920.075558.41121606053469872.hrs>