Skip to content

Commit 10ff413

Browse files
committed
js reference description title update and some updated description text
1 parent 5838701 commit 10ff413

File tree

4 files changed

+10
-4
lines changed

4 files changed

+10
-4
lines changed

content/api_en/createFont.xml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,14 @@ void setup() {
2828

2929
<js_mode>
3030
<description><![CDATA[
31+
Font support in JavaScript mode is limited and different from the default Java mode.
32+
33+
Use a font that's installed on the computer, or from a .ttf or .otf file inside current folder.
34+
35+
If you have a @font-face rule in your CSS, you can use it by passing the @font-face name into the name parameter.
36+
37+
All "smooth" and "charset" parameters are ignored in JavaScript mode.
38+
3139
Font support for the canvas element varies across browsers. Firefox currently has the best support, but still uses a pre-defined set of fonts. Good alternatives to the browser's canvas-font functions are available: such as the <a href="http://bocoup.com/processing-js/docs/index.php?page=Cross-Browser%20Canvas%20Fonts">Glyph method</a>. See also: <a href="http://jim.studt.net/canvastext/">Canvas Text</a>, <a href="http://canvas.burnttoys.net/bauhaus.html">BurntToys Bauhaus</a>.
3240
<br /><br />
3341
<p><b>Please use the following demos to learn how fonts can be rendered in Firefox with Processing.js: <a href="http://processingjs.org/learning/basic/letters">Letters</a>, <a href="http://processingjs.org/learning/basic/words">Words</a>, <a href="http://processingjs.org/source/text-width/text-width.html">width()</a></b></p>

content/api_en/loadFont.xml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,7 @@ text("word", 10, 50);
2222

2323
<js_mode>
2424
<description><![CDATA[
25-
Font support for the canvas element varies across browsers. Firefox currently has the best support, but still uses a pre-defined set of fonts. Good alternatives to the browser's canvas-font functions are available: such as the <a href="http://bocoup.com/processing-js/docs/index.php?page=Cross-Browser%20Canvas%20Fonts">Glyph method</a>. See also: <a href="http://jim.studt.net/canvastext/">Canvas Text</a>, <a href="http://canvas.burnttoys.net/bauhaus.html">BurntToys Bauhaus</a>.
26-
<br /><br />
27-
<p><b>Please use the following demos to learn how fonts can be rendered in Firefox with Processing.js: <a href="http://processingjs.org/learning/basic/letters">Letters</a>, <a href="http://processingjs.org/learning/basic/words">Words</a>, <a href="http://processingjs.org/source/text-width/text-width.html">width()</a></b></p>
25+
Currently JavaScript mode does not support .plw font files and will just call <a href="createFont_.html">createFont()</a> instead.
2826
]]></description>
2927
</js_mode>
3028

10 Bytes
Binary file not shown.

java_generate/ReferenceGenerator/src/writers/BaseWriter.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -387,7 +387,7 @@ protected static String getXMLDescription(Document doc)
387387
String result = (String) expr.evaluate(doc, XPathConstants.STRING);
388388
HashMap<String, String> vars = getDefaultDescriptionVars();
389389
if ( component.indexOf("js_mode") != -1 ) {
390-
vars.put( "description title", "JavaScript" );
390+
vars.put( "description title", "JavaScript<br>\nNotes" );
391391
}
392392
if ( !result.equals("") )
393393
{

0 commit comments

Comments
 (0)