Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Not a bug] Selectively disabling ligatures #35

Open
MarcinCiura opened this issue Jun 2, 2018 · 6 comments
Open

[Not a bug] Selectively disabling ligatures #35

MarcinCiura opened this issue Jun 2, 2018 · 6 comments
Assignees

Comments

@MarcinCiura
Copy link

I like the change to EB Garamond but the ubiquitous "st" ligature looks annoying in my Polish version. Since it took me a while to figure out how to disable it, I am leaving the snippet here in case anyone needs it, too.

\startluacode
  require( "selnolig" )
  function process_ligatures_wrapper(nodes,tail)
    process_ligatures(nodes,tail)
    return nodes
  end
  thirddata = thirddata or {}
  thirddata.ligatures = {}
  thirddata.ligatures.process_ligatures = process_ligatures_wrapper
  nodes.tasks.appendaction(
      "processors", "words", "thirddata.ligatures.process_ligatures" )
  suppress_liga( "st", "s|t" )
\stopluacode
@jemmybutton jemmybutton self-assigned this Jun 2, 2018
@jemmybutton
Copy link
Owner

jemmybutton commented Jun 2, 2018

That was a sloppy work on EB Garamond typescript on my part (i have used a wrong name in one place 8214d73#diff-b44801cabf4c040d727c2524313832c6R446 ). Now you can simply choose which opentype features you want to see, like this: 8214d73#diff-b44801cabf4c040d727c2524313832c6R419 'hlig', for example, is responsible for strange-looking Historical Ligatures, like ct and st. They are now all turned off (more reasonable ones, like fl, fi, etc, are still in place). If some of these ligatures are still needed, I'll try to implement that separately. Is that OK?

And thank you for the snippet! I might be useful in the future.

@MarcinCiura
Copy link
Author

Thank you for the quick reaction, Sergey! So this is why my attempts to set hlig=no made no difference.
Your solution looks good even though I kind of liked "ct" and italic "sk" and "sp". However, as I understand the specimen of EB Garamond (https://github.com/georgd/EB-Garamond/tree/master/specimen), dlig=yes was responsible only for the harmless "Th" ligature so I am not sure if it should be turned off.

@jemmybutton
Copy link
Owner

Sure, dlig=yes is ok, my mistake, i'll bring it back with the next commit. Would it be convenient for you if I put that typescript stuff in a separate file and \setupbodyfont ... in the beginning of each language version, so you can keep your own variant, that works best for Polish, safe, when everything else is updated? (and maybe, it makes sense to do different typescripts for English and Russian anyway).

@jemmybutton
Copy link
Owner

In newer versions of ConTeXt there seems to be a dedicated macro for blocking specific ligatures http://wiki.contextgarden.net/Ligatures#Blocking
It doesn't work on my distribution, though, but in the future this may become the easiest solution.

@MarcinCiura
Copy link
Author

Hi, Sergey. Regarding the moving of \setupbodyfont: thank you for proposing this idea. It would help me if not only \setupbodyfont but also the commands for paper size and layout were separate for each language version. I probably will keep the B5 format and 11-point font.

@jemmybutton
Copy link
Owner

Hi, Marcin. Typescript is now in a separate file, and size, layout and font declarations are now moved to main book file 43d14d0#diff-ce29b5befc0686b45157d97a74d17263R1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants