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 layout.fontFeatureSettings option

See original GitHub issue

I’m currently using a font for the chart which has proportional figures enabled by default. I would like to be able to use tabular figures (monospaced numbers) in the chart so they are perfectly aligned at the Y axis.

In CSS it is possible to achieve this by settings font-feature-settings: 'tnum' 1;. This doesn’t apply to the chart canvas though. I suggest to add this as an option to the layout.

Some fonts have useful features like slashed zeros ('zero' 1) which is sometimes not enabled by default but is nice to see in the numeric data. The solution would have covered this case as well.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:6 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
sergeysolovevcommented, Dec 8, 2020

@timocov I’ll try to find a free font with the same features for the repro. I can’t use my exact font directly as it has a limited license.

0reactions
timocovcommented, May 14, 2021

I’m going to close the issue. If you’ll have any question or updates - feel free to re-open it.

Read more comments on GitHub >

github_iconTop Results From Across the Web

font-feature-settings - CSS: Cascading Style Sheets | MDN
The font-feature-settings CSS property controls advanced typographic features in OpenType fonts.
Read more >
font-feature-settings - CSS-Tricks
This property gives us control over advanced typographic settings such as small caps, ligatures, and swashes. To activate them you must ...
Read more >
How to use font-feature-settings property in CSS
Syntax: font-feature-settings: values;. Property values: This property accepts property value which is described below.
Read more >
CSS font-feature-settings property - W3Schools
The font-feature-settings property allows control over advanced typographic features in OpenType fonts ... Use the default settings to lay out text, Demo ❯....
Read more >
How to set default font feature settings? - css - Stack Overflow
So far so good; this way I set kerning, ligatures and proportional numbers as a default. The problem is the alternative stylistic 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