So I am using execCommand (with FontName command) on a text edit area (much like TinyMC editor), but I am not sure how to access the list of most common system fonts on a machine.

Or rather, should one specify certain most common used fonts and expect that they are found on the client machine?

(I did my homework and I didn't find any other thread on this subject).

thanks, Gabstero

有帮助吗?

解决方案

Here is a link to site with that script: http://www.lalit.org/lab/javascript-css-font-detect/

Usage is pretty simple:

window.onload = function() {
    var detective = new Detector();
    alert(detective.detect('font name'));
};

On my project it helped me a lot.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top