Skip to main content
Participating Frequently
July 21, 2019
Answered

adobe font similar to digital (for numbers)?

  • July 21, 2019
  • 2 replies
  • 38846 views

I want to display the readings of a multimeter in HTML5 Canvas project. So I need a font which resembles the digital numbers shown in an actual multimeter or digital clock. Is there such an Adobe Font?

This topic has been closed for replies.
Correct answer ClayUUID

Well I need a dynamic text because I want to be able to change the numerals with code. The html page will be fetched through the Internet for the general public, so the

CSS @font-face Rule

suggested here

HTML5 custom text embed in Animate CC

doesn't help either. The closest thing I have found is the "refridgerator deluxe" Adobe font, but it isn't what I wished. The next choice is to use bitmap(or vector) images for every digit I have found in Adobe Stock and change it with code but I guess this is not an optimal solution.


Since you're simulating a digital display, it wouldn't be too hard to break apart each digit into a vector shape, then put each digit image in a 10-frame movieclip (with this.stop(); in the first frame), line up however many instances of it you need for the number of digits you have, then to update have a bit of code that converts your number to a string, then iterates over the string and sets each movieclip to the appropriate frame number.

For example, if you had five digit-containing clips named, from right to left, d1, d2, d3, d4, d5, you could use this function to set them to display any positive integer:

var digitRoot = this;

function updateDigits(num) {

    var outDigits = 5; // number of digits in the faux digital display

    var inDigits = Math.floor(num).toString();

    var inDigLen = inDigits.length;

    for (var d = 1; d <= outDigits; d++) {

        digitRoot["d" + d].gotoAndStop(d <= inDigLen ? inDigits.charCodeAt(inDigLen - d) - 48 : 0);

    }

}

2 replies

Participant
December 5, 2023

Thankyou

Participating Frequently
July 21, 2019

I mean like the 7-segment display

Legend
July 22, 2019

Yes, we know what you meant.

Why does it have to be an Adobe font? There are dozens of free LED/LCD display fonts.

Participating Frequently
July 22, 2019

My project is an HTML5 Canvas one. I have read that I cannot use a custom font, like the one (7-segment) I have installed in my machine.