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:
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
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
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?
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.
Copy link to clipboard
Copied
Can you show all the features by screenshots or video?
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.
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?
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?
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?
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.
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?
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 )
Copy link to clipboard
Copied