• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
10

InDesign Grep Style for Composite Fonts

Explorer ,
Jun 13, 2023 Jun 13, 2023

Copy link to clipboard

Copied

Hi,
Is it possible to use Grep Style to do composite fonts, the base is Chinese or Japanese and Latin and Number is DinPro? or

How to set a Grep Style if I type in latin letters A-Z or 1-10 and it automatic switch to DinPro font?

 

Thanks

TOPICS
Experiment , Feature request , How to , Scripting , Type

Views

2.8K

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 3 Correct answers

Community Expert , Jun 13, 2023 Jun 13, 2023

Hi @iampurple, I don't have any experience with what you are asking, but in case it helps, here is a little test I just did, that might be worth playing with. I set up a paragraph of chinese text with a grep style that targets specific latin characters and draws them in DIN cyan color.

 

The grep I used is this:

 

([A-Za-z0-9,;\.\?\!]+\s?)+

 

which isn't great, because it only targets the explicitly included characters, so you will have to add any other characters you want to target, such as hyp

...

Votes

Translate

Translate
Community Expert , Jun 13, 2023 Jun 13, 2023

Mark has pretty much nailed this already, but i will point out that i usually achieve the same effects by using regular expressions syntax to specify Unicode ranges. For example, "every glyph past basic ASCII" would be

 

[/x{0100}-/x{FFFF}]+

You can make a GREP style that applies to e.g. only Thai Unicode ranges. It can get complicated, as in the case of parentheses in CJK text that are not fullwidth, but it works quite well to capture All the Glyphs in a given writing system. 

Votes

Translate

Translate
Community Expert , Jun 13, 2023 Jun 13, 2023

That's the sort of thing I was looking for Joel! Thanks. Also, I notice that Indesign grep can understand \p{Punctuation} which is great, but not other unicode blocks, eg.  \p{Han}.

 

@iampurple you can implement the grep with Joel's method by changing the grep to something like:

([\x{0020}-\x{024F}]+\s?)+

(By the way, see unicode blocks here.)

 

You may still have to go more sophisticated with the grep though, if you don't want to match some things, for example Korean seems to use some latin pu

...

Votes

Translate

Translate
Explorer ,
Sep 14, 2024 Sep 14, 2024

Copy link to clipboard

Copied

Thanks so much for this very useful GREP!

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Sep 14, 2024 Sep 14, 2024

Copy link to clipboard

Copied

You're welcome!

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Oct 16, 2024 Oct 16, 2024

Copy link to clipboard

Copied

LATEST

Composite Fonts will soon have new features to be adapted to the most complex Arabic type... Stay tuned!

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines