Settings for Languages other than English?

Having trouble installing Oxygen? Got a bug to report? Post it all here.
ehill
Posts: 27
Joined: Mon May 24, 2010 5:01 pm

Settings for Languages other than English?

Post by ehill »

I received files back in Bulgarian and after I create the PDF, the font doesn't show up. The translation company suggested maybe there was a setting that needs to be tweaked for this Cyrillic font. Is there something I need to do?
adrian
Posts: 2855
Joined: Tue May 17, 2005 4:01 pm

Re: Settings for Languages other than English?

Post by adrian »

Hello,

The problem is that the characters you use aren't supported by the default font used for the PDF. You have to use and embed in the PDF a font that supports these characters(Cyrillic).

There is a procedure in the Oxygen User Manual for setting a font for the PDF output generated with the Apache FOP transformation:

http://www.oxygenxml.com/doc/ug-oxygen/ ... uiltin-FOP

Let us know if you need additional help or information.

Regards,
Adrian

PS:
If you have multiple projects you may want to omit the base tag from the fopConfiguration.xml and instead use absolute URLs. e.g.

Code: Select all

<font metrics-url="file:/Project/fonts/Arialuni.xml"
embed-url="file:/Library/Fonts/Arialuni.ttf">
Adrian Buza
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com
ehill
Posts: 27
Joined: Mon May 24, 2010 5:01 pm

Re: Settings for Languages other than English?

Post by ehill »

Nothing I've done is working. I'm using XEP is that makes a difference.

Thanks!
adrian
Posts: 2855
Joined: Tue May 17, 2005 4:01 pm

Re: Settings for Languages other than English?

Post by adrian »

Hi,

If you're using XEP you can disregard my previous post, that only applies to Apache FOP.

To configure fonts in XEP look in the XEP User Guide:
http://www.renderx.com/reference.html#Configuring_Fonts
or look at this example:
http://www.sagehill.net/docbookxsl/AddF ... figFontXep

Regards,
Adrian
Adrian Buza
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com
ehill
Posts: 27
Joined: Mon May 24, 2010 5:01 pm

Re: Settings for Languages other than English?

Post by ehill »

Thank you. I found these instruction yesterday and tried following them several times. I'm sure it's something that's not coming together in my brain that prohibiting me from doing this. Also, I guessed on a lot of things that I didn't get from the instructions.

Here's what I did:
-copy and pasted ARIALUNI.TTF from the Windows location to C:\Program Files\Oxygen XML Author 11\plugins\XEP\fonts (this was a guess)

-In XEP Assistant:
Edited the "Base 14" fonts list to include "New Family" with the group "----" with the attributes: Base Path: file:/C:/Program Files/Oxygen XML Author 11/plugins/XEP/fonts/, embedded and subsetted are 'unspecified', font data is tff | ARIALUNI.TTF

-in xep.xml:
added <font-family name="New Family">
<font><font-data ttf="ARIALUNI.TTF"/></font>
</font-family>

What am I doing wrong?!
adrian
Posts: 2855
Joined: Tue May 17, 2005 4:01 pm

Re: Settings for Languages other than English?

Post by adrian »

Hi,

You're getting close, there is one more thing to set and that is the DocBook transformation fonts. It's a DocBook document, right?

Edit the Docbook to PDF transformation(Document -> Transformation -> Configure Transformation Scenario, Edit) and press the Parameters button. Look in the list and change the following parameters:

Code: Select all

body.font.family
title.font.family
monospace.font.family (optional)
It's best to also use the default font as a failsafe.
So in your case you should set them as follows:

Code: Select all

body.font.family New Family,serif
title.font.family New Family,sans-serif
Let me know if you are encountering further difficulties.

Regards,
Adrian

PS:
One more thing that I forgot to mention you have to specify embed="true" for the font-family or for the font-group of that font family.
Adrian Buza
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com
ehill
Posts: 27
Joined: Mon May 24, 2010 5:01 pm

Re: Settings for Languages other than English?

Post by ehill »

I haven't tried this yet, but no, it's a PDF document.

I'm sorry. I'm new to DITA and don't know all the info I needed to provide. I'm getting it...slowly.
adrian
Posts: 2855
Joined: Tue May 17, 2005 4:01 pm

Re: Settings for Languages other than English?

Post by adrian »

OK, so the input XML(that's what I was asking about) is DITA.

For DITA you need to edit the DITA Open Toolkit font mappings. The file you have to edit is [oxygen-installation-folder]/frameworks/dita/DITA-OT/demo/fo/cfg/fo/font-mappings.xml

To simply replace the used fonts with your font look for:

Code: Select all

<logical-font name="Sans">
<physical-font char-set="default">
<font-face>Helvetica</font-face>
</physical-font>
Replace "Helvetica" with your font family name, "New Family".

And in:

Code: Select all

<logical-font name="Serif">
<physical-font char-set="default">
<font-face>Times</font-face>
</physical-font>
Again, replace "Times" with your font family name, "New Family".

Let me know if this worked for you.

Regards,
Adrian
Adrian Buza
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com
ehill
Posts: 27
Joined: Mon May 24, 2010 5:01 pm

Re: Settings for Languages other than English?

Post by ehill »

Nope, I get a PDF with #### where the translated text (Bulgarian) should be.
adrian
Posts: 2855
Joined: Tue May 17, 2005 4:01 pm

Re: Settings for Languages other than English?

Post by adrian »

In the XEP configuration file(xep.xml) in my tests I've added something like this to the fonts section just before the "Sample configuration for Windows TrueType fonts" :

Code: Select all

<font-group>
<font-family name="Arialuni" embed="true">
<font>
<font-data ttf="arialuni.ttf"/>
</font>
</font-family>
</font-group>
Use a name without spaces, that might help. Also, adjust this accordingly in the 'font-mappings.xml' file.

Regards,
Adrian
Adrian Buza
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com
ehill
Posts: 27
Joined: Mon May 24, 2010 5:01 pm

Re: Settings for Languages other than English?

Post by ehill »

IT WORKED IT WORKED (I think). I'm going to send it to the translation company to see if it's Bulgarian, but I definitely have some text in there. YAY!

Thank you so much for your time and patience!
Post Reply