Peter B. West wrote:
Although not mandated in XSL-FO, CSS2 offers a number of methods of font matching, only some of which preserve metrics. The FO User Agent is free to make implementation-specific decisions about this, I assume. My main interest here is in whether we want to try to separate out the font handling so that we try to guarantee identical layout on any renderer, or whether we state up front that such universality is *not* on offer.

I don't think the TXT renderer will in general render to the same layout as others :-) Nitpicks aside, fonts may be renderer specific. If different renderers use an identical font (e.g. a user configured TTF) chances are that the layout is the same, provided bitmap images are rendered identically. If different renderers use different fonts, which may have different metrics even if they are the same family, the layout is likely to be different too. I can't see how to avoid this. BTW fonts aren't the only considerations, others are color and the discretization of coordinates (e.g. bitmap vs. vector format).

I would assume that the most useful response to the above situation is to issue a warning and do one's best to match the font. The user has access to a number of mechanisms for narrowing font choice, and in the worst case we use a fall-back font.

I'd say if the user saye font-family="futura, sans-serif,any" he'll get a warning that a fallback was used in case there is no futura or not even a sans-serif font. If the user says font-family="futura" and there is no futura font, FOP should terminate. After all, the user hopefully thought about it.


Reply via email to