Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

use local font if it is available #16

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion js/lib-browser/font-loader.js
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ function appendCssForFontDesc(fontDesc, appendPreloadToDOMFunc) {
newStyle.appendChild(
document.createTextNode(`
@font-face {
src: url('${fontDesc.src}');
src: local('${fontDesc.family}'), url('${fontDesc.src}');
font-family: "${fontDesc.family}";
font-weight: ${weight};
font-style: ${style};
Expand Down
16 changes: 16 additions & 0 deletions js/src/text/standard-fonts.js
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,10 @@ export const standardFontFamilies = [
family: 'RobotoCondensed',
variants: RobotoCondensed,
},
{
family: 'Roboto Condensed',
variants: RobotoCondensed,
},
{
family: 'Anton',
variants: Anton,
Expand All @@ -184,6 +188,10 @@ export const standardFontFamilies = [
family: 'DMSans',
variants: DMSans,
},
{
family: 'DM Sans',
variants: DMSans,
},
{
family: 'Exo',
variants: Exo,
Expand All @@ -196,10 +204,18 @@ export const standardFontFamilies = [
family: 'PermanentMarker',
variants: PermanentMarker,
},
{
family: 'Permanent Marker',
variants: PermanentMarker,
},
{
family: 'SuezOne',
variants: SuezOne,
},
{
family: 'Suez One',
variants: SuezOne,
},
{
family: 'Teko',
variants: Teko,
Expand Down