Skip to content

Baloo VFs have this quirk that affects hinting #7

Open

Description

@mahalisyarifuddin

Greetings.

Just noticed a problem in your rather great typeface and it's around this weird looking stems. Checked all the fonts: statics, VFs, other scripts, both from this very repo and GF, and turns out it only affects all VFs, and Latin is the most problematic one, also some Indic scripts. It appears that the VFs are using "separate pieces" as issue #6 put it. It's surely affects hinting in an ugly way, and that's not a good thing.

I'm talking about this (I'm using Windows 7 and Edge 107)

latn 400
latn 800

That's it.

Activity

  1. changed the title [-]Baloo VFs have this weird looking stems. Something to do with hinting?[/-] [+]Baloo VFs have this weird technical quirk that affects hinting[/+] on Oct 31, 2022
  2. changed the title [-]Baloo VFs have this weird technical quirk that affects hinting[/-] [+]Baloo VFs have this quirk that affects hinting[/+] on Oct 31, 2022
  3. imheinrichlunge commented on Oct 30, 2023

    @imheinrichlunge

    Yes, It's because of the way it was designed, check this out. This is what it looks like when you use a stroke instead of a fill.

  4. coopers commented on Oct 14, 2026

    @coopers

    Seeing this on macOS as well, including on the Google Fonts specimen page. Stems of h, i, l, n, t bulge out and back in about a third of the way up, the same letters underlined in the screenshots above.

    Image

    I took a closer look at the cause in case it helps whoever picks this up:

    1. The overlapping pieces aren't flagged. Overlapping contours are normal in variable fonts, but the first point of each such glyph is expected to carry the OVERLAP_SIMPLE flag (glyf flag bit 6, 0x40) so rasterizers render the overlap correctly. In v1.700 the flag isn't set on any of these glyphs:

    from fontTools.ttLib import TTFont
    f = TTFont("Baloo2[wght].ttf"); g = f["glyf"]; cmap = f.getBestCmap()
    for ch in "hilnt":
        print(ch, bool(g[cmap[ord(ch)]].flags[0] & 0x40))   # False for all

    The overlap sits exactly where the bulge appears. At wght=500, l is a lower contour reaching y≈264 and an upper contour starting at y≈204.

    2. The static Bold has overlaps too. The static Baloo2-Bold.ttf (also v1.700) has the same overlapping contours and the same missing flag, consistent with #6.

    Affected Latin glyphs (contour count drops when overlaps are merged): 1 5 F e f h i l m n r t u

    Possible fixes:

    • Set OVERLAP_SIMPLE on overlapping glyphs in the variable font (fontmake/fontTools can do this at build time), and/or
    • Remove overlaps in the static instances. Running fontTools.ttLib.removeOverlaps (with skia-pathops) on instanced fonts merged each of these into a single contour with no visible change to the letterforms.

    Thanks for a lovely typeface!

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

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions