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.
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.
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.
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!)
Copy link to clipboard
Copied
I think you could envision IndyFont
Copy link to clipboard
Copied
Loic,
Yes. I have Marc's app. and will try.
Thanks for your time.
best regards.
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:
and then design new specific glyphs to be assigned, for example:
from which IndyFont will successfully distill the OTF font.
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 😞
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…
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:
Now we can design a specific glyph for our fake "swash hyphen":
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:
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:
Then, in MyPara style, add a GREP Style specified as follows:
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:
@+
Marc
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
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,
[By the way, all tests done in CC 2017 (12.0) / Win 7.]
Weird!
Best,
Marc
Copy link to clipboard
Copied
Are you sure it's the automatically-inserted discretionary hyphen that's being changed?
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
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
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
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:
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
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:
@+
Marc
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!
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.
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!
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.
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.
Copy link to clipboard
Copied
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