xmlgraphics-fop-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Abel Braaksma <abel.onl...@xs4all.nl>
Subject Re: Looking for help, including consulting, with font selection
Date Mon, 04 Jan 2010 12:46:45 GMT
Can you clarify? Because that's precisely what I wrote. Perhaps we have 
some misunderstanding on what the font-selection-strategy means and/or 
what "picked" means (who picks what by what criteria?).

Can you provide a simple input (XML) output (XSL-FO) example that 
currently renders incorrectly, but which is a little bit more elaborate 
then the "A=E3=81=82" string example? I.e., how would you deal with the 
selection of the font and what do you expect FOP to do for you?

Benson Margulies wrote:
> We don't want to specify fonts char-by-char, we want them picked.
>
> On Mon, Jan 4, 2010 at 7:35 AM, Abel Braaksma <abel.online@xs4all.nl> wrote:
>   
>> I'm under the impression that Benson means selection strategy based on
>> availability. Suppose the "A" is available in Candara, but the other
>> letters/symbols are not, and the needed font selection strategy is
>> "character by character" then the result must be similar to what you wrote,
>> but automatically so. According to
>> http://xmlgraphics.apache.org/fop/trunk/fonts.html#selection this is not
>> implemented yet.
>>
>> Note that "auto" (which is implemented) means "the selection criterion is
>> implementation defined". For FOP that means (afaik) that word boundaries and
>> element boundaries work and that the "largest portion of a text or word
>> that's available in a particular font" will be chosen. In the example above,
>> the Gothic font will be used, because that has the largest part of the
>> word/text.
>>
>> Changing to "character-by-character" means that each character is considered
>> individually.
>>
>> Naturally, if Candara would contain all capital letters only, choosing
>> character-by-character in the following:
>>
>>  <fo:inline  font-family="Caldara, 'Century Gothic'">A=E3=81=82</fo:inline>
>>
>> then the rendering with character-by-character would be equivalent with the
>> following:
>>
>>  <fo:inline  font-family="Caldara">A</fo:inline>
>>  <fo:inline  font-family="'Century Gothic'">=</fo:inline>
>>  <fo:inline  font-family="Caldara">E</fo:inline>
>>  <fo:inline  font-family="'Century Gothic'">3=81=82</fo:inline>
>>
>> Obviously, either this or the original example from Benson cannot be
>> achieved with current means (unless you add some rather prolific XSLT 2.0
>> preprocessing, i.e., give it a list of fonts and do the selection strategy
>> in the earlier processing step, using some home-brewed extension functions,
>> which could be a possible alternative while waiting for the implementation).
>>
>> Cheers,
>> Abel
>>
>>
>> Jason Harrop wrote:
>>     
>>> I don't have a font called "MS Gothic" on my XP / Word 2007 PC, so
>>> i've used "Century Gothic" instead, but subject to that, and assuming
>>> the relevant fonts are available, isn't this just:
>>>
>>>            <fo:block>
>>>                <fo:inline  font-family="Candara">A</fo:inline>
>>>                <fo:inline  font-family="Century
>>> Gothic">=E3=81=82</fo:inline>
>>>            </fo:block>
>>>
>>> with a config such as:
>>>
>>> <fop version="1.0">
>>>    <strict-configuration>true</strict-configuration>
>>>    <renderers>
>>>        <renderer mime="application/pdf">
>>>            <fonts>
>>>                <font embed-url="file:/C:/WINDOWS/FONTS/CANDARA.TTF">
>>>                    <font-triplet name="Candara" style="normal"
>>> weight="normal"/>
>>>                </font>
>>>                <font embed-url="file:/C:/WINDOWS/FONTS/GOTHIC.TTF">
>>>                    <font-triplet name="Century Gothic" style="normal"
>>> weight="normal"/>
>>>                </font>
>>>            </fonts>
>>>        </renderer>
>>>    </renderers>
>>> </fop>
>>>
>>> cheers .. Jason
>>>
>>>
>>>
>>>       
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
>> For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
>>
>>
>>     
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
> For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
>
>
>
>   

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


Mime
View raw message