Change the font for the Chapter title in the pdf output

<oXygen/> general issues.
BogdanM777
Posts: 68
Location: Canada

Change the font for the Chapter title in the pdf output

Mon Jun 29, 2015 6:47 pm

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
Location: Canada

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

Mon Jun 29, 2015 6:48 pm

Sorry,
I forgot to check the "Notify me when a reply is posted" checkbox again.
bogdan_cercelaru
Posts: 204

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

Tue Jun 30, 2015 10:12 am

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
Location: Canada

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

Tue Jun 30, 2015 3:46 pm

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
Location: Canada

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

Tue Jun 30, 2015 3:57 pm

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
Location: Canada

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

Tue Jun 30, 2015 4:25 pm

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: 204

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

Fri Jul 03, 2015 2:34 pm

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
Location: Canada

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

Mon Jul 06, 2015 3:27 pm

Thank you Bogdan.
I got it.
Thank you for your support so far, you are awesome! :D
BSmith
Posts: 1

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

Wed Feb 17, 2016 2:45 pm

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: 204

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

Wed Feb 17, 2016 4:58 pm

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

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

Tue Jul 31, 2018 5:19 pm

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.

Return to “Other Issues”

Who is online

Users browsing this forum: No registered users and 1 guest