You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-users@xmlgraphics.apache.org by nancy_b <na...@yahoo.com> on 2008/10/11 22:12:47 UTC

Changing page numbers into their Dingbat counterparts

Hi guys,

I am using FOP 0.94.

My current hot issue is changing the page number format. I would like to
change the regular numbers to their Dingbat counterparts. For example, I
would like to change 1 to this number in a white/black circle, which is in
Unicode is &x#2780;. So I've customized the Docbook template as follows:

<xsl:template name="page.number.format">
  <xsl:param name="element" select="local-name(.)"/>
  <xsl:param name="master-reference" select="''"/>

  <xsl:choose>
    <xsl:when test="$element = 'toc' and self::book">i</xsl:when>
    <xsl:when test="$element = 'preface'">i</xsl:when>
    <xsl:when test="$element = 'dedication'">i</xsl:when>
    <xsl:otherwise>&x#2780;</xsl:otherwise>
  </xsl:choose>
</xsl:template>

But it does not work. Does FOP support the Dingbat numbers?

Thank you a lot in advance!
Best wishes,
Nancy

-- 
View this message in context: http://www.nabble.com/Changing-page-numbers-into-their-Dingbat-counterparts-tp19936055p19936055.html
Sent from the FOP - Users mailing list archive at Nabble.com.


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


Re: Changing page numbers into their Dingbat counterparts

Posted by nancy_b <na...@yahoo.com>.
Hi, 

thank you for your response! I appreciate it very much! So the only way to
achieve that is to place a background image under a number ;-).

My best regards,
Nancy


Andreas Delmelle-2 wrote:
> 
> On Oct 13, 2008, at 14:39, Andreas Delmelle wrote:
> 
>>
>> On Oct 13, 2008, at 14:31, Andreas Delmelle wrote:
>>
>>> Am I correct in assuming that you actually want the CIRCLED DIGIT  
>>> ONE (= U+1103) up to CIRCLED NUMBER TEN (U+1202)? In that case,  
>>> the only way I can think of to achieve the desired effect, is to  
>>> force the initial-page-number property of the page-sequence to 1103.
>>
>> Sorry, that will not work after all, since the first page-number  
>> will be the sequence 1-1-0-3, which will be rendered as four  
>> separate glyphs...
> 
> Checked a little closer in the meantime, and the story is that FOP  
> appears to be not 100% compliant where it comes to the 'format'  
> property (which I presume is being set by the posted Docbook source).  
> So our compliance page needs a little update to reflect this (unless  
> somebody figures out the fix for this real soon).
> 
> I'll see if I can take care of that one of these days.
> 
> 
> Andreas (just back from NYC, and somewhat jet-lagged...)
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
> For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/Changing-page-numbers-into-their-Dingbat-counterparts-tp19936055p19988392.html
Sent from the FOP - Users mailing list archive at Nabble.com.


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


Re: Changing page numbers into their Dingbat counterparts

Posted by Andreas Delmelle <an...@telenet.be>.
On Oct 13, 2008, at 14:39, Andreas Delmelle wrote:

>
> On Oct 13, 2008, at 14:31, Andreas Delmelle wrote:
>
>> Am I correct in assuming that you actually want the CIRCLED DIGIT  
>> ONE (= U+1103) up to CIRCLED NUMBER TEN (U+1202)? In that case,  
>> the only way I can think of to achieve the desired effect, is to  
>> force the initial-page-number property of the page-sequence to 1103.
>
> Sorry, that will not work after all, since the first page-number  
> will be the sequence 1-1-0-3, which will be rendered as four  
> separate glyphs...

Checked a little closer in the meantime, and the story is that FOP  
appears to be not 100% compliant where it comes to the 'format'  
property (which I presume is being set by the posted Docbook source).  
So our compliance page needs a little update to reflect this (unless  
somebody figures out the fix for this real soon).

I'll see if I can take care of that one of these days.


Andreas (just back from NYC, and somewhat jet-lagged...)


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


Re: Changing page numbers into their Dingbat counterparts

Posted by Andreas Delmelle <an...@telenet.be>.
On Oct 13, 2008, at 14:31, Andreas Delmelle wrote:

> Am I correct in assuming that you actually want the CIRCLED DIGIT  
> ONE (= U+1103) up to CIRCLED NUMBER TEN (U+1202)? In that case, the  
> only way I can think of to achieve the desired effect, is to force  
> the initial-page-number property of the page-sequence to 1103.

Sorry, that will not work after all, since the first page-number will  
be the sequence 1-1-0-3, which will be rendered as four separate  
glyphs...

Andreas

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


Re: Changing page numbers into their Dingbat counterparts

Posted by Andreas Delmelle <an...@telenet.be>.
On Oct 13, 2008, at 13:45, nancy_b wrote:

Hi Nancy,

> I did it as you described, defined the page number as:
> <fo:wrapper font-family="ZapfDingbats"><fo:page-number/></fo:wrapper>
>
> But unfortunately, instead of a number, a scissors symbol appears. Any
> ideas, guys?

That is expected behavior.
What you're telling FOP to do here is:
- generate a page-number character, say '4', or U+0004
- render that character in the Zapf Dingbats font

Looking at the glyph catalog for this font, for page-numbers 4 to 7,  
you would get scissors.
For the page-numbers 0 to 3, you should get '#', since there are no  
glyphs in this font. For 8 you will get BLACK TELEPHONE, etc.

Am I correct in assuming that you actually want the CIRCLED DIGIT ONE  
(= U+1103) up to CIRCLED NUMBER TEN (U+1202)? In that case, the only  
way I can think of to achieve the desired effect, is to force the  
initial-page-number property of the page-sequence to 1103. Obviously,  
this will only work for page-sequences guaranteed to have less than  
ten pages. Not sure how to customize docbook to set that property,  
though...


HTH!

Cheers

Andreas

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


Re: Changing page numbers into their Dingbat counterparts

Posted by nancy_b <na...@yahoo.com>.
Hello my friends,

I did it as you described, defined the page number as:
<fo:wrapper font-family="ZapfDingbats"><fo:page-number/></fo:wrapper>

But unfortunately, instead of a number, a scissors symbol appears. Any
ideas, guys?

Thanks in advance!
Nancy


Andreas Delmelle-2 wrote:
> 
> On Oct 13, 2008, at 09:14, Pascal Sancho wrote:
> 
>>>
>>> -----Message d'origine-----
>>> De : nancy_b [mailto:nancy_brndt@yahoo.com]
>>> Envoyé : samedi 11 octobre 2008 22:13
>>>
>>> Hi guys,
>>> I am using FOP 0.94.
>>>
>>> My current hot issue is changing the page number format. I
>>> would like to change the regular numbers to their Dingbat  
>>> counterparts.
>>> For example, I would like to change 1 to this number in a white/black
>>> circle, which is in Unicode is &x#2780;.
> <snip />
>>>
>>> But it does not work. Does FOP support the Dingbat numbers?
>>>
>>
>> You should explicitely set the font-familly property to  
>> 'ZapfDingbats', either for the surrending FO,
> <snip />
> 
> Interesting note: this is no longer necessary in FOP Trunk, which  
> offers support for automatic font-selection, based on the Unicode  
> codepoint. The default font-family is set to something like "serif,  
> Symbol, ZapfDingbats", and so if you don't specify any font-family,  
> the right one will be chosen at runtime.
> 
> 
> Cheers
> 
> Andreas
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
> For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/Changing-page-numbers-into-their-Dingbat-counterparts-tp19936055p19953337.html
Sent from the FOP - Users mailing list archive at Nabble.com.


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