Henry
Henry

Reputation: 154

CSS - apply unicode range to brower-installed font

I want to set a unicode range to Consolas, a monospace font installed in most browsers. Instead linking an external font file by src, I want to use the font file which is already in the browser. How should I edit the CSS below?

I have checked many sources from StackOverflow and other sites about applying Unicode range to @font-face, but could not find useful advice for this specific matter. Any help will be appreciated.

@font-face {
  font-family: "Consolas";
  src: browser???;
  unicode-range: U+0061-0100;
}

Edit: I have tried using src: local('Consolas'); but it didn't seem to work, strangely.

Upvotes: 2

Views: 145

Answers (1)

LS_
LS_

Reputation: 7129

You can use local(), an example:

@font-face {
  font-family: 'CustomConsolas';
  src: local('Consolas');
  unicode-range: U+0061-0100;
}

Upvotes: 2

Related Questions