Jump to content
You must now use your email address to sign in [click for more info] ×

Hyphenation - change auto-hyphen to something else?


Recommended Posts

Hi all,

I've been using Affinity products for a few years as a hobbyist, so it's been going pretty well. In Publisher, I have auto-hyphenation enabled for my paragraph, but the font I am using has a distinct non-breaking hyphen (U2011) glyph that looks like two hyphens instead of a typical single hyphen. Besides this issue, I do like the font, so I am wondering if there's any way I can have auto-hyphenation use a different character instead of the non-breaking hyphen.

Here's an example of what it currently looks like.

image.png.026a071b50b3ccd5f1fb7322ad92373e.png

Edited by sicnarf
Link to comment
Share on other sites

Welcome to the Serif Affinity Forums, @sicnarf. :)

Thank you for a very interesting first post. I’m more than a little surprised to learn that Affinity Publisher uses a non-breaking hyphen for its auto-hyphenation, since that’s not what the character is for! Rather than being a hyphen, it’s meant to be a command not to hyphenate: when placed in front of a group of characters, it normally ensures that they are kept together on the same line. As such, I would expect it to be a non-printing character.

What is the name of the font that you’re using?

Alfred spacer.png
Affinity Designer/Photo/Publisher 2 for Windows • Windows 10 Home/Pro
Affinity Designer/Photo/Publisher 2 for iPad • iPadOS 17.3.1 (iPad 7th gen)

Link to comment
Share on other sites

Thanks for the further info, Francis. Speaking of further info, the more I read the more confused I get! I’ve found a page that describes U+2010 as ‘unambiguously a hyphen character’ and U+2011 as ‘as hyphen (U+2010), but not an allowed line break point’. This is more in line with what I expected from the name ‘non-breaking hyphen’ (cf. ‘non-breaking space’); it looks — or should look! — the same but behaves differently. It seems that some software uses the ‘soft’ or discretionary hyphen at U+00AD in the manner I described earlier, forcing a group of characters to stay together when the hyphen is placed in front of them (in which scenario it would, of course, be non-printing).

Alfred spacer.png
Affinity Designer/Photo/Publisher 2 for Windows • Windows 10 Home/Pro
Affinity Designer/Photo/Publisher 2 for iPad • iPadOS 17.3.1 (iPad 7th gen)

Link to comment
Share on other sites

3 hours ago, Alfred said:

It seems that some software uses the ‘soft’ or discretionary hyphen at U+00AD in the manner I described earlier, forcing a group of characters to stay together when the hyphen is placed in front of them (in which scenario it would, of course, be non-printing).

A soft hyphen in the middle of a word is a user-suggested hyphenation point. It will be invisible in the final text if it is not used for actual hyphenation.

Additionally in Publisher, a soft hyphen can be added at the beginning of a word, where it would be otherwise meaningless, to mean "do not hyphenate this word".

 

-- Walt
Designer, Photo, and Publisher V1 and V2 at latest retail and beta releases
PC:
    Desktop:  Windows 11 Pro, version 23H2, 64GB memory, AMD Ryzen 9 5900 12-Core @ 3.00 GHz, NVIDIA GeForce RTX 3090 

    Laptop:  Windows 11 Pro, version 23H2, 32GB memory, Intel Core i7-10750H @ 2.60GHz, Intel UHD Graphics Comet Lake GT2 and NVIDIA GeForce RTX 3070 Laptop GPU.
iPad:  iPad Pro M1, 12.9": iPadOS 17.3, Apple Pencil 2, Magic Keyboard 
Mac:  2023 M2 MacBook Air 15", 16GB memory, macOS Sonoma 14.3

Link to comment
Share on other sites

This font works without problems (is hyphenated without double hyphens) in InDesign and QuarkXpress [or even Microsoft Word]. It seems to be typographically pretty ambitious font so it might do some things in a bit "advanced" way. @LibreTraining @MikeW -- any idea?

UPDATE:

The font has "non-regular" hyphens:

oddhyphen01.jpg.023faadac498cf23fd2119f1c507e629.jpg

...compared to e.g. Times New Roman:

oddhyphen02.jpg.c53de625f31a7bc75c29b77ee957d489.jpg

...but hyphenation is regular in InDesign and QuarkXpress:

hyphenation_id.jpg.ce87341765a892038ebf9a11e3db5bf6.jpg

hyphenation_qxp.jpg.3dc51438982ccb8db0775c043a6d3ec3.jpg

[Double hyphens do not show even when using discretionary hyphens, either to force a hyphenation spot, or prevent hyphenation.]

 

 

Link to comment
Share on other sites

1 hour ago, Lagarto said:

This font works without problems (is hyphenated without double hyphens) in InDesign and QuarkXpress [or even Microsoft Word]. It seems to be typographically pretty ambitious font so it might do some things in a bit "advanced" way. @LibreTraining @MikeW -- any idea? ...

Dunno what Affinity applications choose or why. That codepoint (uni2010) is easily chosen doing web-work, though.

With a quick scan of the font's code, it isn't doing anything "cute" with the hyphens (or much of anything else, really).

Link to comment
Share on other sites

Have your checked to see what Stylistic Set was being used?

Mac Pro (Late 2013) Mac OS 12.7.2 
Affinity Designer 2.3.1 | Affinity Photo 2.3.1 | Affinity Publisher 2.3.1 | Beta versions as they appear.

I have never mastered color management, period, so I cannot help with that.

Link to comment
Share on other sites

I also see the -- character being used with that font, even in an exported PDF, but when I copy the text and look at its hex coding, it is U+2010 which is just a Unicode hyphen. It's distinct from a keyboard hyphen/minus (U+002D) but is, I believe, a nominally correct character to use.

-- Walt
Designer, Photo, and Publisher V1 and V2 at latest retail and beta releases
PC:
    Desktop:  Windows 11 Pro, version 23H2, 64GB memory, AMD Ryzen 9 5900 12-Core @ 3.00 GHz, NVIDIA GeForce RTX 3090 

    Laptop:  Windows 11 Pro, version 23H2, 32GB memory, Intel Core i7-10750H @ 2.60GHz, Intel UHD Graphics Comet Lake GT2 and NVIDIA GeForce RTX 3070 Laptop GPU.
iPad:  iPad Pro M1, 12.9": iPadOS 17.3, Apple Pencil 2, Magic Keyboard 
Mac:  2023 M2 MacBook Air 15", 16GB memory, macOS Sonoma 14.3

Link to comment
Share on other sites

I appreciate all the info in this thread.

1 hour ago, Old Bruce said:

Have your checked to see what Stylistic Set was being used?

Yes, I've tried all combinations of Stylistic Sets, and that does not change the hyphenation in Publisher.

 

Link to comment
Share on other sites

5 hours ago, Old Bruce said:

Have your checked to see what Stylistic Set was being used?

No stylistic sets or alternates used here, and when used, none of them remove the use of double hyphen. As mentioned, the code used is Unicode hyphen which is double hyphen "--" in this font, but Affinity apps are the only ones I have tested (so far [EDIT: Xara Designer Pro and CorelDRAW 2017 + Pages + LibreOffice Writer now tested, as well]) that use it for hyphenation.

Link to comment
Share on other sites

1 hour ago, Lagarto said:

but Affinity apps are the only ones I have tested  that use it for hyphenation.

Perhaps they are, but it's a correct character to use, and arguably, it's a better character than the other one (U+002D) because it is unambiguously a hyphen.

-- Walt
Designer, Photo, and Publisher V1 and V2 at latest retail and beta releases
PC:
    Desktop:  Windows 11 Pro, version 23H2, 64GB memory, AMD Ryzen 9 5900 12-Core @ 3.00 GHz, NVIDIA GeForce RTX 3090 

    Laptop:  Windows 11 Pro, version 23H2, 32GB memory, Intel Core i7-10750H @ 2.60GHz, Intel UHD Graphics Comet Lake GT2 and NVIDIA GeForce RTX 3070 Laptop GPU.
iPad:  iPad Pro M1, 12.9": iPadOS 17.3, Apple Pencil 2, Magic Keyboard 
Mac:  2023 M2 MacBook Air 15", 16GB memory, macOS Sonoma 14.3

Link to comment
Share on other sites

48 minutes ago, walt.farrell said:

Perhaps they are, but it's a correct character to use

Affinity's solution may be completely valid, but it just produces erroneous results (while the competition does not). So it might be a "non-standard" method of rendering hyphenation. But there is probably something idiosyncratic also in this font.

Link to comment
Share on other sites

4 minutes ago, Lagarto said:

But there is probably something idiosyncratic also in this font.

That's where I would place most of the blame.

-- Walt
Designer, Photo, and Publisher V1 and V2 at latest retail and beta releases
PC:
    Desktop:  Windows 11 Pro, version 23H2, 64GB memory, AMD Ryzen 9 5900 12-Core @ 3.00 GHz, NVIDIA GeForce RTX 3090 

    Laptop:  Windows 11 Pro, version 23H2, 32GB memory, Intel Core i7-10750H @ 2.60GHz, Intel UHD Graphics Comet Lake GT2 and NVIDIA GeForce RTX 3070 Laptop GPU.
iPad:  iPad Pro M1, 12.9": iPadOS 17.3, Apple Pencil 2, Magic Keyboard 
Mac:  2023 M2 MacBook Air 15", 16GB memory, macOS Sonoma 14.3

Link to comment
Share on other sites

So it doesn't look like there's an immediate solution to my problem then. It seems these are my options:

  • Hope Affinity is updated to change how it handles auto-hyphenation.
  • Switch to any other publishing software.
  • Use a different font.
  • Modify the font? (Since it's using OFL.)
Link to comment
Share on other sites

35 minutes ago, sicnarf said:

So it doesn't look like there's an immediate solution to my problem then. It seems these are my options:

  • Hope Affinity is updated to change how it handles auto-hyphenation.
  • Switch to any other publishing software.
  • Use a different font.
  • Modify the font? (Since it's using OFL.)

Seems like you like the font. Seeing how its licensing allows for modifications, that's what I would do.

Link to comment
Share on other sites

2 hours ago, Lagarto said:

 

fixed_hyphen.jpg.5d780c18cac7d88dfafc4bb8e7fa969f.jpg

...privately, without distributing it. If the license allows, you could probably find a free tool that can make the fix, or perhaps someone on the forum (understanding better the license related stuff) could help you making the modifications.

I see what you did there. 👀

OFL allows make modifications as you please, as long as your new font has a different name and is also released under the same license. So you can also distribute it.

Anyway, time to learn another new skill!

Link to comment
Share on other sites

43 minutes ago, sicnarf said:

OFL allows make modifications as you please, as long as your new font has a different name and is also released under the same license. So you can also distribute it.

The "different name" deal is when there is a "reserved font name" (RFN) in the OFL file.
The older non-pro version has a RFN, but the newer Pro version does not.
Google Fonts no longer accepts reserved font names in the fonts they host.
So you will only find it in some really old ones (like this one).

Took about a minute to paste the hyphenminus into the hyphen.

AndadaPro-Regular-modified-hyphen.zip

So give that a try.

Link to comment
Share on other sites

3 hours ago, LibreTraining said:

The "different name" deal is when there is a "reserved font name" (RFN) in the OFL file.
The older non-pro version has a RFN, but the newer Pro version does not.
Google Fonts no longer accepts reserved font names in the fonts they host.
So you will only find it in some really old ones (like this one).

Took about a minute to paste the hyphenminus into the hyphen.

AndadaPro-Regular-modified-hyphen.zip 85.62 kB · 1 download

So give that a try.

Good to know. And just tried it; just what I was looking for. Thanks!

I've downloaded FontForge and I'll be giving this a whirl.

Edited by sicnarf
Link to comment
Share on other sites

8 hours ago, walt.farrell said:

That's where I would place most of the blame.

I think the Wikipedia-article pretty much nails it:

https://en.wikipedia.org/wiki/Hyphen-minus

Quote

When a hyphen is called for, the hyphen-minus is a common choice as it is well known, easy to enter on keyboards, required by many data formats and computer languages, and much more likely to render correctly. Though the Unicode Standard states that the U+2010 hyphen is "preferred" over the hyphen-minus,[3] the Standard itself uses the hyphen-minus as its hyphen character.

 

Link to comment
Share on other sites

27 minutes ago, sicnarf said:

I've downloaded FontForge and I'll be giving this a whirl.

You should have no problems using it to copy paste hyphen-minus (which I called the regular hyphen glyph) glyph in place of the current Unicode hyphen (U+2010), keeping everything else unmodified. Personally I find the license, and practice to change and just recompile without leaving any explicit traces (e.g. note on change, change in font name, version number, anything...) odd and therefore would not distribute a modified font without some kind of a notice. So therefore I added "HF" (short for "hyphen fixed") in the font family name (note that if you do that, you should also rebuild other names; FontForge probably helps you in correct naming).

It would be nice to know why the original Unicode hyphen was doubled, perhaps it is related to the original design goal of this font, as, according to the font's web site, the font "was designed to be used in a specific bilingual context, Spanish and Guaraní (pre-hispanic) languages therefore the language is its design criteria."

Link to comment
Share on other sites

I created OpenTypePS version of the font (all sub styles) using the GitHub version https://github.com/huertatipografica/Andada-Pro:

As I renamed the font family to Andada Pro HF and included the original license and readme files (including a short notice on the modification), I suppose it is ok to distribute the font here. (If not, please notify and I'll remove the file.)

AndadaProHF_OpenType-PS.zip 

The fix that was made was copying the Hyphen-minus (U+002D) glyph over the Hyphen (U+2010): 

andada_hyphen.jpg.e3b3d251b5cd0a33e6d0a229575d9c11.jpgandada_unicodehyphen_replaced.jpg.57e08d7aa8a2df61b04e857c94a4a4b1.jpg

Link to comment
Share on other sites

1 hour ago, Lagarto said:

As I renamed the font family to Andada Pro HF and included the original license and readme files (including a short notice on the modification), I suppose it is ok to distribute the font here.

As @sicnarf has observed:

9 hours ago, sicnarf said:

OFL allows make modifications as you please, as long as your new font has a different name and is also released under the same license. So you can also distribute it.

 

Alfred spacer.png
Affinity Designer/Photo/Publisher 2 for Windows • Windows 10 Home/Pro
Affinity Designer/Photo/Publisher 2 for iPad • iPadOS 17.3.1 (iPad 7th gen)

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.