You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-commits@xmlgraphics.apache.org by Apache Wiki <wi...@apache.org> on 2007/04/20 11:45:18 UTC

[Xmlgraphics-fop Wiki] Update of "FontSelectionStrategy" by JeremiasMaerki

Dear Wiki user,

You have subscribed to a wiki page or wiki category on "Xmlgraphics-fop Wiki" for change notification.

The following page has been changed by JeremiasMaerki:
http://wiki.apache.org/xmlgraphics-fop/FontSelectionStrategy

The comment on the change is:
Just recording some thoughts in order to do an estimation.

New page:
This page gathers thoughts and information for implementing the font-selection-strategy property, or in other words, for supporting the evaluation of the font character by character in a text. Not every font supports every glyph, so if you specify font-family="Times, Symbol", FOP should, in the end, paint latin characters using Times and symbol characters with the Symbol font without the need of a work-around like an fo:wrapper or fo:character to get the right font.

=== Tasks ===
 * Do any necessary improvements to the font-family property.
 * FOText doesn't need to be touched.
 * Area tree and rendering doesn't need to be touched if !TextLayoutManager produces separate areas per font.
 * Modify !TextLayoutManager to determine the font for each character.
   * kerning may not be possible between two characters from different fonts.
   * A new area has to be created when the font changes.
   * Get the !AlignmentContext handling right.

=== Definitions for the context of this page ===
 * character group: consecutive subset of characters for te FOText instance which are going to be painted with the same font.

=== Notes ===

I can see two possibilities for the implementation:
 1. Creating multiple TextLM instances from one FOText instance, splitting the text up by character groups. That would allow to avoid adding additional complexity to TextLM.
 2. Keep track of the font for each character in the TextLM.

Chatting with Manuel over Skype, he told me to pay attention on the dependencies between LM instances over the !AlignmentContext. Looking at this class shows that it takes values from a single font. So, the difficulty is not really keeping track of which font is used for each character. More difficult is to keep vertical alignment (baselines, ascenders etc.) under control. The situation with the dependencies needs to be improved which could make the implementation of the font-selection-strategy easier. Manuel suggests to follow the first approach above, unless those dependencies can be fixed in which case the second approach would work nicely.

---------------------------------------------------------------------
To unsubscribe, e-mail: fop-commits-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-commits-help@xmlgraphics.apache.org