Skip to content

Commit

Permalink
comments
Browse files Browse the repository at this point in the history
  • Loading branch information
dhowe committed Dec 1, 2024
1 parent a358d32 commit 7c9490e
Showing 1 changed file with 10 additions and 20 deletions.
30 changes: 10 additions & 20 deletions test/manual-test-examples/type/text-to-paths.html
Original file line number Diff line number Diff line change
@@ -1,20 +1,7 @@
<html>

<!--
CSS-style font properties (preferred, but doesn't support custom axes):
font-weight: 650;
font-style: oblique 80deg; (must add deg)
font-stretch: 75%; (only accepts percentage with %)
font-optical-sizing: auto; (only allows for 'auto' or 'none')
Font-variation style properties:
font-variations-settings: 'wght' 650, 'slnt' 80, 'wdth' 75, 'opsz' 100;
-->

<head>
<meta charset='UTF-8'>
<script language="javascript" type="text/javascript" src="./lib/Typr.js"></script>
<script language="javascript" type="text/javascript" src="./lib/Typr.U.js"></script>

<style>
body {
padding: 0;
Expand All @@ -36,8 +23,6 @@
</style>
</head>



<body>
<script type='module'>
import p5 from '../../../src/app.js';
Expand All @@ -49,10 +34,15 @@
p.background(255);
p.textFont(f = await p.loadFont('./font/LiberationSans-Bold.ttf'), 300);
p.fill('#E92D55');

paths = f.textToPaths('p5*js', 5, 250);
//f.drawPaths(p.drawingContext, paths, { fill: '#E92D55' });
drawPaths(paths, p); // INNER HOLE ISSUE

paths = f.textToPaths('p5*js', 5, 250);

if (0) {
f.drawPaths(p.drawingContext, paths, { fill: '#E92D55' }); // DIRECT
}
else {
drawPaths(paths, p); // USING P5: HANDLE INNER HOLES
}

f.textToPoints('p5*js', 5, 250, { sampleFactor: .1 }).forEach((pt, i) => {
p.fill(0);
Expand Down Expand Up @@ -86,7 +76,7 @@
}
}
}

function clockwise(vertices) {
function polygonArea() {
let area = 0;
Expand Down

0 comments on commit 7c9490e

Please sign in to comment.