https://bugzilla.redhat.com/show_bug.cgi?id=819875
Paul Flo Williams <paul(a)frixxon.co.uk> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |ASSIGNED
--- Comment #1 from Paul Flo Williams <paul(a)frixxon.co.uk> ---
Here's my take on exactly what needs to be changed for this to happen, for
review. It doesn't look that complicated, but I may have misunderstood
something and I don't quite know how to finish this off.
Relevant other bugs, from comment 1:
Bug 757105 appears to be stuck on Fontconfig upstream, and doesn't impact most
of our font packages, so I'll ignore it for now.
Bug 521697 suggests changing fc-query to fc-scan at first, but ends with the
recommendation of still using fc-query with a faked-up fontconfig path that
just includes the fontconfig file of the font we're packaging, so that is
relevant.
So, we will be grabbing font.attr and fontconfig.prov from rpm.git and moving
them to fontpackages. We will make some changes on the way.
font.attr is as simple as this:
%__font_provides %{_rpmconfigdir}/fontconfig.prov
%__font_requires %{nil}
%__font_magic [Ff]ont?( (program|collection))?( (text|data))
We don't currently generate font provides for any fonts outside
/usr/share/fonts, so we could add these two lines as well:
%__font_path ^%{_datadir}/fonts/
%__font_flags magic_and_path
(Yeah, there shouldn't *be* any fonts outside here, but ...)
From bug 521697, we now need to fake up a fontconfig "root
file" that will
point to the current font's fontconfig file, and pass this
to the font provider
script. I think this is achieved by some magic in our existing font macros
which will take the name of the font-fontconfig file and write it into (say)
/tmp/fake-fonts.conf and create a macro called %__font_provides_opts which
contains this name.
When fontconfig.prov is called, the name of our faked fontconfig file will be
passed on the command line, and we use that to set up the FONTCONFIG_FILE
environment variable.
My sticking point is not knowing exactly when everything gets evaluated during
building the font package, so I don't know which macro should magically create
this temporary fontconfig root file (and, presumably, cleanly dispose of it).
--
You are receiving this mail because:
You are on the CC list for the bug.