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

It is possible to change (the size of) the discretionary hyphen?

Participant ,
Apr 19, 2017 Apr 19, 2017

Copy link to clipboard

Copied

Good morning.

We have a document typesetted in Stone serif that has a very small soft hyphen.

We would like to change these with a different one.

May be altering the font or applying some one coming from another family.

We tried to grep using the meta ~- but was no result.

Thanks.

TOPICS
Scripting

Views

2.5K

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 1 Correct answer

Community Expert , Apr 19, 2017 Apr 19, 2017

As you said, the only way to do this is to change the font. That change would go for the normal hyphen too I guess.

P.

Votes

Translate

Translate
Community Expert ,
Apr 19, 2017 Apr 19, 2017

Copy link to clipboard

Copied

As you said, the only way to do this is to change the font. That change would go for the normal hyphen too I guess.

P.

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
Participant ,
Apr 19, 2017 Apr 19, 2017

Copy link to clipboard

Copied

Peter, thanks.

The only way is just enough.

I will change the hyphen's length.

Thanks.

C.

(so incredible this point is impossible to remedy!)

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
People's Champ ,
Apr 19, 2017 Apr 19, 2017

Copy link to clipboard

Copied

I think you could envision IndyFont

Indiscripts :: InDesign Hidden Glyphs as a Typeface

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
Participant ,
Apr 19, 2017 Apr 19, 2017

Copy link to clipboard

Copied

Loic,

Yes. I have Marc's app. and will try.

Thanks for your time.

best regards.

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
Guide ,
Apr 20, 2017 Apr 20, 2017

Copy link to clipboard

Copied

Hi Camilo,

About the IndyFont side of the question, I will articulate my answer in two posts to make things as clear as possible.

FIRST PART

At its own level, IndyFont supports both SOFT HYPHEN (U+00AD) and NON-BREAKING HYPHEN (U+2011) as separate glyphs, distinct of the regular hyphen. You can indeed declare those characters:

IF-Hyphens01.png

and then design new specific glyphs to be assigned, for example:

IF-Hyphens02.png

from which IndyFont will successfully distill the OTF font.

IF-Hyphens03.png

So far so good!

But, restarting InDesign with the newly created font, you will then discover that the special glyphs aren't applied at all—while they are properly registered and shown in the Glyphs panel 😞

IF-Hyphens04.png

As far as I can explain, the reason is that InDesign always selects the glyph of the regular hyphen for both SOFT and NON-BREAKING special cases, even if dedicated glyphs are actually present in the font. That's clearly what illustrates the above screenshot, where you can see the regular hyphen (first line), the non-breaking hyphen (1), the soft hyphen (2) and the "automatic regular hyphen" (third line) all rendered the same way.

So, apparently, there is no chance to solve your issue in InDesign by academic means…

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
Guide ,
Apr 20, 2017 Apr 20, 2017

Copy link to clipboard

Copied

PART TWO

Now, let's go back to our font template and try another approach.

Since we know InDesign in fact ignores the glyph designed for the SOFT HYPHEN character (as well as for the NON-BREAKING one), the only option we have is to keep focused on the regular hyphen (U+002D). The good news is, we can assign alternate glyph(s) to it!

For example, a swash variant, using the /hyphen.swsh syntax:

Swash-Hyphens01.png

Now we can design a specific glyph for our fake "swash hyphen":

Swash-Hyphens02.png

As before, we distill the new resulting font and reload the test document. Let's suppose we have created a paragraph style MyPara based on our font. For the time being, all hyphens rely on the same glyph, the default one:

Swash-Hyphens03.png

The trick is now to create a character style, say Alt-Swash, whose sole purpose is to apply the "Swash Alternates" OpenType feature, as shown below:

Swash-Hyphens04.png

Then, in MyPara style, add a GREP Style specified as follows:

Swash-Hyphens05.png

What does it? It specifically assigns the Alt-Swash character style to the SOFT HYPHEN ("Discretionary Hyphen" in InDesign). Since the glyph actually used for the soft hyphen is the /hyphen glyph, a great thing happens: our custom swash variant /hyphen.swsh will be used as well through the GREP style assignment 🙂

Finally, we just have found a solution to get a custom soft hyphen in InDesign:

Swash-Hyphens06.png

@+

Marc

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
People's Champ ,
Apr 20, 2017 Apr 20, 2017

Copy link to clipboard

Copied

(I deleted my previous comment -- I didn't realize I was interrupting the flow!)

This sounds excellent!

What's surprising is that it is possible to apply a Grep style to a discretionary hyphen.

I created a character style that applied the colour red to text, and used a Grep style to apply it to all discretionary hyphens. Nothing happens! The red colour is not applied!

I don't have a font with a hyphen with a swash variant to test on, but it's strange that the character style should successfully be able to apply a swash variant but not a colour?

Still, if it does work, it's great!

Ariel

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
Guide ,
Apr 20, 2017 Apr 20, 2017

Copy link to clipboard

Copied

Hi Ariel,

Thanks.

Very interesting indeed. InDesign's discretionary hyphen is really a strange beast.

What to conclude from your test? I'm lost. Maybe those special characters, while available to GREP style captures, are set to automatically discard or bypass character attributes considered irrelevant in default rendering context (?)

However, I tested your idea on my previous example, changing the horizontal scale and even the color of the Alt-Swash style. And it worked fine as shown below,

Swash-Hyphens07.png

[By the way, all tests done in CC 2017 (12.0) / Win 7.]

Weird!

Best,

Marc

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
People's Champ ,
Apr 20, 2017 Apr 20, 2017

Copy link to clipboard

Copied

Are you sure it's the automatically-inserted discretionary hyphen that's being changed?

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
Guide ,
Apr 20, 2017 Apr 20, 2017

Copy link to clipboard

Copied

Are you sure it's the automatically-inserted discretionary hyphen that's being changed?

Hmm, I'm afraid we have a terminology problem.

What I call a discretionary hyphen is what InDesign refers to as the “Discretionary Hyphen” special character (also know as U+00AD SOFT HYPHEN in Unicode), which is an explicit character code, distinct from U+002D of course, but also distinct from the automatic hyphenation artifact. The latter is not a character in the strict sense, but a decoration generated by the composer when auto-hyphenation is turned on, and indeed this artifact is based on the regular hyphen glyph (U+002D) of the current font.

Maybe that's what you was referring to (?)

Sorry for the confusion if this was also the target meaning of the OP.

In such case, I think there is definitely no way to generate an automatic hyphen—let's call it so—distinct from the regular hyphen glyph of the font in use.

Best,

Marc

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
People's Champ ,
Apr 20, 2017 Apr 20, 2017

Copy link to clipboard

Copied

I'm with you now. Yes, there was the terminology confusion you mention, and I think your terminology is correct.

So, I take back my previous comment. The Grep style certainly does work with a discretionary hyphen, even if the character style is set to apply only a fill colour. So, nothing special about the swash property. Some sanity is restored!

However, I suspect (and this is certainly how I read it) the the OP was referring to what you call the "automatic hyphenation artifact."

That's something for Camilo to confirm, of course.

Ariel

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
People's Champ ,
Apr 20, 2017 Apr 20, 2017

Copy link to clipboard

Copied

PS If the OP does mean what I think he does, then I deleted my earlier comment too soon:

To get the automatic hyphen to be different, one could use IndiFont to change the shape of the regular font to whatever one wants the auto-hyphen to look like. And then replace all the regular hyphens in the document with a new glyph that would be identical in shape to the current normal hyphen.

If the document is meant for print, this would be fine, I think.

If for ePub, who knows what might happen!

And if it's meant for screen-reading as a PDF, it might not be such a good idea to mess around with glyphs in this way because of what it can do to accessibility.

However, for a normal print document, it should work fine...

Ariel

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
Guide ,
Apr 20, 2017 Apr 20, 2017

Copy link to clipboard

Copied

To get the automatic hyphen to be different, one could use IndiFont to change the shape of the regular font to whatever one wants the auto-hyphen to look like. And then replace all the regular hyphens in the document with a new glyph that would be identical in shape to the current normal hyphen.

Yep! Or even better, we could apply the “Swash Hyphen” trick to the regular hyphen itself, which avoids to change the semantic of the character 😉

PS. — Just to enlighten those who would still read us, here is how I summarize the discretionary vs. auto-hyphen topic:

SoftHyphen.png

Also, I have to mention that the image IF-Hyphens04.png (https://forums.adobe.com/servlet/JiveServlet/showImage/2-9468108-1185564/IF-Hyphens04.png) in one of my previous post shows some errors that could mislead the reader. Glyphs and hidden ID markers are not in line with the case I wanted to represent, as I made unfortunate mistakes while sorting my PS layers 😕

@+

Marc

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
Guide ,
Apr 20, 2017 Apr 20, 2017

Copy link to clipboard

Copied

(…)

And here is a successful test which seems to address the original question no matter the interpretation we may adopt:

Swash-Hyphens08.png

@+

Marc

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
People's Champ ,
Apr 21, 2017 Apr 21, 2017

Copy link to clipboard

Copied

Yep! Or even better, we could apply the “Swash Hyphen” trick to the regular hyphen itself, which avoids to change the semantic of the character 😉

Perfect!

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
Participant ,
Apr 21, 2017 Apr 21, 2017

Copy link to clipboard

Copied

Marc, Ariel.

it has been a tour de force!

I am really surprised for this splendid thread.

I will try immediately the swash trick to reform my soft hyphens.

Thanks for your time and dedication.

Now we have a solution and correct answer must be transfer to Marc.

The forum advisor perhaps may help us to do it...

The reader of this blog can get confused if it is admitted this problem had not solution.

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
Participant ,
Apr 21, 2017 Apr 21, 2017

Copy link to clipboard

Copied

Marc:

Your method works changing the soft hyphen!

I need to study what's wrong with the font but hyphens are changed!

Thanks!

marc2.jpg

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 ,
Apr 21, 2017 Apr 21, 2017

Copy link to clipboard

Copied

Camilo, always nice to see a new use of IndyFont!

It seems you applied your GREP style to all of your text, not just to the hyphens.

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
Participant ,
Apr 21, 2017 Apr 21, 2017

Copy link to clipboard

Copied

Hi Jong, Indyfont is a beloved child here!

I am checking although I am afraid I have a problem with the font...

(a mix of Type 1, Type XX, etc...)

Thanks for your post.

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
Guide ,
May 22, 2017 May 22, 2017

Copy link to clipboard

Copied

LATEST

Hi all,

Just to mention a full article is now dedicated to the present topic and should make things clearer.

Check it out here: Indiscripts :: Customize InDesign Hyphens with IndyFont

Best,

Marc

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