Home Forums DITA and XMetaL Discussion Plugin and RenderX: how to make them communicate? Reply To: Plugin and RenderX: how to make them communicate?

Fa

Reply to: Plugin and RenderX: how to make them communicate?

Thank you for your answer, Derek.

I thought I had managed to get it to work, but I just tested and it's not working as I thought it should.

In my commons-attrs.xsl file, I have my base font set as:

[code]
sans-serif
 
[/code]

Then I have applied that base font throughout the file using an __fo__root attribute set.

[code][/code]

Note that I had to use “sans-serif”, while I thought that “Sans” would have been the obvious choice, but it did not work, although they are listed as aliases in my font-mappings.xml (and “Sans” works for my xmfo plugin!!!)

[code]   
      Sans
   
[/code]

Using “Sans” reverts to using a serif font (I'm not sure which one and I have no idea where it gets it from).

Anyway, font-mappings.xml defines Sans (so sans-serif, too, if aliases work) as using Arial as default

[code]   
              Arial
     
….
         
[/code]

From what I understand (and I've been able to test that using the xmfo plugin XMetal Enhanced PDF via RenderX XEP), Arial here is only a “face”, you then point to the font files in the xep.xml file. In xep, I have Arial defined as follows:

[code]     
       
         
       

       
         
       

       
         
       

       
         
       

     

[/code]

and I replaced the first font file with a totally different font, which makes the change obvious in the output:

      [code]
       
         
       

       
         
       

       
         
       

       
         
       

     
[/code]

This works [u]with the xmfo plugin[/u], i.e. I see the Bauhaus font used wherever the regular sans (or sans-serif) font should be used when generating, but I see no change in my own plugin.

Another very odd thing is that, as stated above, in the xmfo plugin, I can use “Sans” and not “sans-serif”, and it is recognized, but as I said, my own plugin only recognizes “sans-serif”.

So to summarize, my plugin applies the correct font when I refer to “sans-serif”, but when I use “Sans” (which works for xmfo), it just falls back to to a serif font, and I don't know what that fall back mechanism is, neither where the said serif font is defined. And this is very annoying, because before I figure that out for default (US English) documents, I won't be able to get my other languages to work with different fonts (Chinese at the moment only shows hashtags ## instead of the Chinese glyphs, although Sans and Serif are both mapped in Font Mappings and xep to Chinese fonts).

I'm kind of short of ideas about what to do or try next, so I'd really appreciate a small nudge in the right direction. Ideas anyone?

And by the way, is there a way to know for sure that my plugin uses renderX? Where is the pdf renderer defined?

Thanks!
Fa

Reply

Products
Downloads
Support