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

Fixes #1501 (Font Source) #1504

Closed
wants to merge 1 commit into from
Closed
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
7,014 changes: 3,508 additions & 3,506 deletions offline-reference/extra/css/all.css

Large diffs are not rendered by default.

6,265 changes: 3,133 additions & 3,132 deletions src/assets/css/main.css

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions src/assets/css/prism.css
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ pre[class*="language-"],
textarea {
color: #222;
font-family:
'Inconsolata-Black',
'Inconsolata',
Consolas,
Monaco,
Expand Down
4 changes: 2 additions & 2 deletions src/assets/p5_featured/15May_AV/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,12 @@
body{
margin: 0px;
background-color: #fafafa;
font-family: 'Inconsolata', "Courier New", Courier, monospace, "Times New Roman", Times, serif;
font-family: 'Inconsolata-Black','Inconsolata', "Courier New", Courier, monospace, "Times New Roman", Times, serif;
font-size : 10px;
}

#textarea{
font-family: 'Inconsolata', "Courier New", Courier, monospace, "Times New Roman", Times, serif;
font-family: 'Inconsolata-Black', 'Inconsolata', "Courier New", Courier, monospace, "Times New Roman", Times, serif;
vertical-align: text-top;
position: fixed;
border : 0px;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ var scene = 1;
var font;

function preload() {
font = loadFont("Inconsolata.otf");
font = loadFont("Inconsolata-Black.otf");
malala = loadImage("malala.png");
quote = "Let us remember: One book, one pen, one child, and one teacher can change the world - Malala Yousafzai";

Expand Down
2 changes: 1 addition & 1 deletion src/data/reference/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -2987,7 +2987,7 @@
"loadFont": {
"description": [
"Loads a font and creates a <a href=\"#/p5.Font\">p5.Font</a> object. <code>loadFont()</code> can load fonts in either .otf or .ttf format. Loaded fonts can be used to style text on the canvas and in HTML elements.",
"The first parameter, <code>path</code>, is the path to a font file. Paths to local files should be relative. For example, <code>'assets/inconsolata.otf'</code>. The Inconsolata font used in the following examples can be downloaded for free <a href=\"https://www.fontsquirrel.com/fonts/inconsolata\" target=\"_blank\">here</a>. Paths to remote files should be URLs. For example, <code>'https://example.com/inconsolata.otf'</code>. URLs may be blocked due to browser security.",
"The first parameter, <code>path</code>, is the path to a font file. Paths to local files should be relative. For example, <code>'assets/Inconsolata-Black.otf'</code>. The Inconsolata font used in the following examples can be downloaded for free <a href=\"https://github.com/googlefonts/Inconsolata/blob/main/fonts/otf/Inconsolata-Black.otf\" target=\"_blank\">here</a>. Paths to remote files should be URLs. For example, <code>'https://example.com/Inconsolata-Black.otf'</code>. URLs may be blocked due to browser security.",
"The second parameter, <code>successCallback</code>, is optional. If a function is passed, it will be called once the font has loaded. The callback function may use the new <a href=\"#/p5.Font\">p5.Font</a> object if needed.",
"The third parameter, <code>failureCallback</code>, is also optional. If a function is passed, it will be called if the font fails to load. The callback function may use the error <a href=\"https://developer.mozilla.org/en-US/docs/Web/API/Event\" target=\"_blank\">Event</a> object if needed.",
"Fonts can take time to load. Calling <code>loadFont()</code> in <a href=\"#/p5/preload\">preload()</a> ensures fonts load before they're used in <a href=\"#/p5/setup\">setup()</a> or <a href=\"#/p5/draw\">draw()</a>."
Expand Down
Binary file not shown.
Binary file removed src/templates/pages/reference/assets/inconsolata.otf
Binary file not shown.
18 changes: 9 additions & 9 deletions src/templates/pages/reference/data.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion src/templates/pages/reference/data.min.json

Large diffs are not rendered by default.