Re: Aliases in 2.2.x



On Thu, 2003-02-13 at 14:16, Hans Petter Jansson wrote:
> On Thu, 2003-02-13 at 02:10, 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.
> 
> FWIW, I agree with Chris that this'd be the best way of doing it. I
> think programmers will expect fontconfig behaviour.

I was thinking of the simple case where a font name is matched, more
than full fonconfig behavior. fontconfig pattern matching is more
complex than just the name, if people want to have the full fontconfig
behavior a different API is needed where Apps deal directly with
fontoconfig and pass a FCPatternt for gnome-print to convert to a font
(which can be done). That is not how the current font API works. Dealing
directly with fontconfig is more work than the current API, I'll wait
for an developer to request this feature for an app where it would make
things easier for printing to add it.

Also, I don't know how much of this will be helpful once gnome-print has
pango interfaces. Apps will create pango layouts, runs or strings which
gnome-print will consume and those contain font information per glyph.

Font substitution is a different problem. Which is not addressed
(fully?) by fontconfig. Doing the well known aliases is not the same as
asking for the best match of font "Perpetua bold italic". Fontconfig
matches by names, and only a handful are defined in fonts.conf but doing
good font matching is a lot more work. Either you need to have a much
larger database or if you could not find a good font you want you to
compare glyph metrics to match the best font, etc. Keith: Is this
accurate?

regards,
Chema




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