Skip to content

Instantly share code, notes, and snippets.

@wyw
Created April 21, 2025 18:59
Show Gist options
  • Save wyw/d655ccf87eff8fb43c9fa281477a841a to your computer and use it in GitHub Desktop.
Save wyw/d655ccf87eff8fb43c9fa281477a841a to your computer and use it in GitHub Desktop.
Customizing fonts in Defold (.defold/editor.css examples)
/*
References:
- https://github.com/defold/doc/blob/5ac3e96/docs/en/manuals/editor-styling.md#changing-fonts
- https://github.com/defold/defold/blob/5f96ff9/editor/styling/stylesheets/base/_typography.scss
- https://github.com/defold/extension-iac/blob/a353527/docs/css/fonts.css
- https://openjfx.io/javadoc/20/javafx.graphics/javafx/scene/doc-files/cssref.html#introatrules
- https://openjfx.io/javadoc/20/javafx.graphics/javafx/scene/doc-files/cssref.html#typefont
- https://www.w3.org/TR/css-fonts-4/#font-weight-absolute-values
*/
/* @font-face {
font-family: 'Fira Sans';
font-weight: 300;
font-style: normal;
src: url('https://cdn.jsdelivr.net/gh/mozilla/[email protected]/otf/FiraSans-Light.otf');
}
@font-face {
font-family: 'Fira Sans';
font-weight: normal;
font-style: normal;
src: url('https://cdn.jsdelivr.net/gh/mozilla/[email protected]/otf/FiraSans-Regular.otf');
}
@font-face {
font-family: 'Fira Sans';
font-weight: normal;
font-style: italic;
src: url('https://cdn.jsdelivr.net/gh/mozilla/[email protected]/otf/FiraSans-Italic.otf');
}
@font-face {
font-family: 'Fira Sans';
font-weight: bold;
font-style: normal;
src: url('https://cdn.jsdelivr.net/gh/mozilla/[email protected]/otf/FiraSans-Bold.otf');
}
@font-face {
font-family: 'Fira Mono';
font-weight: normal;
font-style: normal;
src: url('https://cdn.jsdelivr.net/gh/mozilla/[email protected]/otf/FiraMono-Regular.otf');
} */
/* @import url('https://fonts.googleapis.com/css2?family=Fira+Mono:wght@400;700&family=Fira+Sans:ital,wght@0,300;0,400;0,700;1,400'); */
@import url('https://fonts.googleapis.com/css2?family=Fira+Code:[email protected]&family=Fira+Sans:ital,wght@0,300;0,400;0,700;1,400');
.root {
-fx-font-family: 'Fira Sans', sans-serif;
-fx-font-weight: normal;
-fx-font-style: normal;
-fx-font-size: 13px;
}
Text.strong {
-fx-font-family: 'Fira Sans', sans-serif;
-fx-font-weight: bold;
-fx-font-style: normal;
}
Text.emphasis {
-fx-font-family: 'Fira Sans', sans-serif;
-fx-font-weight: normal;
-fx-font-style: italic;
}
Label.strong {
-fx-font-family: 'Fira Sans', sans-serif;
-fx-font-weight: bold;
-fx-font-style: normal;
}
Label.emphasis {
-fx-font-family: 'Fira Sans', sans-serif;
-fx-font-weight: normal;
-fx-font-style: italic;
}
#build-errors-container {
.tree-cell {
-fx-font-family: 'Fira Code', monospace;
-fx-font-weight: normal;
-fx-font-style: normal;
-fx-font-size: 90%;
}
}
/* Section titles in game.project */
.cljfx-form-title {
-fx-font-family: 'Fira Sans', sans-serif;
-fx-font-weight: 300;
-fx-font-style: normal;
-fx-font-size: 190%;
-fx-font-smoothing-type: lcd;
}
/* Header on home pane of welcome screen */
#welcome-dialog {
.df-header {
-fx-font-family: 'Fira Sans', sans-serif;
-fx-font-weight: 300;
-fx-font-style: normal;
-fx-font-size: 110%;
-fx-font-smoothing-type: lcd;
}
}
#welcome-dialog #left-pane .pane-button {
-fx-font-family: 'Fira Sans', sans-serif;
-fx-font-weight: bold;
-fx-font-style: normal;
-fx-font-size: 110%;
}
#welcome-dialog #progress-overlay #progress-header {
-fx-font-family: 'Fira Sans', sans-serif;
-fx-font-weight: 300;
-fx-font-style: normal;
-fx-font-size: 110%;
-fx-font-smoothing-type: lcd;
}
/*
References:
- https://github.com/defold/doc/blob/5ac3e96/docs/en/manuals/editor-styling.md#changing-fonts
- https://github.com/defold/defold/blob/5f96ff9/editor/styling/stylesheets/base/_typography.scss
- https://github.com/defold/extension-iac/blob/a353527/docs/css/fonts.css
- https://openjfx.io/javadoc/20/javafx.graphics/javafx/scene/doc-files/cssref.html#introatrules
- https://openjfx.io/javadoc/20/javafx.graphics/javafx/scene/doc-files/cssref.html#typefont
- https://www.w3.org/TR/css-fonts-4/#font-weight-absolute-values
*/
/* @font-face {
font-family: 'IBM Plex Sans';
font-weight: 300;
font-style: normal;
src: url('https://cdn.jsdelivr.net/gh/IBM/plex@%40ibm/plex-sans%401.1.0/packages/plex-sans/fonts/complete/otf/IBMPlexSans-Light.otf');
}
@font-face {
font-family: 'IBM Plex Sans';
font-weight: normal;
font-style: normal;
src: url('https://cdn.jsdelivr.net/gh/IBM/plex@%40ibm/plex-sans%401.1.0/packages/plex-sans/fonts/complete/otf/IBMPlexSans-Regular.otf');
}
@font-face {
font-family: 'IBM Plex Sans';
font-weight: normal;
font-style: italic;
src: url('https://cdn.jsdelivr.net/gh/IBM/plex@%40ibm/plex-sans%401.1.0/packages/plex-sans/fonts/complete/otf/IBMPlexSans-Italic.otf');
}
@font-face {
font-family: 'IBM Plex Sans';
font-weight: bold;
font-style: normal;
src: url('https://cdn.jsdelivr.net/gh/IBM/plex@%40ibm/plex-sans%401.1.0/packages/plex-sans/fonts/complete/otf/IBMPlexSans-Bold.otf');
}
@font-face {
font-family: 'IBM Plex Mono';
font-weight: normal;
font-style: normal;
src: url('https://cdn.jsdelivr.net/gh/IBM/plex@%40ibm/plex-mono%401.1.0/packages/plex-mono/fonts/complete/otf/IBMPlexMono-Regular.otf');
} */
@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:ital,wght@0,400;0,700;1,400;1,700&family=IBM+Plex+Sans:ital,wght@0,100..700;1,100..700');
.root {
-fx-font-family: 'IBM Plex Sans', sans-serif;
-fx-font-weight: normal;
-fx-font-style: normal;
-fx-font-size: 13px;
}
Text.strong {
-fx-font-family: 'IBM Plex Sans', sans-serif;
-fx-font-weight: bold;
-fx-font-style: normal;
}
Text.emphasis {
-fx-font-family: 'IBM Plex Sans', sans-serif;
-fx-font-weight: normal;
-fx-font-style: italic;
}
Label.strong {
-fx-font-family: 'IBM Plex Sans', sans-serif;
-fx-font-weight: bold;
-fx-font-style: normal;
}
Label.emphasis {
-fx-font-family: 'IBM Plex Sans', sans-serif;
-fx-font-weight: normal;
-fx-font-style: italic;
}
#build-errors-container {
.tree-cell {
-fx-font-family: 'IBM Plex Mono', monospace;
-fx-font-weight: normal;
-fx-font-style: normal;
-fx-font-size: 90%;
}
}
/* Section titles in game.project */
.cljfx-form-title {
-fx-font-family: 'IBM Plex Sans', sans-serif;
-fx-font-weight: 300;
-fx-font-style: normal;
-fx-font-size: 190%;
-fx-font-smoothing-type: lcd;
}
/* Header on home pane of welcome screen */
#welcome-dialog {
.df-header {
-fx-font-family: 'IBM Plex Sans', sans-serif;
-fx-font-weight: 300;
-fx-font-style: normal;
-fx-font-size: 110%;
-fx-font-smoothing-type: lcd;
}
}
#welcome-dialog #left-pane .pane-button {
-fx-font-family: 'IBM Plex Sans', sans-serif;
-fx-font-weight: bold;
-fx-font-style: normal;
-fx-font-size: 110%;
}
#welcome-dialog #progress-overlay #progress-header {
-fx-font-family: 'IBM Plex Sans', sans-serif;
-fx-font-weight: 300;
-fx-font-style: normal;
-fx-font-size: 110%;
-fx-font-smoothing-type: lcd;
}
/*
References:
- https://github.com/defold/doc/blob/5ac3e96/docs/en/manuals/editor-styling.md#changing-fonts
- https://github.com/defold/defold/blob/5f96ff9/editor/styling/stylesheets/base/_typography.scss
- https://github.com/defold/extension-iac/blob/a353527/docs/css/fonts.css
- https://openjfx.io/javadoc/20/javafx.graphics/javafx/scene/doc-files/cssref.html#introatrules
- https://openjfx.io/javadoc/20/javafx.graphics/javafx/scene/doc-files/cssref.html#typefont
- https://www.w3.org/TR/css-fonts-4/#font-weight-absolute-values
*/
/* @font-face {
font-family: 'Noto Sans';
font-weight: 300;
font-style: normal;
src: url('https://cdn.jsdelivr.net/gh/notofonts/[email protected]/fonts/NotoSans/unhinted/otf/NotoSans-Light.otf');
}
@font-face {
font-family: 'Noto Sans';
font-weight: normal;
font-style: normal;
src: url('https://cdn.jsdelivr.net/gh/notofonts/[email protected]/fonts/NotoSans/unhinted/otf/NotoSans-Regular.otf');
}
@font-face {
font-family: 'Noto Sans';
font-weight: normal;
font-style: italic;
src: url('https://cdn.jsdelivr.net/gh/notofonts/[email protected]/fonts/NotoSans/unhinted/otf/NotoSans-Italic.otf');
}
@font-face {
font-family: 'Noto Sans';
font-weight: bold;
font-style: normal;
src: url('https://cdn.jsdelivr.net/gh/notofonts/[email protected]/fonts/NotoSans/unhinted/otf/NotoSans-Bold.otf');
}
@font-face {
font-family: 'Noto Sans Mono';
font-weight: normal;
font-style: normal;
src: url('https://cdn.jsdelivr.net/gh/notofonts/[email protected]/fonts/NotoSansMono/unhinted/otf/NotoSansMono-Regular.otf');
} */
@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+Mono:[email protected]&family=Noto+Sans:ital,wght@0,100..900;1,100..900');
.root {
-fx-font-family: 'Noto Sans', sans-serif;
-fx-font-weight: normal;
-fx-font-style: normal;
-fx-font-size: 13px;
}
Text.strong {
-fx-font-family: 'Noto Sans', sans-serif;
-fx-font-weight: bold;
-fx-font-style: normal;
}
Text.emphasis {
-fx-font-family: 'Noto Sans', sans-serif;
-fx-font-weight: normal;
-fx-font-style: italic;
}
Label.strong {
-fx-font-family: 'Noto Sans', sans-serif;
-fx-font-weight: bold;
-fx-font-style: normal;
}
Label.emphasis {
-fx-font-family: 'Noto Sans', sans-serif;
-fx-font-weight: normal;
-fx-font-style: italic;
}
#build-errors-container {
.tree-cell {
-fx-font-family: 'Noto Sans Mono', monospace;
-fx-font-weight: normal;
-fx-font-style: normal;
-fx-font-size: 90%;
}
}
/* Section titles in game.project */
.cljfx-form-title {
-fx-font-family: 'Noto Sans', sans-serif;
-fx-font-weight: 300;
-fx-font-style: normal;
-fx-font-size: 190%;
-fx-font-smoothing-type: lcd;
}
/* Header on home pane of welcome screen */
#welcome-dialog {
.df-header {
-fx-font-family: 'Noto Sans', sans-serif;
-fx-font-weight: 300;
-fx-font-style: normal;
-fx-font-size: 110%;
-fx-font-smoothing-type: lcd;
}
}
#welcome-dialog #left-pane .pane-button {
-fx-font-family: 'Noto Sans', sans-serif;
-fx-font-weight: bold;
-fx-font-style: normal;
-fx-font-size: 110%;
}
#welcome-dialog #progress-overlay #progress-header {
-fx-font-family: 'Noto Sans', sans-serif;
-fx-font-weight: 300;
-fx-font-style: normal;
-fx-font-size: 110%;
-fx-font-smoothing-type: lcd;
}
/*
References:
- https://github.com/defold/doc/blob/5ac3e96/docs/en/manuals/editor-styling.md#changing-fonts
- https://github.com/defold/defold/blob/5f96ff9/editor/styling/stylesheets/base/_typography.scss
- https://github.com/defold/extension-iac/blob/a353527/docs/css/fonts.css
- https://openjfx.io/javadoc/20/javafx.graphics/javafx/scene/doc-files/cssref.html#introatrules
- https://openjfx.io/javadoc/20/javafx.graphics/javafx/scene/doc-files/cssref.html#typefont
- https://www.w3.org/TR/css-fonts-4/#font-weight-absolute-values
*/
/* @font-face {
font-family: 'Reddit Sans';
font-weight: 300;
font-style: normal;
src: url('https://cdn.jsdelivr.net/gh/reddit/[email protected]/fonts/sans/otf/RedditSans-Light.otf');
}
@font-face {
font-family: 'Reddit Sans';
font-weight: normal;
font-style: normal;
src: url('https://cdn.jsdelivr.net/gh/reddit/[email protected]/fonts/sans/otf/RedditSans-Regular.otf');
}
@font-face {
font-family: 'Reddit Sans';
font-weight: normal;
font-style: italic;
src: url('https://cdn.jsdelivr.net/gh/reddit/[email protected]/fonts/sans/otf/RedditSans-Italic.otf');
}
@font-face {
font-family: 'Reddit Sans';
font-weight: bold;
font-style: normal;
src: url('https://cdn.jsdelivr.net/gh/reddit/[email protected]/fonts/sans/otf/RedditSans-Bold.otf');
}
@font-face {
font-family: 'Reddit Mono';
font-weight: normal;
font-style: normal;
src: url('https://cdn.jsdelivr.net/gh/reddit/[email protected]/fonts/mono/otf/RedditMono-Regular.otf');
} */
@import url('https://fonts.googleapis.com/css2?family=Reddit+Mono:[email protected]&family=Reddit+Sans:ital,wght@0,200..900;1,200..900');
.root {
-fx-font-family: 'Reddit Sans', sans-serif;
-fx-font-weight: normal;
-fx-font-style: normal;
-fx-font-size: 13px;
}
Text.strong {
-fx-font-family: 'Reddit Sans', sans-serif;
-fx-font-weight: bold;
-fx-font-style: normal;
}
Text.emphasis {
-fx-font-family: 'Reddit Sans', sans-serif;
-fx-font-weight: normal;
-fx-font-style: italic;
}
Label.strong {
-fx-font-family: 'Reddit Sans', sans-serif;
-fx-font-weight: bold;
-fx-font-style: normal;
}
Label.emphasis {
-fx-font-family: 'Reddit Sans', sans-serif;
-fx-font-weight: normal;
-fx-font-style: italic;
}
#build-errors-container {
.tree-cell {
-fx-font-family: 'Reddit Mono', monospace;
-fx-font-weight: normal;
-fx-font-style: normal;
-fx-font-size: 90%;
}
}
/* Section titles in game.project */
.cljfx-form-title {
-fx-font-family: 'Reddit Sans', sans-serif;
-fx-font-weight: 300;
-fx-font-style: normal;
-fx-font-size: 190%;
-fx-font-smoothing-type: lcd;
}
/* Header on home pane of welcome screen */
#welcome-dialog {
.df-header {
-fx-font-family: 'Reddit Sans', sans-serif;
-fx-font-weight: 300;
-fx-font-style: normal;
-fx-font-size: 110%;
-fx-font-smoothing-type: lcd;
}
}
#welcome-dialog #left-pane .pane-button {
-fx-font-family: 'Reddit Sans', sans-serif;
-fx-font-weight: bold;
-fx-font-style: normal;
-fx-font-size: 110%;
}
#welcome-dialog #progress-overlay #progress-header {
-fx-font-family: 'Reddit Sans', sans-serif;
-fx-font-weight: 300;
-fx-font-style: normal;
-fx-font-size: 110%;
-fx-font-smoothing-type: lcd;
}
/*
References:
- https://github.com/defold/doc/blob/5ac3e96/docs/en/manuals/editor-styling.md#changing-fonts
- https://github.com/defold/defold/blob/5f96ff9/editor/styling/stylesheets/base/_typography.scss
- https://github.com/defold/extension-iac/blob/a353527/docs/css/fonts.css
- https://openjfx.io/javadoc/20/javafx.graphics/javafx/scene/doc-files/cssref.html#introatrules
- https://openjfx.io/javadoc/20/javafx.graphics/javafx/scene/doc-files/cssref.html#typefont
- https://www.w3.org/TR/css-fonts-4/#font-weight-absolute-values
*/
/* @font-face {
font-family: 'Red Hat Text';
font-weight: 300;
font-style: normal;
src: url('https://cdn.jsdelivr.net/gh/RedHatOfficial/[email protected]/fonts/Proportional/RedHatText/otf/RedHatText-Light.otf');
}
@font-face {
font-family: 'Red Hat Text';
font-weight: normal;
font-style: normal;
src: url('https://cdn.jsdelivr.net/gh/RedHatOfficial/[email protected]/fonts/Proportional/RedHatText/otf/RedHatText-Regular.otf');
}
@font-face {
font-family: 'Red Hat Text';
font-weight: normal;
font-style: italic;
src: url('https://cdn.jsdelivr.net/gh/RedHatOfficial/[email protected]/fonts/proportional/static/otf/RedHatText-Italic.otf');
}
@font-face {
font-family: 'Red Hat Text';
font-weight: bold;
font-style: normal;
src: url('https://cdn.jsdelivr.net/gh/RedHatOfficial/[email protected]/fonts/Proportional/RedHatText/otf/RedHatText-Bold.otf');
}
@font-face {
font-family: 'Red Hat Mono';
font-weight: normal;
font-style: normal;
src: url('https://cdn.jsdelivr.net/gh/RedHatOfficial/[email protected]/fonts/Mono/otf/RedHatMono-Regular.otf');
} */
@import url('https://fonts.googleapis.com/css2?family=Red+Hat+Mono:ital,wght@0,300..700;1,300..700&family=Red+Hat+Text:ital,wght@0,300..700;1,300..700');
.root {
-fx-font-family: 'Red Hat Text', sans-serif;
-fx-font-weight: normal;
-fx-font-style: normal;
-fx-font-size: 13px;
}
Text.strong {
-fx-font-family: 'Red Hat Text', sans-serif;
-fx-font-weight: bold;
-fx-font-style: normal;
}
Text.emphasis {
-fx-font-family: 'Red Hat Text', sans-serif;
-fx-font-weight: normal;
-fx-font-style: italic;
}
Label.strong {
-fx-font-family: 'Red Hat Text', sans-serif;
-fx-font-weight: bold;
-fx-font-style: normal;
}
Label.emphasis {
-fx-font-family: 'Red Hat Text', sans-serif;
-fx-font-weight: normal;
-fx-font-style: italic;
}
#build-errors-container {
.tree-cell {
-fx-font-family: 'Red Hat Mono', monospace;
-fx-font-weight: normal;
-fx-font-style: normal;
-fx-font-size: 90%;
}
}
/* Section titles in game.project */
.cljfx-form-title {
-fx-font-family: 'Red Hat Text', sans-serif;
-fx-font-weight: 300;
-fx-font-style: normal;
-fx-font-size: 190%;
-fx-font-smoothing-type: lcd;
}
/* Header on home pane of welcome screen */
#welcome-dialog {
.df-header {
-fx-font-family: 'Red Hat Text', sans-serif;
-fx-font-weight: 300;
-fx-font-style: normal;
-fx-font-size: 110%;
-fx-font-smoothing-type: lcd;
}
}
#welcome-dialog #left-pane .pane-button {
-fx-font-family: 'Red Hat Text', sans-serif;
-fx-font-weight: bold;
-fx-font-style: normal;
-fx-font-size: 110%;
}
#welcome-dialog #progress-overlay #progress-header {
-fx-font-family: 'Red Hat Text', sans-serif;
-fx-font-weight: 300;
-fx-font-style: normal;
-fx-font-size: 110%;
-fx-font-smoothing-type: lcd;
}
/*
References:
- https://github.com/defold/doc/blob/5ac3e96/docs/en/manuals/editor-styling.md#changing-fonts
- https://github.com/defold/defold/blob/5f96ff9/editor/styling/stylesheets/base/_typography.scss
- https://github.com/defold/extension-iac/blob/a353527/docs/css/fonts.css
- https://openjfx.io/javadoc/20/javafx.graphics/javafx/scene/doc-files/cssref.html#introatrules
- https://openjfx.io/javadoc/20/javafx.graphics/javafx/scene/doc-files/cssref.html#typefont
- https://www.w3.org/TR/css-fonts-4/#font-weight-absolute-values
*/
/* @font-face {
font-family: 'Roboto';
font-weight: 300;
font-style: normal;
src: url('https://cdn.jsdelivr.net/gh/googlefonts/[email protected]/src/hinted/Roboto-Light.ttf');
}
@font-face {
font-family: 'Roboto';
font-weight: normal;
font-style: normal;
src: url('https://cdn.jsdelivr.net/gh/googlefonts/[email protected]/src/hinted/Roboto-Regular.ttf');
}
@font-face {
font-family: 'Roboto';
font-weight: normal;
font-style: italic;
src: url('https://cdn.jsdelivr.net/gh/googlefonts/[email protected]/src/hinted/Roboto-Italic.ttf');
}
@font-face {
font-family: 'Roboto';
font-weight: bold;
font-style: normal;
src: url('https://cdn.jsdelivr.net/gh/googlefonts/[email protected]/src/hinted/Roboto-Bold.ttf');
}
@font-face {
font-family: 'Roboto Mono';
font-weight: normal;
font-style: normal;
src: url('https://cdn.jsdelivr.net/gh/googlefonts/[email protected]/fonts/otf/RobotoMono-Regular.otf');
} */
@import url('https://fonts.googleapis.com/css2?family=Roboto+Mono:ital,wght@0,100..700;1,100..700&family=Roboto:ital,wght@0,100..900;1,100..900');
.root {
-fx-font-family: 'Roboto', sans-serif;
-fx-font-weight: normal;
-fx-font-style: normal;
-fx-font-size: 13px;
}
Text.strong {
-fx-font-family: 'Roboto', sans-serif;
-fx-font-weight: bold;
-fx-font-style: normal;
}
Text.emphasis {
-fx-font-family: 'Roboto', sans-serif;
-fx-font-weight: normal;
-fx-font-style: italic;
}
Label.strong {
-fx-font-family: 'Roboto', sans-serif;
-fx-font-weight: bold;
-fx-font-style: normal;
}
Label.emphasis {
-fx-font-family: 'Roboto', sans-serif;
-fx-font-weight: normal;
-fx-font-style: italic;
}
#build-errors-container {
.tree-cell {
-fx-font-family: 'Roboto Mono', monospace;
-fx-font-weight: normal;
-fx-font-style: normal;
-fx-font-size: 90%;
}
}
/* Section titles in game.project */
.cljfx-form-title {
-fx-font-family: 'Roboto', sans-serif;
-fx-font-weight: 300;
-fx-font-style: normal;
-fx-font-size: 190%;
-fx-font-smoothing-type: lcd;
}
/* Header on home pane of welcome screen */
#welcome-dialog {
.df-header {
-fx-font-family: 'Roboto', sans-serif;
-fx-font-weight: 300;
-fx-font-style: normal;
-fx-font-size: 110%;
-fx-font-smoothing-type: lcd;
}
}
#welcome-dialog #left-pane .pane-button {
-fx-font-family: 'Roboto', sans-serif;
-fx-font-weight: bold;
-fx-font-style: normal;
-fx-font-size: 110%;
}
#welcome-dialog #progress-overlay #progress-header {
-fx-font-family: 'Roboto', sans-serif;
-fx-font-weight: 300;
-fx-font-style: normal;
-fx-font-size: 110%;
-fx-font-smoothing-type: lcd;
}
/*
References:
- https://github.com/defold/doc/blob/5ac3e96/docs/en/manuals/editor-styling.md#changing-fonts
- https://github.com/defold/defold/blob/5f96ff9/editor/styling/stylesheets/base/_typography.scss
- https://github.com/defold/extension-iac/blob/a353527/docs/css/fonts.css
- https://openjfx.io/javadoc/20/javafx.graphics/javafx/scene/doc-files/cssref.html#introatrules
- https://openjfx.io/javadoc/20/javafx.graphics/javafx/scene/doc-files/cssref.html#typefont
- https://www.w3.org/TR/css-fonts-4/#font-weight-absolute-values
*/
/* @font-face {
font-family: 'Source Sans 3';
font-weight: 300;
font-style: normal;
src: url('https://cdn.jsdelivr.net/gh/adobe-fonts/[email protected]/OTF/SourceSans3-Light.otf');
}
@font-face {
font-family: 'Source Sans 3';
font-weight: normal;
font-style: normal;
src: url('https://cdn.jsdelivr.net/gh/adobe-fonts/[email protected]/OTF/SourceSans3-Regular.otf');
}
@font-face {
font-family: 'Source Sans 3';
font-weight: normal;
font-style: italic;
src: url('https://cdn.jsdelivr.net/gh/adobe-fonts/[email protected]/OTF/SourceSans3-It.otf');
}
@font-face {
font-family: 'Source Sans 3';
font-weight: bold;
font-style: normal;
src: url('https://cdn.jsdelivr.net/gh/adobe-fonts/[email protected]/OTF/SourceSans3-Bold.otf');
}
@font-face {
font-family: 'Source Code Pro';
font-weight: normal;
font-style: normal;
src: url('https://cdn.jsdelivr.net/gh/adobe-fonts/[email protected]/1.062R-i/1.026R-vf/OTF/SourceCodePro-Regular.otf');
} */
@import url('https://fonts.googleapis.com/css2?family=Source+Code+Pro:ital,wght@0,200..900;1,200..900&family=Source+Sans+3:ital,wght@0,200..900;1,200..900');
.root {
-fx-font-family: 'Source Sans 3', sans-serif;
-fx-font-weight: normal;
-fx-font-style: normal;
-fx-font-size: 13px;
}
Text.strong {
-fx-font-family: 'Source Sans 3', sans-serif;
-fx-font-weight: bold;
-fx-font-style: normal;
}
Text.emphasis {
-fx-font-family: 'Source Sans 3', sans-serif;
-fx-font-weight: normal;
-fx-font-style: italic;
}
Label.strong {
-fx-font-family: 'Source Sans 3', sans-serif;
-fx-font-weight: bold;
-fx-font-style: normal;
}
Label.emphasis {
-fx-font-family: 'Source Sans 3', sans-serif;
-fx-font-weight: normal;
-fx-font-style: italic;
}
#build-errors-container {
.tree-cell {
-fx-font-family: 'Source Code Pro', monospace;
-fx-font-weight: normal;
-fx-font-style: normal;
-fx-font-size: 90%;
}
}
/* Section titles in game.project */
.cljfx-form-title {
-fx-font-family: 'Source Sans 3', sans-serif;
-fx-font-weight: 300;
-fx-font-style: normal;
-fx-font-size: 190%;
-fx-font-smoothing-type: lcd;
}
/* Header on home pane of welcome screen */
#welcome-dialog {
.df-header {
-fx-font-family: 'Source Sans 3', sans-serif;
-fx-font-weight: 300;
-fx-font-style: normal;
-fx-font-size: 110%;
-fx-font-smoothing-type: lcd;
}
}
#welcome-dialog #left-pane .pane-button {
-fx-font-family: 'Source Sans 3', sans-serif;
-fx-font-weight: bold;
-fx-font-style: normal;
-fx-font-size: 110%;
}
#welcome-dialog #progress-overlay #progress-header {
-fx-font-family: 'Source Sans 3', sans-serif;
-fx-font-weight: 300;
-fx-font-style: normal;
-fx-font-size: 110%;
-fx-font-smoothing-type: lcd;
}
/*
References:
- https://github.com/defold/doc/blob/5ac3e96/docs/en/manuals/editor-styling.md#changing-fonts
- https://github.com/defold/defold/blob/5f96ff9/editor/styling/stylesheets/base/_typography.scss
- https://github.com/defold/extension-iac/blob/a353527/docs/css/fonts.css
- https://openjfx.io/javadoc/20/javafx.graphics/javafx/scene/doc-files/cssref.html#introatrules
- https://openjfx.io/javadoc/20/javafx.graphics/javafx/scene/doc-files/cssref.html#typefont
- https://www.w3.org/TR/css-fonts-4/#font-weight-absolute-values
*/
/* @font-face {
font-family: 'Ubuntu Sans';
font-weight: 300;
font-style: normal;
src: url('https://cdn.jsdelivr.net/gh/canonical/[email protected]/fonts/otf/UbuntuSans-Light.otf');
}
@font-face {
font-family: 'Ubuntu Sans';
font-weight: normal;
font-style: normal;
src: url('https://cdn.jsdelivr.net/gh/canonical/[email protected]/fonts/otf/UbuntuSans-Regular.otf');
}
@font-face {
font-family: 'Ubuntu Sans';
font-weight: normal;
font-style: italic;
src: url('https://cdn.jsdelivr.net/gh/canonical/[email protected]/fonts/otf/UbuntuSans-Italic.otf');
}
@font-face {
font-family: 'Ubuntu Sans';
font-weight: bold;
font-style: normal;
src: url('https://cdn.jsdelivr.net/gh/canonical/[email protected]/fonts/otf/UbuntuSans-Bold.otf');
}
@font-face {
font-family: 'Ubuntu Sans Mono';
font-weight: normal;
font-style: normal;
src: url('https://cdn.jsdelivr.net/gh/canonical/[email protected]/fonts/otf/UbuntuSansMono-Regular.otf');
} */
@import url('https://fonts.googleapis.com/css2?family=Ubuntu+Sans+Mono:ital,wght@0,400..700;1,400..700&family=Ubuntu+Sans:ital,wght@0,100..800;1,100..800');
.root {
-fx-font-family: 'Ubuntu Sans', sans-serif;
-fx-font-weight: normal;
-fx-font-style: normal;
-fx-font-size: 13px;
}
Text.strong {
-fx-font-family: 'Ubuntu Sans', sans-serif;
-fx-font-weight: bold;
-fx-font-style: normal;
}
Text.emphasis {
-fx-font-family: 'Ubuntu Sans', sans-serif;
-fx-font-weight: normal;
-fx-font-style: italic;
}
Label.strong {
-fx-font-family: 'Ubuntu Sans', sans-serif;
-fx-font-weight: bold;
-fx-font-style: normal;
}
Label.emphasis {
-fx-font-family: 'Ubuntu Sans', sans-serif;
-fx-font-weight: normal;
-fx-font-style: italic;
}
#build-errors-container {
.tree-cell {
-fx-font-family: 'Ubuntu Sans Mono', monospace;
-fx-font-weight: normal;
-fx-font-style: normal;
-fx-font-size: 90%;
}
}
/* Section titles in game.project */
.cljfx-form-title {
-fx-font-family: 'Ubuntu Sans', sans-serif;
-fx-font-weight: 300;
-fx-font-style: normal;
-fx-font-size: 190%;
-fx-font-smoothing-type: lcd;
}
/* Header on home pane of welcome screen */
#welcome-dialog {
.df-header {
-fx-font-family: 'Ubuntu Sans', sans-serif;
-fx-font-weight: 300;
-fx-font-style: normal;
-fx-font-size: 110%;
-fx-font-smoothing-type: lcd;
}
}
#welcome-dialog #left-pane .pane-button {
-fx-font-family: 'Ubuntu Sans', sans-serif;
-fx-font-weight: bold;
-fx-font-style: normal;
-fx-font-size: 110%;
}
#welcome-dialog #progress-overlay #progress-header {
-fx-font-family: 'Ubuntu Sans', sans-serif;
-fx-font-weight: 300;
-fx-font-style: normal;
-fx-font-size: 110%;
-fx-font-smoothing-type: lcd;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment