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
Add new hats and preprocessing script #277
Conversation
df4e5fd
to
5cea580
Compare
package.json
Outdated
"fourPointStar": false, | ||
"chevron": false, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Turning these off by default
@@ -0,0 +1,35 @@ | |||
# Contributing |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Moving contributing info to its own file
@@ -0,0 +1,32 @@ | |||
import * as parser from "fast-xml-parser"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Got tired of doing this stuff manually
Now that our SVGs actually have padding on top and bottom we should definitely normalize on height |
dae8c0d
to
615f4ce
Compare
94d7e1c
to
fae21bd
Compare
@@ -228,13 +228,13 @@ | |||
"description": "Which shapes to enable", | |||
"type": "object", | |||
"properties": { | |||
"fourPointStar": { | |||
"ex": { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changing these to make them easier to remember
}, | ||
"additionalProperties": false | ||
}, | ||
"cursorless.individualHatAdjustments": { | ||
"description": "Separate adjustments for each hat shape", | ||
"type": "object", | ||
"default": {} | ||
"default": { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Put a default value in to make this one easier to use when tweaking. Tempted to remove this stuff but it is super useful
((originalViewBoxWidth / hatWidthToCharacterWidthRatio) * svgWidthPx) / | ||
characterWidth; | ||
const newViewBoxHeight = (newViewBoxWidth * svgHeightPx) / svgWidthPx; | ||
const newViewBoxWidth = originalViewBoxWidth * (svgWidthPx / hatWidthPx); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This one simplified nicely
src/scripts/addHatAdjustments.ts
Outdated
@@ -0,0 +1,53 @@ | |||
/** |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Got tired of doing this one manually as well
05dde4e
to
9e1005b
Compare
@@ -0,0 +1 @@ | |||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 377.73 272.77" width="0.7em" height="0.7em"><defs><style>.cls-1{fill:black;}</style></defs><g id="Layer_2" data-name="Layer 2"><g id="Layer_1-2" data-name="Layer 1"><path class="cls-1" d="M377.73,48V0s-84.23,168.46-125,162.43c-31.64-4.68-113.06-108.7-113.06-108.7L6,214.53,0,272.77S99.58,118.5,141,126.22C171.82,132,262,242.79,262,242.79Z"/></g></g></svg> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This one could use a little tweaking, but I think it's good enough to ship for now
src/core/exposeEnablements.ts
Outdated
@@ -0,0 +1,51 @@ | |||
import { join } from "path"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@AndreasArvidsson Ok I switched to exposing state via file. Just copied some basic stuff from command server; should be fairly robust
The above screenshots are with SF Mono and the following configuration:
Closes #269
ex
=>x
?star
=>cross
bolt
a little prettierframe
andhole
to make them easier to tell apartwing
ex
: reduce widthcurve
: use flipped fox without pointyellow
: darken on light modegray
: tweak on light modeeye
: slightly wider pupilframe
: with a bit more paintwing
: potentially raise center without changing location of points