![]() |
![]() | ![]() | ![]() | Altova Mailing List Archives>Archive Index >microsoft.public.xsl Archive Home >Recent entries >Thread Prev - Re: Changing font of a single character [Thread Next] Re: Changing font of a single characterTo: 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 | ![]() | ![]() | ![]() |
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | |||||
|
