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

Script for enabling Harfbuzz workflow in InDesign

Adobe Employee ,
Jul 17, 2020 Jul 17, 2020

Copy link to clipboard

Copied

InDesign will use the legacy composer for Indic scripts by default. Please use the following instructions to enable the new Harfbuzz based workflow and test the new solution:

 

  1. Copy the below script to a new js file with name "HarfbuzzOverride.js":

 

To set Harfbuzz as the shaping engine for Latin & Indic script:
app.textPreferences.shapeIndicAndLatinWithHarbuzz = true;

Similarly, to set Lipika as the shaping engine for Latin & Indic script:
app.textPreferences.shapeIndicAndLatinWithHarbuzz = false;

 

2. Now place it the following location inside the InDesign root folder: ../Scripts/Scripts Panel

3. Launch InDesign.

4. Go to Windows> Utilities> Scripts

id.png

 

5. This will open the Scripts Panel. In case you do not HarfbuzzOverride.js in this panel, please review step-1 above. 

6. Double click on HarfbuzzOverride.js on the scripts panel. This will activate the Harfbuzz workflow.

 

We hope this workflow will help you! 

Let us know if you run into trouble.

 

Regards,

Sheena

 

TOPICS
Scripting

Views

7.4K

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 ,
Jul 20, 2020 Jul 20, 2020

Copy link to clipboard

Copied

That is excellent news for those needing advanced text shaping! Hopefully these 2 options will appear in the UI as well so it doesn't need a script, as not everybody will be confident in using it.

 

Can you elaborate a bit on the difference between InDesign'sbnative composer, Harfbuzz, and Lipika -- is the latter actually the 'normal' composer?

And am I correct assuming it's an application-wide setting, that is, it will be used for all new documents?

 

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
Adobe Employee ,
Jul 21, 2020 Jul 21, 2020

Copy link to clipboard

Copied

These options are not available in UI Yet, but yes they are being planned. Lipika is code name for shaping engine in Adobe world Ready Composer. So, the given option enables us to select Harfbuzz as a shaping engine that supports the latest indic shaping specs. Yes, this is an application-wide setting, it will affect all new documents & old documents opened in new builds.

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
Mentor ,
Jul 27, 2020 Jul 27, 2020

Copy link to clipboard

Copied

Can you show all the features by screenshots or video? 

 

 

Remember, never say you can't do something in InDesign, it's always just a question of finding the right workaround to get the job done. © David Blatner

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
Adobe Employee ,
Jul 28, 2020 Jul 28, 2020

Copy link to clipboard

Copied

Harfbuzz will enable v2 versions of shaping support for all Indic scripts, legacy Lipika shaper never supported v2 versions of shaping for Gujarati and Gurmukhi. In general, Harfbuzz got better shaping for Indic. Regarding Latin, Harfbuzz got better diacritic positioning support through mark-to-mark and mark-to-base. The script like Vietnamese will have better support, though we have not yet certified it for all languages, which is in progress. That's why it is still not an option in UI inside the application but you are free to try using the solution posted above. Thanks.

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
New Here ,
Sep 18, 2020 Sep 18, 2020

Copy link to clipboard

Copied

I was able to follow your steps up through 5. But when I doubleclick on HarfbuzzOverride.js nothing happens. Is there something else I need to do first?

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
Adobe Employee ,
Sep 18, 2020 Sep 18, 2020

Copy link to clipboard

Copied

Script after execution doesnot show any output. But it has set harfbuzz shaping for all languages for world ready composer. Have you tried composing text afterwards and you are not seeing any changes?

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
New Here ,
Sep 21, 2020 Sep 21, 2020

Copy link to clipboard

Copied

Thanks! You said "it has set harfbuzz shaping for all languages for world ready composer." I am trying it with Arabic script (which is not Indic). Is it supposed to work with Arabic? The normal InDesign shaper only supports characters encoded through Unicode 6.0. I was hoping with the harfbuzz shaping we could get support for all the characters in the Arabic script that have been encoded between Unicode 6.1 and 13.0. HarfBuzz certainly supports Arabic characters through Unicode 13.0.

 

So, for my hope it will work with Arabic, was that a faulty assumption?

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
Adobe Employee ,
Sep 21, 2020 Sep 21, 2020

Copy link to clipboard

Copied

No, your assumption was correct. I suggest, if it is not working for you then please report as bug. Thanks.

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
New Here ,
Oct 12, 2021 Oct 12, 2021

Copy link to clipboard

Copied

Is it possible to run this script on Illustrator? If yes, could you help me with how to do that?

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 ,
Oct 15, 2021 Oct 15, 2021

Copy link to clipboard

Copied

Hi yeshagoshar,

basically there is only one line of effective code.

 

Turning on the feature:

// To set Harfbuzz as the shaping engine for Latin & Indic script:
app.textPreferences.shapeIndicAndLatinWithHarbuzz = true;

 

Turning off the feature:

// Similarly, to set Lipika as the shaping engine for Latin & Indic script:
app.textPreferences.shapeIndicAndLatinWithHarbuzz = false;

 

ExtendScript DOM documentation for InDesign 2021 and 2020 says about shapeIndicAndLatinWithHarbuzz :

"If this bool is set to true, shaping of Indic & Latin characters will be done through Harfbuzz Shaping engine, instead of Lipika." ( Whatever that exactly means… )

 

This code works on InDesign 2021 and 2020 only!

Previous versions are not supported.

 

Adobe Illustrator is not supported at all. At least not with that code.

Better ask this in the Adobe Illustrator forum:

https://community.adobe.com/t5/illustrator/ct-p/ct-illustrator?page=1&sort=latest_replies&tabid=all

 

But I doubt there is a positive answer…

 

 

PS: FWIW, the title in this thread says "harfbuzz", but the property for ExtendScript is named shapeIndicAndLatinWithHarbuzz without an "f". Why is that?

https://www.indesignjs.de/extendscriptAPI/indesign-latest/#TextPreference.html

 

Regards,
Uwe Laubender

( ACP )

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
New Here ,
Apr 12, 2023 Apr 12, 2023

Copy link to clipboard

Copied

LATEST

fontdesigner_0-1681357850158.png

 

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