Skip to main content
Aratype
Known Participant
October 17, 2022
Answered

How to define a default font per language?

  • October 17, 2022
  • 2 replies
  • 967 views

I need to define a default font when I write in Arabicscript and other default font when I write in any Western Europe language script in the same sentence.

Is it easy to do that in InD like in Word?

Thanking you in advance.

AraType

This topic has been closed for replies.
Correct answer Barb Binder

Hi @Aratype:

 

You can set up a base paragraph style for each (and eventually child styles of each) in the Paragraph styles panel. Once you create both of the styles, you simply choose the correct style before you start typing (or after) to set the font and the language for spellcheck and hyphenation. When the languages changes mid-paragraph, you can do the same thing with character styles

 

~Barb

2 replies

Joel Cherney
Community Expert
Community Expert
October 18, 2022

I wouldn't say that it's as easy as is it in Word, but it's fairly easy. Word doesn't force you to use styles, but the easiest way to do this in ID requires fairly diligent use of paragraph styles. 

 

My default paragraph style for mostly Arabic text with occasional English words in it would have a font specified with Arabic support (e.g. Adobe Arabic, which I actually don't like or use but we both have access to it, right? 🙂 😞

 

 

But then I could make a character style for only Latin script letters (that probably has a Latin-script font and English langauge (applied), and apply it with a GREP style:

 

 

So, you can specify exactly which characters you want it to apply to with the regular expression in the "To Text:" field. The expression there only affects A through Z, but you might want one that also handles numerals, or quotation marks, or whatever.

 

There are plenty of ways to specify exactly which characters get your character style applied, including specifying ranges of Unicode values. If you don't know regular expressions, you can just come back to this thread with a request and I, or one of the many other forums regulars who use regex, can figure out how to write a query for you that captures all of your Latin-script without being too greedy.

 

You could do it in the other direction as well - a default English paragraph style that applied Arabic font, right-to-left behavior, and Arabic language to all text that was set in Arabic glyphs. If that is what you want, let me know and I'll post some more examples.

 

 

Aratype
AratypeAuthor
Known Participant
October 19, 2022

Many thanks, I believe this is the solution. However, when I applied it I got erors in the text:

In my GREP instructions, I put:

Joel Cherney
Community Expert
Community Expert
October 19, 2022

Thank you! Actually, I use the default font "Adobe Arabic‭"...
Also, I do not want to use digits from the Arabic font, I want to use them from the English font, but I see digits still using Arabic font...

Furthermore, all special characters, like (/%&, should use the English font. How can express them in GREP please?


The text in your sample is set in STIX Two Test. That's because the English character style is applied to the whole paragraph. If you turn it off, your regex works as intended, I think. 

Barb Binder
Community Expert
Barb BinderCommunity ExpertCorrect answer
Community Expert
October 17, 2022

Hi @Aratype:

 

You can set up a base paragraph style for each (and eventually child styles of each) in the Paragraph styles panel. Once you create both of the styles, you simply choose the correct style before you start typing (or after) to set the font and the language for spellcheck and hyphenation. When the languages changes mid-paragraph, you can do the same thing with character styles

 

~Barb

~Barb at Rocky Mountain Training
Aratype
AratypeAuthor
Known Participant
October 19, 2022

Thank you very much. I would like to analize your solution too in the light of GREP.