Skip to content

Backtick/backquote makes ligatures with letters for both sans and mono #456

Description

@evolbug

Problem description
The backtick character combines with other letters, with up to 2 backtics being merged together.
e.g. a` b``

Expected behavior
Backticks do not make a ligature with letters, or at least not for mono font

Screenshots
One, two and three backtics displayed alone and with letters respectively
image

Environment (please complete the following information):

  • OS: Linux
  • Browser: Firefox 87, Chromium 89.0.4389.90, VSCode 1.54.3
  • Fonts: 1.077

Activity

  1. benkiel commented on Mar 29, 2021

    @benkiel
    Collaborator

    @arrowtype backtick is the grave accent. Fix would be to change the ccmp feature to not replace the "dead marks" (i.e., non combining accents, legacy of ascii) with the combining marks, perhaps only the grave. You'll loose combining accents when folks have a text stream or type a non-combining accent however. There isn't a perfect solution to this.

  2. arrowtype commented on Mar 30, 2021

    @arrowtype
    Owner

    Thanks for reporting this, @evolbug, and thanks for pointing out the specific cause, @benkiel!

    I imagine that the ASCII (non-combining) accents also include the ascii circumflex, and I wonder if that might be disrupting the ^ for exponents, etc... I'll need to test this.

    I will try to correct this ASAP, and get a new release out soon! Probably by Friday. Will update when possible.

  3. arrowtype commented on Mar 31, 2021

    @arrowtype
    Owner

    I imagine that the ASCII (non-combining) accents also include the ascii circumflex, and I wonder if that might be disrupting the ^ for exponents, etc... I'll need to test this.

    Never mind – I’ve realized/remembered that when I type ^ or ~ on my keyboard, it goes to glyphs asciicircum (U+005E) and asciitilde (U+007E), whereas the backtick key goes plain old grave (U+0060). Some accidents of history there, I guess.

    My first thought is to remove the "dead mark" substitution entirely, as this seems to match behavior of the Mac system font, SF Pro, as well as Roboto and Source Sans (and in a few code fonts I’ve tested). This is definitely a nice feature in some sense, but I do worry that it might cause new problems if all dead marks were support except for the grave. In particular, because Recursive has code in mind as a key use case, I could see this coming up. I doubt code languages would use marks like the acute that aren’t easy to access on a typical ANSI keyboard, but maybe it could come up where a user wants to show the dead marks (e.g. if I wrote a blog post about legacy accent marks vs combining accent marks).

    I think I have solved this using @benkiel’s suggestion (thank you!), with diffs shown at 6a8d3c7

    image

    You'll lose combining accents when folks have a text stream

    I am pretty ignorant of this area, but don’t want to write it off before knowing if it might be a bigger issue than I realize. Is this a problem you have seen / had to solve for, before? Have the creators of fonts I’ve looked at decided it’s not as big an issue as accidental combinations (e.g. this issue), or have they somehow solved it in another way?

  4. arrowtype commented on Mar 31, 2021

    @arrowtype
    Owner

    Notes to self:

    The statics are failing to build, with some makeOTF error messages which repeat for every instance:

    makeotf [Note] Using features file at '/Users/stephennixon/type-repos/recursive/mastering/build/static/CFF/RecursiveSansCasualStatic/SemiBold/features'.
    makeotf [Note] setting the USE_TYPO_METRICS OS/2 fsSelection bit 7 from fontinfo keyword.
    makeotf [Note] setting the WEIGHT_WIDTH_SLOPE_ONLY OS/2 fsSelection bit 8 from fontinfo keyword.
    makeotf [Note] setting the OBLIQUE OS/2 fsSelection bit 9 from fontinfo keyword.
    makeotfexe [WARNING] <RecursiveSansCslSt-SemiBd> The feature file OS/2 overrides TypoAscender and TypoDescender do not sum to the font em-square.
    makeotfexe [FATAL] <RecursiveSansCslSt-SemiBd> Duplicate target glyph for single substitution in feature 'ccmp': caroncomb
    Error executing command 'makeotfexe -f /var/folders/x0/q5zt3sx15ssdz5mjcm9rgvh40000gn/T/tmpc595kpxp -o ../../../../../../fonts_1.078/Static_OTF/RecursiveSansCslSt-SemiBd.otf -r -shw -ff features -mf /Users/stephennixon/type-repos/recursive/mastering/build/static/CFF/FontMenuNameDB -gf ../../GlyphOrderAndAliasDB -osbOn 7 -osbOn 8 -osv 4'
    makeotf [Error] Failed to build output font file '../../../../../../fonts_1.078/Static_OTF/RecursiveSansCslSt-SemiBd.otf'.
    

    I think the core of this is makeotfexe [FATAL] <RecursiveSansCslSt-SemiBd> Duplicate target glyph for single substitution in feature 'ccmp': caroncomb.

    This isn’t as specific as I’d like it to be, but my guess is, this might be referring to the following lines:

        lookup caron {
            sub [l l.italic l.mono l.simple l.sans] [caron caroncomb]' by caronslovakcomb;
        } caron;
    

    ...mostly because there are no other references to simply caron in the ccmp.fea file. So, I’ll change that sub to the following (removing caron) and see what happeens...

    sub [l l.italic l.mono l.simple l.sans] caroncomb' by caronslovakcomb;
    

    But actually, in the features that are compiled for each style in the mastering/build/static/CFF/ directory, the caron doesn’t appear on its own. It is probably an unintended consequence of removing other class and substitutions. Trying the static prep again to see what changes, and may have to revise further.

  5. arrowtype commented on Mar 31, 2021

    @arrowtype
    Owner

    Okay, that seems to have done the trick! The statics are back to building well.

    image

    @evolbug if you might have a moment, would you maybe test this fix on your end? I don’t have a Linux setup that I can try it out on.

    The newest fonts are here: fix-backticks-issue-456/fonts/ArrowType-Recursive-1.078

    (I can’t upload the whole release as a zip to the issue, as there are so many styles/fonts in the project. 😅 But, if it’s a pain for you to download individual files, let me know what you were using, and I can send something over!)

  6. evolbug commented on Mar 31, 2021

    @evolbug
    Author

    @arrowtype I was using the statics from this Arch Linux package originally which is effectively just pulling the zip from releases.
    I downloaded the regular variants of Sans and Mono from Recursive_Desktop/separate_statics and the issue seems to be fixed in both!

  7. arrowtype commented on Mar 31, 2021

    @arrowtype
    Owner

    Awesome, thanks for the extra info, and thanks especially for checking the fixes! I appreciate your help in making Recursive better. 🙌

  8. arrowtype commented on Mar 31, 2021

    @arrowtype
    Owner

    Thanks also to @benkiel for helping point to the solution, here!

  9. arrowtype commented on Mar 31, 2021

    @arrowtype
    Owner
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions