GithubHelp home page GithubHelp logo

rolanddreger / open-type-features Goto Github PK

View Code? Open in Web Editor NEW
56.0 11.0 2.0 1.01 MB

Testing the OpenType features of installed fonts in Adobe InDesign

License: MIT License

JavaScript 100.00%
opentype-fonts indesign-scripts adobe indesign

open-type-features's Introduction

OpenType features Dialog

The idea behind this script is to test the OpenType features of an installed font in InDesign - without flyouts, dropdowns, and the like.

basic_features

Some of the OpenType features are also not accessible from the English or German user interface of InDesign.1 Some features are only accessible via script.

Script usage

Download the script via CodeDownload ZIP

download_zip

Put the script into the script folder of InDesign and start it from the script panel via double click. By selecting a checkbox, the corresponding OpenType feature is enabled in the current selection of your document.

Here are some short short Video on how to use the »Basic Features«, the »Extended Features« and search for a font with specific OpenType features.

Selection

Insertion Point: If the insertion point is placed in a paragraph, the feature is enabled in the entire paragraph.

Text Frame: If a text frame is selected, the feature is enabled in its entire text content.

Text: If a range of text is selected, the feature is enabled in this text only.

Tab: Basic Features

All OpenType features in Tab »Basic Features« are also accessible via InDesign user interface (albeit deeply hidden in the panel menus ) and can be saved in a character style.

Different Values

If the current selection contains different values for the same OpenType feature, the background of the checkbox is highlighted in red. In the help text of the checkbox, this fact is pointed out again.

Different Availability

If the fonts contained in the selection have different availabilities for the same OpenType feature, the background of the checkbox is grayed out.

ALT + Click

If a checkbox is grayed out (Mode »enable«), it is possible to activate it with an ALT + click.

This is sometimes useful when values are assigned but this OpenType feature is not available for the font in the selection or this feature should be included in the character style.

Refresh UI

The user interface of the script is updated when the selection in the active document changes. If this is not done correctly, the update can be triggered by pressing the Refresh button.

Character Style

The selected features can be transferred to a character style. To do this, enter the desired name in the input field (bottom right) and click on the Character Style button.

Tab: Extended Features

The OpenType features on tab »Extended Features« can only be applied via script. Unfortunately, they cannot be saved in a character style.

Please note: The setting via »Extended features« tab has priority and overwrites the »Basic features«. Thus, in case of same functionality, assigning or removing a »Basic Feature« no longer has any effect.

extended_features

If more than one text style range is selected, they will be displayed in the right list separated by a blank line.

Legend for Type

  • Registry: Registered feature2 that cannot be assigned via the InDesign user interface.
  • InDesign: Feature that occurs only in InDesign
  • InDesign/Registry: Registered feature used in the same way in InDesign
  • InDesign+/Registry: Registered feature, but used differently in InDesign, e.g. as a combination of two features.

Filter

At the bottom of the tab there are two filters that can be used to limit the displayed features. Multiple tags are separated by spaces, e.g. hlig liga cv84

Change List Entry

By double-clicking on one of the entries in the list on the left, you can change the feature value (shown in the Value column). Only positive integers are allowed as values.

Apply Feature to Text

  1. Select the desired text in your document
  2. Mark one or more features in the list on the left
  3. Click on the Apply button

Hint: If you activate the button for style overrides in the paragraph style panel in the InDesign user interface, these text passages are highlighted in the normal document view.

style_overrides

Remove All Features

  1. Select the relevant text in document
  2. Click on the button Clear

Tab: Font Search

The »Font Search« tab can be used to search for fonts with specific OpenType features.

font_search

The list on the left shows the available features. After selecting one or more entries, the script analyzes all available fonts. The matching fonts are displayed in the list on the right.

Tab: Preferences

Shaping Engine

Set Lipika or Harfbuzz as the shaping engine for Latin and Indic script. If Harfbuzz is checked harfbuzz shaping is set for all languages for world ready composer.

This setting is used for the active document. After activation (only) the selected text will be recomposed. Available for InDesign 2020+.

Lipika is the name for default shaping engine in Adobe World Ready Composer. Harfbuzz as an alternative shaping engine supports the latest indic shaping specifications.3


Error Messages

Error messages are displayed in the title bar of the dialog.

Credits

Thanks for tips and discussion to Dirk Becker/IxtaTypeUI and Ken Lunde. And also a big thank you to @indiscripts and @dhinostroza for help with the translation.

Support

If you want to support the development of the script:

Donate

License

MIT

Footnotes

  1. To get full functionality for Japanese/CJK or Arabic OpenType features in InDesign, read this article.

  2. »OpenType Layout Tag Registry«, Microsoft, https://docs.microsoft.com/de-de/typography/opentype/spec/featurelist

  3. Script for enabling Harfbuzz workflow in InDesign

open-type-features's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

open-type-features's Issues

Add hlig + Character variant

Hi, Roland:
This can be very useful for me with a couple of additions. Namely, I need to be able to combine hlig (historical ligatures) + Character variant 83 2 and hlig + Character variant 84 2. Could you please add them to your script?
I can add Spanish to the dialogs (English, German, French), if you consider it useful.
Best regards,
Daniel

& does not have a value

Fehlermeldung (Win10/ID16.4)
"Fehlernummer: 23
Fehlerzeichenfolge: & does not have a value
Engine: main
Datei: C:\Users...\openTypeFeatures.jsx
Zeile: 125"

Can a Win10 user test the script to see if this error is reproducible?
Unfortunately I only have macOS available.

Line 125:

var _otfSwashCheckbox;

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.