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.

"fonts" injected parameter: pass TTFont objects instead?

See original GitHub issue

Observed behaviour

Check com.google.fonts/check/002 features the magic fonts parameter, which is a list of str-paths.

Expected behaviour

I’d like to get a list of TTFont/defcon.Font objects (optionally or instead) to save me the trouble of opening the fonts myself.

Maybe the parameter can be split into

  • font: a TTFont/defcon.Font object, determined by the specification object. Would replace the ttFont parameter.
  • fonts: a list of above, i.e. all fonts to check.
  • font_paths: a list of os.PathLike objects, i.e. the file paths of the fonts.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:13 (9 by maintainers)

github_iconTop GitHub Comments

1reaction
anthrotypecommented, May 30, 2018

Upon loading, fonttools should not “silently fix” anything, it should just read the incoming data. If you can show me that it is modifying things when reading, than it’s a bug and we need to fix it.

I’m a bit skeptical about the latter suggestion of checking that roundtripping through fonttools doesn’t change the output, binary-wise. FontTools can only guarantee that it will roundtrip a file that was in turn generated by the same version of FontTools. It this is not the case, then there could be some hidden bugs that prevent it from generating a deterministic output. However, things may and do change (for the better, I hope) across versions.

1reaction
graphicorecommented, May 30, 2018

with FontsSpec use ttFonts, it’s already there, as a “derived iterable” you can define your own derrived iterables in UfoSpec. Just like in:

https://github.com/googlefonts/fontbakery/blob/a6c76dd9ae5526019dec5d75bd610906a0afd19a/Lib/fontbakery/fonts_spec.py#L61-L67

Read more comments on GitHub >

github_iconTop Results From Across the Web

Passing a special type of class as a parameter in Java?
An alternative (and probably better approach) would be to pass a Font object to your method directly, instead of passing all the parameters ......
Read more >
How to use @font-face in CSS
The @font-face rule allows custom fonts to be loaded on a webpage. ... this is importing the @font-face rules but, instead of injecting...
Read more >
ttLib: Read/write OpenType and TrueType fonts ttFont - fontTools
Represents a TrueType font. The object manages file input and output, and offers a convenient way of accessing tables. Tables will be only...
Read more >
react-native-vector-icons - npm
Optionally pass the third fontFile argument for android support, it should be the custom font file name. import { createIconSet } from 'react- ......
Read more >
[gs-commits] ghostpdl annotated tag, ghostpdl-9.18rc1, created ...
Bug 692557: Tolerate null XObjects Bug 692560: read objects with invalid ... in libtiff Fix parameter passed to dict_find_string() Bug 693113: configure set ......
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