Re: CVS: commit tomas_f abi/src/af/gr/unix gr_UnixPangoGraphics.cpp gr_UnixPangoGraphics.h

From: Tomas Frydrych <tf_at_o-hand.com>
Date: Sat Jan 27 2007 - 11:45:10 CET

I have implemented font-substitution in the Pango graphics class, so
that if a font is requested that is not on the system, or which does not
have the coverage necessary to draw a particular run, a suitable font is
transparently substituted in the background. This should improve the
user experience and fix some long-standing bugs (e.g., 9451).

This means one significant change in AbiWord behaviour: all font
requests are now processed via fontconfig, so whatever your fontconfig
says about your font preferences will be followed, and your documents
might look different than they looked before this commit. For example:

The Ubuntu fonts.conf specifies that 'Times New Roman' (and bunch of
other serif fonts) is to be aliased to 'serif', and that in place of
'serif' fonconfig should be using 'Dejavu Serif'. This means that even
if you have 'Times New Roman' installed, and choose 'Times New Roman'
from the font menu, the font actually used for the screen output will be
'Dejavu Serif'.

Please not that the font substitution is done transparently in the the
background, so if you do something like:

GR_Font * pFont = pG->findFont ("Times New Roman", ....);
const char * pszFamily = pFont->getFamily();

pszFamily will be "Times New Roman" even if the PangoFont used for the
drawing is "Dejavu Serif".

If you want to know what font face will actually be used for 'Times New
Roman', you can use GR_Graphics::findNearestFont("Times New Roman", ...
); this function is now again static, so you do not need an instance of
the graphic class to use.

Tomas
Received on Sat Jan 27 11:45:12 2007

This archive was generated by hypermail 2.1.8 : Sat Jan 27 2007 - 11:45:14 CET