Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


Re: Changing font of a single character

From: "Neil Smith [MVP Digital Media]" <neil@------.--->
To: NULL
Date: 11/8/2006 10:22:00 PM

Yeah I'm afraid I'm not 100% on XSL-FO. 

But the technique would remain the same - you'd have a template which
checks each text() node character by character using substring(), and
if it finds a "pi" character it calls another template to output the
"pi" character wrapped in whatever font callout XSL-FO uses.

If you have access to msxml:script or php: namespace in your processor
it would be easier to find those substrings than iterating each
character in the text node.

HTH
Cheers - Neil

On 8 Nov 2006 11:51:20 -0800, "PB" <pboparai@c...> wrote:

>Hi Neil,
>
>Thank you for your response.  Unfortunately, we are creating PDFs and
>are using XSL-FO.  I know how to change font's using XSL-FO, but not
>sure how to change the font of just a particular character.
>
>
>
>Neil Smith [MVP Digital Media] wrote:
>> On 8 Nov 2006 10:24:15 -0800, "PB" <pboparai@c...> wrote:
>>
>> >Hi,
>> >
>> >I was wondering how to change the font for a specific character.  I.e.
>> >when we use the capital letter for Pi, we would like it to be in
>> >Courier New, but the rest of the document to be in Arial.  Is there a
>> >way to globally set this in the XSL so that everywhere the Pi symbol
>> >will be using the Courier New font?
>>
>>
>> XSL (and XML generally) has no concept of fonts.
>>
>> Can I assume you're trying to output HTML from your stylesheet ?
>>
>> In that case, CSS is the formatting technique you want, but there's
>> also a default setting for the <pre /> HTML element in browsers, which
>> uses monospaced fonts (usually Courier or System)
>>
>> So your problem is just to find all "pi" symbols in your document, and
>> wrap them in your HTML output as <pre>"pi"</pre>
>>
>>
>> Cheers - Neil
>> ------------------------------------------------
>> Digital Media MVP : 2004-2006
>> http://mvp.support.microsoft.com/mvpfaqs
------------------------------------------------
Digital Media MVP : 2004-2006
http://mvp.support.microsoft.com/mvpfaqs


transparent
Print
Mail
Digg
delicious
Disclaimer
.

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.

.
.

transparent

transparent