Skip to content

Commit 12a5ee0

Browse files
committed
Remove HTML tags from text module reference examples
1 parent a2ca6ad commit 12a5ee0

2 files changed

Lines changed: 3 additions & 199 deletions

File tree

src/type/p5.Font.js

Lines changed: 1 addition & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -113,8 +113,6 @@ export class Font {
113113
* @return {Array<Array>} A flat array of path commands.
114114
*
115115
* @example
116-
* <div>
117-
* <code>
118116
* let font;
119117
*
120118
* async function setup() {
@@ -191,10 +189,7 @@ export class Font {
191189
* endContour();
192190
* endShape();
193191
* }
194-
* </code>
195-
* </div>
196192
*/
197-
198193
textToPaths(str, x, y, width, height, options) {
199194

200195
({ width, height, options } = this._parseArgs(width, height, options));
@@ -247,8 +242,6 @@ export class Font {
247242
* @return {Array<Object>} array of point objects, each with `x`, `y`, and `alpha` (path angle) properties.
248243
*
249244
* @example
250-
* <div>
251-
* <code>
252245
* let font;
253246
*
254247
* async function setup() {
@@ -268,8 +261,6 @@ export class Font {
268261
*
269262
* describe('A set of black dots outlining the text "p5*js" on a gray background.');
270263
* }
271-
* </code>
272-
* </div>
273264
*/
274265
textToPoints(str, x, y, width, height, options) {
275266
// By segmenting per contour, pointAtLength becomes much faster
@@ -319,8 +310,6 @@ export class Font {
319310
* @return {Array<Array<Object>>} array of point objects, each with `x`, `y`, and `alpha` (path angle) properties.
320311
*
321312
* @example
322-
* <div>
323-
* <code>
324313
* let font;
325314
*
326315
* async function setup() {
@@ -348,8 +337,6 @@ export class Font {
348337
*
349338
* describe('The text p5*js wobbling over time');
350339
* }
351-
* </code>
352-
* </div>
353340
*/
354341
textToContours(str, x = 0, y = 0, width, height, options) {
355342
({ width, height, options } = this._parseArgs(width, height, options));
@@ -400,8 +387,6 @@ export class Font {
400387
* @return {p5.Geometry} A geometry object representing the 3D model of the text.
401388
*
402389
* @example
403-
* <div modernizr='webgl'>
404-
* <code>
405390
* let font;
406391
* let geom;
407392
*
@@ -423,12 +408,8 @@ export class Font {
423408
* model(geom);
424409
* describe('A red non-extruded "Hello" in Anton on white canvas, rotatable via mouse.');
425410
* }
426-
* </code>
427-
* </div>
428411
*
429412
* @example
430-
* <div modernizr='webgl'>
431-
* <code>
432413
* let font;
433414
* let geom;
434415
*
@@ -457,12 +438,8 @@ export class Font {
457438
* model(geom);
458439
* describe('3D red extruded "Hello" in Source Serif on white, rotatable via mouse.');
459440
* }
460-
* </code>
461-
* </div>
462441
*
463442
* @example
464-
* <div modernizr='webgl'>
465-
* <code>
466443
* let geom;
467444
* let activeFont;
468445
* let artShader;
@@ -537,8 +514,6 @@ export class Font {
537514
* model(geom);
538515
* describe('3D wavy with different color sets "Hello" in Anton on white canvas, rotatable via mouse.');
539516
* }
540-
* </code>
541-
* </div>
542517
*/
543518
textToModel(str, x, y, width, height, options) {
544519
({ width, height, options } = this._parseArgs(width, height, options));
@@ -1360,8 +1335,6 @@ function font(p5, fn) {
13601335
* object if the font fails to load.
13611336
* @return {Promise<p5.Font>} <a href="#/p5.Font">p5.Font</a> object.
13621337
* @example
1363-
* <div>
1364-
* <code>
13651338
* let font;
13661339
*
13671340
* async function setup() {
@@ -1374,12 +1347,8 @@ function font(p5, fn) {
13741347
*
13751348
* describe('The text "p5*js" written in pink on a white background.');
13761349
* }
1377-
* </code>
1378-
* </div>
13791350
*
13801351
* @example
1381-
* <div>
1382-
* <code>
13831352
* function setup() {
13841353
* createCanvas(100, 100);
13851354
* loadFont('assets/inconsolata.otf', font => {
@@ -1391,12 +1360,8 @@ function font(p5, fn) {
13911360
* describe('The text "p5*js" written in pink on a white background.');
13921361
* });
13931362
* }
1394-
* </code>
1395-
* </div>
13961363
*
13971364
* @example
1398-
* <div>
1399-
* <code>
14001365
* function setup() {
14011366
* createCanvas(100, 100);
14021367
* loadFont('assets/inconsolata.otf', success, failure);
@@ -1414,12 +1379,8 @@ function font(p5, fn) {
14141379
* function failure(event) {
14151380
* console.error('Oops!', event);
14161381
* }
1417-
* </code>
1418-
* </div>
14191382
*
14201383
* @example
1421-
* <div>
1422-
* <code>
14231384
* async function setup() {
14241385
* createCanvas(100, 100);
14251386
* await loadFont('assets/inconsolata.otf');
@@ -1431,18 +1392,13 @@ function font(p5, fn) {
14311392
*
14321393
* describe('The text "p5*js" written in pink on a white background.');
14331394
* }
1434-
* </code>
1435-
* </div>
14361395
*
14371396
* @example
1438-
* <div class="norender">
1439-
* <code>
1397+
* // META:norender
14401398
* // Some other forms of loading fonts:
14411399
* loadFont("https://fonts.googleapis.com/css2?family=Bricolage+Grotesque:opsz,wght@12..96,200..800&display=swap");
14421400
*
14431401
* loadFont('@font-face { font-family: "Bricolage Grotesque", serif; font-optical-sizing: auto; font-weight: 400; font-style: normal; font-variation-settings: "wdth" 100; }');
1444-
* </code>
1445-
* </div>
14461402
*/
14471403
/**
14481404
* @method loadFont

0 commit comments

Comments
 (0)