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
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
...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.
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
...Copy link to clipboard
Copied
Thanks so much for this very useful GREP!
Copy link to clipboard
Copied
You're welcome!
Copy link to clipboard
Copied
Composite Fonts will soon have new features to be adapted to the most complex Arabic type... Stay tuned!