CSS: Fixedsys font won't appear in Google Chro

2019-08-23 11:23发布

问题:

I'm creating a web app for personal use, and having the monospace font Fixedsys installed on my Vista machine, I would like to use it inside textareas (to show scripts). This works fine in Firefox using e.g.

#textfield {
    font-family: fixedsys, consolas, monospace;
}

... but in the Google Chrome browser, fixedsys is ignored and the next from the font list (here: consolas) is picked instead.

As I'm running into some other minor problems with Firefox, I'm pondering switching to Chrome for this, but can anyone tell me how to load Fixedsys in Chrome? (I can't even find it in the Chrome options menu...)

thanks!

回答1:

A strange bug, perhaps it is because Fixedsys is a system font and not present in your fonts directory?

EDIT: Also found this in the W3C CSS2 spec:

System fonts may only be set as a whole; that is, the font family, size, weight, style, etc. are all set at the same time. These values may then be altered individually if desired.