Great, thanks for looking into it! AFAIU, your concept is right. The
spec refers to CSS on how to handly the font selection (see [1]).

But I also think that's the minimal algorithm. If you have two Symbol
characters and a space between, it's probably slightly better-looking to
use Symbol's space character, i.e. no font-family change for only
white-space. But I'd stick to what's easier to implement, first.

CSS also defines a font-matching concept which, AFAIU, kicks in when
mere font-selection doesn't help anymore. But IMO, that's another
building site which shouldn't be too difficult to add once we have the
basic infrastructure for char-by-char font selection.

[1] http://www.w3.org/TR/REC-CSS2/fonts.html#propdef-font-family
[2] http://www.w3.org/TR/REC-CSS2/fonts.html#algorithm

Jeremias Maerki



On 19.10.2007 13:50:55 Manuel Mall wrote:
> Because the issue of font selection by character was raised again on 
> fop-user I have started to look at it as the appropriate font data 
> structures are now in place.
> 
> I am just looking for a confirmation here of the selection algorithm. My 
> understanding is that for each character, independent of its context, 
> the font list is searched for the first font with a matching glyph. 
> This means in particular for characters like space and hyphen (as used 
> for hyphenation), they will always be taken from the first font 
> containing them even if their 'neighbouring' characters are from a 
> different font?
> 
> Manuel

Reply via email to