Bulk change of ligature setting in fonts?

Get help using and writing Nisus Writer Pro macros.
Post Reply
NisusUser
Posts: 257
Joined: 2011-01-12 05:32:38

Bulk change of ligature setting in fonts?

Post by NisusUser » 2015-10-19 10:20:23

Background: I installed a new version of a font on my computer. I use this font all the time. Apparently one of the improvements of the new version is that it supports ligatures. I do not want the ligatures; in fact, I should not use them for most of my documents. The bad thing for me is that I've used this font in scores or hundreds of documents, and now when I open them, they have ligatures as in the attached image of "st" with ligature.

What's the best way to handle this? I see that NWP (2.1.2) has Format > Ligature, and under that there is the option to "Use None." That's what I'd like. But is there a way to do that for, say, all files in a folder (including sub-folders)? Or maybe I just need to have a macro selects all text in the document (main text and footnotes) and then applies "Use None." Then I guess I could put the macro in the menu bar and run it each time I open one of those files. Any advice (or macros) are welcome :)

And … in that same menu (Format > Ligature) there is "Use Default." Hmm. What's the default? Is there not some way I can change that? If so, that might solve my problem. Are the defaults set by the font? The OS? Something/someone else (like maybe the user)?

Thank you!
Attachments
st ligature.png
st ligature
st ligature.png (7.19 KiB) Viewed 6594 times

User avatar
martin
Official Nisus Person
Posts: 4288
Joined: 2002-07-11 17:14:10
Location: San Diego, CA
Contact:

Re: Bulk change of ligature setting in fonts?

Post by martin » 2015-10-19 15:16:33

NisusUser wrote:Or maybe I just need to have a macro selects all text in the document (main text and footnotes) and then applies "Use None." Then I guess I could put the macro in the menu bar and run it each time I open one of those files. Any advice (or macros) are welcome :)
Having a macro select all text your document and turn off ligatures is a simple way to achieve what you'd like. However, if you consistently use a Normal paragraph style in your documents, I'd recommend applying the "use none" ligature attribute to the style instead. A macro like this gets the job done:

Code: Select all

Menu ':View:Style Sheet'
Menu ':Format:Paragraph Style:Normal'
Menu ':Format:Ligature:Use None'
If you really want to have a macro go through a whole folder of documents, it's possible to automate that as well. Please let me know if you're interested in such a thing.
And … in that same menu (Format > Ligature) there is "Use Default." Hmm. What's the default? Is there not some way I can change that? If so, that might solve my problem. Are the defaults set by the font?
The defaults are indeed set by the font, so unfortunately that's not going to be a solution for you here, as it sounds like this font's change of heart introduced this problem to begin with!

User avatar
Elbrecht
Posts: 335
Joined: 2007-03-31 14:59:22
Location: Frankfurt, Germany

Re: Bulk change of ligature setting in fonts?

Post by Elbrecht » 2015-10-20 00:50:10

HI -

regarding ligatures - you can switch ligatures (if offered by a font) ON/OFF.
"Select All" in a document - FORMAT/FONT/SHOW TYPOGRAPHICAL PANEL – de/activate ligatures…

HE
MacBook Pro i5
SSD 840/850 Pro
macOS Sierra 10.12.6
Nisus Writer Pro 2.1.10

NisusUser
Posts: 257
Joined: 2011-01-12 05:32:38

Re: Bulk change of ligature setting in fonts?

Post by NisusUser » 2015-10-20 08:21:49

Elbrecht wrote:regarding ligatures - you can switch ligatures (if offered by a font) ON/OFF.
"Select All" in a document - FORMAT/FONT/SHOW TYPOGRAPHICAL PANEL – de/activate ligatures…
But when I do that I get a message saying, "Multiple fonts are currently selected". So it lets me do nothing. Is it that way for you, too, if you have more than one font in the document?

NisusUser
Posts: 257
Joined: 2011-01-12 05:32:38

Re: Bulk change of ligature setting in fonts?

Post by NisusUser » 2015-10-20 08:23:38

martin wrote: If you really want to have a macro go through a whole folder of documents, it's possible to automate that as well. Please let me know if you're interested in such a thing.
That may be the best thing to do. Should the macro specify which font? Seems based on the other comment here, that it's not normal / accepted to change all fonts at once, and I suppose there might be a case where you'd want another font to have ligatures.

Just thinking out loud here. I haven't tried the change of the normal template yet.

User avatar
Elbrecht
Posts: 335
Joined: 2007-03-31 14:59:22
Location: Frankfurt, Germany

Re: Bulk change of ligature setting in fonts?

Post by Elbrecht » 2015-10-20 09:16:41

HI –
But when I do that I get a message saying, "Multiple fonts are currently selected". So it lets me do nothing. Is it that way for you, too, if you have more than one font in the document?
yes ligatures are font related - not changing your text. There is just a mechanism to change normal "st" to "st ligature" – or not… Each different font offers different mechanism(s) or not – so each font is to be handled seperately.

Ligatures are for readability - mostly. Change only if not…

HE
MacBook Pro i5
SSD 840/850 Pro
macOS Sierra 10.12.6
Nisus Writer Pro 2.1.10

User avatar
martin
Official Nisus Person
Posts: 4288
Joined: 2002-07-11 17:14:10
Location: San Diego, CA
Contact:

Re: Bulk change of ligature setting in fonts?

Post by martin » 2015-10-20 10:01:17

NisusUser wrote:Should the macro specify which font? Seems based on the other comment here, that it's not normal / accepted to change all fonts at once, and I suppose there might be a case where you'd want another font to have ligatures.
The macro does not need to specify or know which font(s) are used in your documents. Ligatures can be disabled in a font neutral way via the "use none" ligature attribute.

The reason the typography panel doesn't work with multiple fonts is because each font can define its own set of distinct typographic features. For example, some fonts have proper small caps or unique glyph variants, while other fonts have no such features.

msebban
Posts: 28
Joined: 2012-08-12 17:00:17

Re: Bulk change of ligature setting in fonts?

Post by msebban » 2016-01-04 02:36:49

I want to use ligatures and kern only for special characters and not for the other. Is there a way in NWP to specify special ligatures only for some characters and not for the others. I tried to change ligatures kern but it goes on all the characters and i don't want that
Thank's for answer

User avatar
martin
Official Nisus Person
Posts: 4288
Joined: 2002-07-11 17:14:10
Location: San Diego, CA
Contact:

Re: Bulk change of ligature setting in fonts?

Post by martin » 2016-01-04 17:35:26

msebban wrote:Is there a way in NWP to specify special ligatures only for some characters and not for the others.
Sure, you can accomplish that using a macro. You'd have to run it any time your document changes, so the macro can update the ligature options and/or kerning. The macro wouldn't be very complicated. Basically you'd just want to find all these special characters and turn on ligatures.

As a simple example, let's suppose that you want to turn on ligatures for digits (0-9) and turn ligatures off for all other characters. The macro might look like this:

Code: Select all

Select All Document
Menu ':Format:Ligature:Use None'

Find All '[0123456789]', 'E'
Menu ':Format:Ligature:Use All'
If you want to change which characters are affected by the macro, just edit the characters between the square brackets. Please let me know if you have any questions.

msebban
Posts: 28
Joined: 2012-08-12 17:00:17

Re: Bulk change of ligature setting in fonts?

Post by msebban » 2016-01-04 18:10:32

good solution but indeed it's only for 4 characters that i want this special ligature for special characters of transliteration and i asked is there a simple way than running a macro each time i change the doc or at end of writing?

User avatar
martin
Official Nisus Person
Posts: 4288
Joined: 2002-07-11 17:14:10
Location: San Diego, CA
Contact:

Re: Bulk change of ligature setting in fonts?

Post by martin » 2016-01-04 19:13:08

If running a macro at the end of writing is inconvenient, how would you prefer to accomplish the task?

If you don't use these characters often, you could add a glossary expansion for them. In other words, instead of typing the character itself, you'd type some abbreviation that would expand to the appropriate character with the desired font options already applied.

msebban
Posts: 28
Joined: 2012-08-12 17:00:17

Re: Bulk change of ligature setting in fonts?

Post by msebban » 2016-01-05 00:15:22

i'm gonna try the macro
if not i need to find a way to build these characters with ligature insert them in a customize special characters palette
:)

NisusUser
Posts: 257
Joined: 2011-01-12 05:32:38

Re: Bulk change of ligature setting in fonts?

Post by NisusUser » 2016-01-24 22:09:26

I continue to struggle with ligatures. I'm using NWP 2.1.3. I save a document after having applied Ligatures > Use None to the entire text. When I re-open it, that setting is gone. Even putting "No ligatures" in the paragraph style doesn't seem to "stick." You must re-apply the paragraph style for it to remove the ligatures. I think at least part of the problem is with the font (it somehow has ligatures on by default), but I need to use this font. Ideas?

The font can be found here, if anyone else want to try it: http://vlkk.lt/palemonas

User avatar
Hamid
Posts: 732
Joined: 2007-01-17 03:25:42

Re: Bulk change of ligature setting in fonts?

Post by Hamid » 2016-01-25 00:30:08

You should uncheck ligatures from the Typography panel for your Normal style from the Format:Font:Show Typography Panel menu. Note that some text in Normal style with only Palemonas font applied must be selected for the font's typography options to be revealed.) Then redefine your Normal style from the selection. This will add the "Typography Options" to your Normal style in the Style Sheet.
Common Ligatures.png
Common Ligatures.png (36.49 KiB) Viewed 6009 times
Typography Options.png
Typography Options.png (20.48 KiB) Viewed 6009 times

NisusUser
Posts: 257
Joined: 2011-01-12 05:32:38

Re: Bulk change of ligature setting in fonts?

Post by NisusUser » 2016-01-25 03:29:41

Hamid wrote:You should uncheck ligatures from the Typography panel for your Normal style from the Format:Font:Show Typography Panel menu. Note that some text in Normal style with only Palemonas font applied must be selected for the font's typography options to be revealed.) Then redefine your Normal style from the selection. This will add the "Typography Options" to your Normal style in the Style Sheet.
Thank you, Hamid. This does seem to work. :)

Post Reply