Expand my Community achievements bar.

Don’t miss the AEM Skill Exchange in SF on Nov 14—hear from industry leaders, learn best practices, and enhance your AEM strategy with practical tips.

How To Set Font Dynamically?

Avatar

Level 1

Hi,

I am developing this adobe in SAP and basically this is a bill printing. So the bill should be printed in what ever language the user selects. and there are three Indian languages (Hindi, Gujarati, Marathi) and the fourth one is English. so when they select Hindi lets assume the field GW_LANG = 'H', Similarly for Gujarati it returns 'G'. so based on what he selects, all the text in the form should be changes in to that language. we have a tool to convert the text in SAP but i am facing the problem while setting it in adobe form. what i observed is that if i don't set the font to Hindi Font(Mangal) or Gujarati Font(Shruti) it will not show the text. so i need to handle that dynamically using java script.

so right now i have written the below script. but its not working.Could some one help me on this?

if(data.subform.gw_lang.rawValue == "G")

{

data.subform.text.font.typeface = "Shruti";

}

Hindi Font Name - Mangal

Gujarati Font Name - Shruti

0 Replies