Change the font for the Chapter title in the pdf output

Oxygen general issues.
BogdanM777
Posts: 68
Joined: Tue Jun 09, 2015 6:26 pm
Location: Canada

Change the font for the Chapter title in the pdf output

Post by BogdanM777 »

Hi,
I managed to have everywhere in my pdf output the Verdana font, less the Chapters titles and the mini TOCs at the beginning of each chapter.
Does anybody know which are the files in the DITA-OT that need to be modified for that purpose?
Also, right now it looks right, however there might appear the necessity to get rid of the mini TOCs at the beginning of the chapter.
Has anybody any idea which are the files to be modified in DITA-OT?
I think I will have to buy myself the DITA for Printing book, however till I get it, it would be awesome to know these things.
Thank you very much. :)
BogdanM777
Posts: 68
Joined: Tue Jun 09, 2015 6:26 pm
Location: Canada

Re: Change the font for the Chapter title in the pdf output

Post by BogdanM777 »

Sorry,
I forgot to check the "Notify me when a reply is posted" checkbox again.
bogdan_cercelaru
Posts: 222
Joined: Tue Jul 01, 2014 11:48 am

Re: Change the font for the Chapter title in the pdf output

Post by bogdan_cercelaru »

You can change the default fonts by editing the OXYGEN_INSTALL_DIR\frameworks\dita\DITA-OT\plugins\org.dita.pdf2\cfg\fo\font-mappings.xml file. Edit char-set="default" font-face and add Verdana as the first option for the logical-font name="Sans" (for headers) and name="Serif" (for body).
You can find more details in our userguide: Author for DITA / Transforming DITA Maps and Topics / Set a Font for PDF Output Generated with Apache FOP
Also, right now it looks right, however there might appear the necessity to get rid of the mini TOCs at the beginning of the chapter.
Set args.chapter.layout parameter to BASIC. This parameter is available in the Configure Transformation Scenario -> Edit DITA Scenario dialog of the DITA Map PDF transformation scenario.

Let me know if you need further assistance.

Regards,
Bogdan
Bogdan Cercelaru
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com
BogdanM777
Posts: 68
Joined: Tue Jun 09, 2015 6:26 pm
Location: Canada

Re: Change the font for the Chapter title in the pdf output

Post by BogdanM777 »

Thank you very much Bogdan,
I already entered Verdana as font in font_mappings.xml, so right now I have it available.
I managed to have the TOC entries also in Verdana, as at the beginning they were in sans serif, I think...
Right now, the only part that remained in another font are the Chapter headers, you know at the beginning of each chapter where it says "Chapter #" it is in another font than Verdana. That font I would like to change, wherever it is possible, as Verdana is right now available for me.
I wanted to send you a screen shot to make things more clear, however I did not find where I could attach a picture...
BogdanM777
Posts: 68
Joined: Tue Jun 09, 2015 6:26 pm
Location: Canada

Re: Change the font for the Chapter title in the pdf output

Post by BogdanM777 »

Also, as I was looking right now through the content of each topic, I found out that the title of the topic is Verdana, however the paragraphs are another font (I think it is Sans Serif).
So I would need to change that one as well.
Thank you.
BogdanM777
Posts: 68
Joined: Tue Jun 09, 2015 6:26 pm
Location: Canada

Re: Change the font for the Chapter title in the pdf output

Post by BogdanM777 »

I think that finally I understood what you meant in your previous response Bogdan.
I am sorry for my stupidity. I am just a beginner.
I managed to do the changes you suggested, and now I have everywhere Verdana.
You are the best! Thank you!
Only one thought, when I do those changes to the DITA-OT files, are they not reflected in the fonts and colours I see in the editor, like in any wyziwyg editor?
bogdan_cercelaru
Posts: 222
Joined: Tue Jul 01, 2014 11:48 am

Re: Change the font for the Chapter title in the pdf output

Post by bogdan_cercelaru »

BogdanM777 wrote:Only one thought, when I do those changes to the DITA-OT files, are they not reflected in the fonts and colours I see in the editor, like in any wyziwyg editor?
No, they are not. Oxygen is WYSIWYM (What you see is what you mean) and not WYSIWYG, it doesn't perfectly mimic the intended published output, just preserve its meaning. That's the reason you can style how your document will be rendered during editing in Author mode while having a different style for each published output.

Regards,
Bogdan
Bogdan Cercelaru
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com
BogdanM777
Posts: 68
Joined: Tue Jun 09, 2015 6:26 pm
Location: Canada

Re: Change the font for the Chapter title in the pdf output

Post by BogdanM777 »

Thank you Bogdan.
I got it.
Thank you for your support so far, you are awesome! :D
BSmith
Posts: 1
Joined: Tue Feb 16, 2016 3:07 pm

Re: Change the font for the Chapter title in the pdf output

Post by BSmith »

bogdan_cercelaru wrote:You can change the default fonts by editing the OXYGEN_INSTALL_DIR\frameworks\dita\DITA-OT\plugins\org.dita.pdf2\cfg\fo\font-mappings.xml file. Edit char-set="default" font-face and add Verdana as the first option for the logical-font name="Sans" (for headers) and name="Serif" (for body). gold
You can find more details in our userguide: Author for DITA / Transforming DITA Maps and Topics / Set a Font for PDF Output Generated with Apache FOP
Also, right now it looks right, however there might appear the necessity to get rid of the mini TOCs at the beginning of the chapter.
Set args.chapter.layout parameter to BASIC. This parameter is available in the Configure Transformation Scenario -> Edit DITA Scenario dialog of the DITA Map PDF transformation scenario.

Let me know if you need further assistance.

Regards,
Bogdan
Cool, got it. How do we go about using new fonts though? I've made a few of my own fonts that I created myself. Is there a way I can use my own as the default?
Last edited by BSmith on Wed Dec 07, 2016 2:50 pm, edited 1 time in total.
bogdan_cercelaru
Posts: 222
Joined: Tue Jul 01, 2014 11:48 am

Re: Change the font for the Chapter title in the pdf output

Post by bogdan_cercelaru »

Hello,

If your custom font is installed on your operating system, following the steps described in the user guide, and specifying the custom font should work and the resulted PDF should use your font.
Here is the procedure from our usermanual: Author for DITA / Transforming DITA Maps and Topics / Set a Font for PDF Output Generated with Apache FOP

Regards,
Bogdan
Bogdan Cercelaru
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com
JohnToll
Posts: 1
Joined: Tue Jul 31, 2018 5:15 pm
Contact:

Re: Change the font for the Chapter title in the pdf output

Post by JohnToll »

bogdan_cercelaru wrote:Hello,

If your custom font is installed on your operating system, following the steps described in the user guide, and specifying the custom font should work and the resulted PDF should use your font.
Here is the procedure from our usermanual: Author for DITA / Transforming DITA Maps and Topics / Set a Font for PDF Output Generated with Apache FOP

Regards,
Bogdan
Thank you so much for the user manual link. Was looking a way to change the default font. Glad found this thread before creating a thread asking for help.
Post Reply