[MacPorts] #44148: using Bohoomil's Infinality-Ultimate patches
MacPorts
noreply at macports.org
Sat Nov 8 12:13:24 PST 2014
#44148: using Bohoomil's Infinality-Ultimate patches
----------------------------------------+--------------------------
Reporter: rjvbertin@… | Owner: ryandesign@…
Type: enhancement | Status: new
Priority: Normal | Milestone:
Component: ports | Version:
Resolution: | Keywords: haspatch
Port: freetype fontconfig cairo |
----------------------------------------+--------------------------
Comment (by rjvbertin@…):
Below are some packaging instructions bohoomil sent me recently. I've
updated the Portfile and patches as well as fontconfig's post-destroot
install script accordingly.
{{{
Here is the list of steps you may want to perform manually to make use of
fontconfig-iu: in the future, they won't be necessary since everything
will be
done automatically during compilation. I am going to use Ubuntu directory
layout
in which
* /etc/fonts/conf.avail -- is where stock fontconfig templates are
installed
* /etc/fonts/conf.d -- is the location of active fontconfig configuration
files.
The process of building Ubuntu fontconfig may actually differ: since
you're
using ppa, reproduce the steps following ppa's package building logic.
1. Download fontconfig source packages from here:
http://packages.ubuntu.com/utopic/fontconfig
(You should use fontconfig v.2.11.1, the default one for Utopic Unicorn.)
2. Download the latest fontconfig-ultimate archive you can download from
here:
https://github.com/bohoomil/fontconfig-ultimate/releases
3. Copy the entire conf.d.infinality from the fontconfig-ultimate archive
to the
stock fontconfig root directory:
$ ls fontconfig-2.11.1/ conf.d conf.d.infinality doc fc-cache ...
4. Replace the patches in debian/patches with patches [01-05]-foo.patch
and
fc-cache.c.patch from fontconfig_patches and update the series file
accordingly.
You should also update the build script(s) so that the new ones are
properly
applied during compilation.
The new patches will modify the stock fontconfig library in the following
way:
a. A new template directory, /etc/fonts/conf.avail.infinality, will be
created.
This is where fontconfig Infinality templates will be located and these
will be
used instead of stock ones from /etc/fonts/conf.avail.
You can change or confirm the default location by specifying it during
source
code configuration, i.e.
--with-templateinfdir=/etc/fonts/conf.avail.infinality
b. /etc/fonts/conf.avail won't be removed: this directory is still needed
for
compatibility with the rest of Ubuntu applications, font packages and new
fonts
settings foo.conf files you'll get from fonts-settings directory.
Once this is done, the C compiler can do its part of the job.
Next few steps are basically instructions for Ubuntu package manager, so I
guess
the files you're going to modify now are respective pre/post{inst,rm}
scripts.
What you should do then:
5. Copy combi, free and ms directories with their content from
fontconfig_patches to /etc/fonts/conf.avail.infinality. These three are
crucial
for fontconfig-infinality to work correctly!
6. Copy *conf files from fonts-settings to /etc/fonts/conf.avail (i.e. the
stock
template directory).
7. Copy fc-presets from fontconfig_patches to /usr/bin.
And that's it.
In the future, the only necessary steps will be 1) patching (which will
create
new files automatically) and 2) defining default Infinality template
directory
with --with-templateinfdir= variable. So actually just a bit more effort
than
building the stock fontconfig.
Now a few notes on how to use the newly built fontconfig-
infinality{-ultimate}.
1. Default presets and default font collection.
Default font collection is the one you use to define default aliases:
sans-serif, serif, monospace, etc. for Latin and non-Latin scripts. There
are
three predefined options available for the user by default:
a. free -- only free fonts will be used, as stated in 60-latin-free.conf
and
65-non-latin-free.conf. The preset is the default one for the infinality-
bundle
and Arch Linux users, and all fonts can be installed from binary packages
available in my infinality-bundle-fonts repository. The main difference
between
my font packages and stock ones is the presence of fontconfig
configuration
files in the former which were tailored for the ultimate settings set in
infinality-settings{.sh} file. Besides, when necessary I fix buggy font
files,
so although the content of stock and my font packages may be identical, a
few
font files may actually differ. Further, I pack each font family to
reside in
its own subdirectory in /usr/share/fonts, which makes it easier to
maintain them
and optically determine which one you have or haven't got.
The preset offers replacement options for non-free families: all of them
are
defined in 30-metric-aliases-free.conf and 37-repl-global-free.conf.
b. ms -- only default Microsoft font families will be used, as stated in
60-latin-ms.conf and 65-non-latin-ms.conf. This presets assumes you're
using
Microsoft Window 8+ fonts and they are installed.
The preset mostly doesn't replace existing font families: the only
substitutions
occur for corrective or compatibility reasons (see 37-repl-global-ms.conf
for
details).
c. combi -- this is a DIY presets for users who want to heavily customize
their
font collection. It's basically meant to be used when you're either using
a
pretty non-standard font families, you're going to mix different font
collections (for instance, you want to use all ms and free fonts as is,
without
replacing non-free families with the free ones: this is quite a popular
user
case with Arch users and the pre-defined combi templates for this you can
find
in doc/fontconfig-infinality-ultimate/fontconfig-global/combi-minimal;
replace
the content of /etc/fonts/conf.avail.infinality/combi with them and set
the
combi preset to activate it), etc.
Note that these three presets have nothing to do with rendering styles
known
from the original fontconfig-infinality: their sole purpose is font
families
management, not making your fonts look like Window, Mac, Ubuntu or the
like.
For two presets, free and ms, there is a an additional useful config file
available in /etc/fonts/conf.avail.infinality: it's 35-repl-custom.conf.
For
example, if you are using the free font collection, but instead of Noto
Sans you
want to set Liberation Sans for your default sans-serif alias, you do so
by
copying the content of 60-latin-free.conf to 35-repl-custom.conf and
re-arranging the names of the families accordingly. Another example: let's
say
you want to use the entire Microsoft font collection but instead of Arial,
you'd
rather set Nimbus Sans L as a replacement for Helvetica. Again,
35-repl-custom.conf is where you place the necessary replacement rule.
2. fc-presets: this is a little application which lets you set your
default
fontconfig-infinality preset (i.e. combi, free, ms). Run 'fc-presets help'
to
learn how to use it.
Once again: I'm very sorry for all the documentation part for taking so
much
time to be completed. It's not my laziness, but a combination of technical
and
personal, health related problems. I hope that the above will help you
understand the way fontconfig-iu operates which once completed properly,
will
involve roughly two steps:
1. applying the patches that will take care of all the configuration
nuances &
rebuilding the library.
2. running 'fc-presets help' to set correct fontconfig configuration
files.
Right now, unfortunately, a bit more manual work is still needed.
}}}
--
Ticket URL: <https://trac.macports.org/ticket/44148#comment:10>
MacPorts <https://www.macports.org/>
Ports system for OS X
More information about the macports-tickets
mailing list