Copy link to clipboard
Copied
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?
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 name
...Copy link to clipboard
Copied
I mean like the 7-segment display
Copy link to clipboard
Copied
Yes, we know what you meant.
Why does it have to be an Adobe font? There are dozens of free LED/LCD display fonts.
Copy link to clipboard
Copied
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.
Copy link to clipboard
Copied
Hi.
In fact you can.
Please have a look at this answer:
HTML5 custom text embed in Animate CC
Regards,
JC
Copy link to clipboard
Copied
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
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.
Copy link to clipboard
Copied
The CSS font-face rule is specially useful for cases where the final user may or may not have the font you wish to use installed on their devices or you don't have a web font version alternative.
Here is a sample where I show the current time using a font called LCD / LCD Mono Font that I've downloaded from dafont.com.
Regards,
JC
Copy link to clipboard
Copied
Ok, I will try it!
Copy link to clipboard
Copied
Nice!
Please let me know if you find any issues.
Copy link to clipboard
Copied
Thank you for sharing this!!! This is what im looking for!
Copy link to clipboard
Copied
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);
}
}
Copy link to clipboard
Copied
Just one thing.
I've edited the answer I've given in that thread because the font-family property value may be the one in the title of the dialog window or in the Font name field.
The rest should be the same.
Copy link to clipboard
Copied
Thankyou