question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Add check: Grade axis doesn't have any reflow

See original GitHub issue

Observed behaviour

The grade (GRAD) axis should not change any advanceWidth or kerning data across its design space.

Expected behaviour

We should have a FB check for that.

Resources and exact process needed to replicate

@madig wrote this script for @chrissimpkins to report advance width issues. Kerning is a good 2nd step after this check ships.

# flake8: noqa

from pathlib import Path

from ufoLib2 import Font


TARGET_DIR = Path("source/")
DEFAULT = {
    "Family-opsz17-wght380-GRAD-50.ufo": "Family-opsz17-wght380-GRAD0.ufo",
    "Family-opsz17-wght380-GRAD200.ufo": "Family-opsz17-wght380-GRAD0.ufo",
    "Family-opsz18-wght380-GRAD-50.ufo": "Family-opsz18-wght380-GRAD0.ufo",
    "Family-opsz18-wght380-GRAD200.ufo": "Family-opsz18-wght380-GRAD0.ufo",
    "FamilyItalic-opsz17-wght380-GRAD-50.ufo": "FamilyItalic-opsz17-wght380-GRAD0.ufo",
    "FamilyItalic-opsz17-wght380-GRAD200.ufo": "FamilyItalic-opsz17-wght380-GRAD0.ufo",
    "FamilyItalic-opsz18-wght380-GRAD-50.ufo": "FamilyItalic-opsz18-wght380-GRAD0.ufo",
    "FamilyItalic-opsz18-wght380-GRAD200.ufo": "FamilyItalic-opsz18-wght380-GRAD0.ufo",
}

comparison_ufos = {}

for ufo_path, comparison_ufo_path in DEFAULT.items():
    ufo = Font.open(TARGET_DIR / ufo_path)
    if comparison_ufo_path in comparison_ufos:
        comparison_ufo = comparison_ufos[comparison_ufo_path]
    else:
        comparison_ufo = Font.open(TARGET_DIR / comparison_ufo_path)
        comparison_ufos[comparison_ufo_path] = comparison_ufo

    mismatches = [
        glyph.name for glyph in ufo if glyph.width != comparison_ufo[glyph.name].width
    ]
    if mismatches:
        print(f"UFO {ufo_path} width mismatches compared to {comparison_ufo_path}:")
        print("\n".join(f"  {x}" for x in mismatches))

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:19 (18 by maintainers)

github_iconTop GitHub Comments

3reactions
anthrotypecommented, Mar 5, 2021

i checked varLib.iup code, and the last four phantom points are treated specially (see iup_delta and iup_contour functions), in the sense that if deltas are None, they will be always inferred as (0, 0). so I think you’re safe to ignore IUP for those 4

Read more comments on GitHub >

github_iconTop Results From Across the Web

ggplot2: How to dynamically wrap/resize/rescale x axis labels ...
My question. I don't know how to do it, but could we get x axis labels wrapped/resized/rescaled dynamically, by somehow letting ...
Read more >
Reflow Soldering Processes and Troubleshooting: SMT, BGA ...
After the first step reflow, a solder paste. Turn PCB over. Apply adhesive. Place SMCs. Cure adhesive. Turn PCB over. Wave soldering. Insert...
Read more >
Toaster Oven Reflow Soldering (BGA) - Instructables
1. You're looking for two main things, an adjustable temperature knob, and a timer that will time down. The more precision you can...
Read more >
PIN IN PASTE APPLICATION NOTE - Littelfuse
All solder should flow back to the solder joint. Our recommendation is to test the compatibility between solder paste and solder mask material...
Read more >
Tiled chart layout appearance and behavior - MATLAB
A tiled chart layout is a container for displaying a tiling of plots in a figure. Each tile can contain an axes object...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found