Re: Aliases in 2.2.x

Chema Celorio wrote:

> So ... I was thinking that gnome_font_find_closest could ask fontconfig
> for a font, then map that result (by fc_file?) to an entry in the
> gnome-print fontmap and return that. _find_closest is not very smart
> right now and rarely does the right thing.
> The benefit of this is that strings like "Times", "Sans" will work,
> since fontconfig will match them and we'll return our alias "Sans
> Regular", the downside is that the API is now not well defined and every
> piece of code is going to use different defaults, which might not be
> reliable since we depend on the contents of /etc/fonts/fonts.conf for it
> to work.

(Just commenting ``well-defined'') I'd consider the API well-defined if
it was defined like


      *  returns the same font as gnome_font_find if that is not NULL
      *  returns the GnomeFont corresponding to <insert appropriate
        fontconfig call>

But this adds a conceptual dependency on fontconfig to the gnome-print
API which might be wanted or not.

Martin Kretzschmar <m_kretzschmar gmx net>

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]