Cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Monospaced digits

ANSWERED

Hi,
I've checked the system fonts that are available and found no font with monospaced digits.
Is there a plan to add such font or to use custom fonts?

Best Answer
0 Votes
1 BEST ANSWER

Accepted Solutions
Best Answer
0 Votes
7 REPLIES 7
Best Answer
0 Votes

Thanks for information, but there are undocumented limitations.

It's not monospaced in the following fonts: Colfax, Fabrikat und Tungsten.

Will it fixed in the future?

 

Here is my short test project for reproducing:

resources/styles.css

.background {
  viewport-fill: #000080;
}
.text {
  fill: white; 
  font-size: 32; 
  font-family: Colfax-Light; 
  text-anchor: start; 
  text-length: 10; 
}

resources/index.gui:

<svg class="background">
  <text class="text" id="line1" x="0" y="20%"/>
  <text class="text" id="line2" x="0" y="40%"/>
</svg>

app/index.js:

import document from "document";

document.getElementById("line1").text = "a:\x10\x10\x10\x10\x10\x10\x10\x10";
document.getElementById("line2").text = "a:\x11\x11\x11\x11\x11\x11\x11\x11";

Result:

Monospaced-screenshot.png

Best Answer
0 Votes

Sorry, I will get the documentation updated. It's not available for those fonts.

Best Answer
0 Votes

Did that list ever get populated?

And, if so, where is it?

And, does it apply to SDK 5?

Best Answer
0 Votes

Jon, we've been waiting for years now for just one alternate fixed-width font. Is there no way to prioritize this request?

Best Answer
0 Votes

I think most people just use Fitfont now. https://github.com/gregoiresage/fitfont

Best Answer
0 Votes
Jon,
That some people use FitFont isn't really the point. Having a monospaced
font available is a pretty basic resource.
Best Answer