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

Add new hats and preprocessing script #277

Merged
merged 39 commits into from Oct 5, 2021
Merged

Add new hats and preprocessing script #277

merged 39 commits into from Oct 5, 2021

Conversation

pokey
Copy link
Member

@pokey pokey commented Sep 17, 2021

image

image

The above screenshots are with SF Mono and the following configuration:

{
     "cursorless.hatSizeAdjustment": 20,
     "cursorless.hatVerticalOffset": 5
}

Closes #269

  • Rename ex => x?
  • Rename star => cross
  • Make bolt a little prettier
  • Change aspect ratios of frame and hole to make them easier to tell apart
  • Bend green and blue slightly further away from each other
  • Fatten wing
  • Tweak sizes to avoid clipping
  • Tweak alignment
  • Extra credit: hole and star tough to distinguish
  • ex: reduce width
  • curve: use flipped fox without point
  • yellow: darken on light mode
  • gray: tweak on light mode
  • eye: slightly wider pupil
  • frame: with a bit more paint
  • wing: potentially raise center without changing location of points
  • Remove useless aspect ratio stuff
  • Normalize icons by height instead of width?
  • Align hats
  • Maybe make pink brighter
  • Try not to clip descenders from line above

package.json Outdated
Comment on lines 245 to 258
"fourPointStar": false,
"chevron": false,
Copy link
Member Author

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
Copy link
Member Author

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";
Copy link
Member Author

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

@AndreasArvidsson
Copy link
Member

Now that our SVGs actually have padding on top and bottom we should definitely normalize on height

@@ -228,13 +228,13 @@
"description": "Which shapes to enable",
"type": "object",
"properties": {
"fourPointStar": {
"ex": {
Copy link
Member Author

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": {
Copy link
Member Author

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);
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This one simplified nicely

@@ -0,0 +1,53 @@
/**
Copy link
Member Author

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

@pokey pokey marked this pull request as ready for review September 28, 2021 15:57
@pokey pokey requested review from AndreasArvidsson and removed request for AndreasArvidsson September 28, 2021 15:57
@pokey pokey marked this pull request as draft September 28, 2021 20:26
@@ -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>
Copy link
Member Author

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

@pokey pokey marked this pull request as ready for review September 30, 2021 16:12
@pokey pokey changed the base branch from main to andreas-icon-alignment October 5, 2021 13:55
@pokey pokey changed the base branch from andreas-icon-alignment to main October 5, 2021 13:55
@@ -0,0 +1,51 @@
import { join } from "path";
Copy link
Member Author

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

@pokey pokey merged commit 4cf1c47 into main Oct 5, 2021
@pokey pokey deleted the pokey-icon-alignment branch October 5, 2021 17:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Do one more pass at shapes and colors
2 participants