Skip to content

Commit

Permalink
Release 103 new icons and 41 updated icons (v4.6.0)
Browse files Browse the repository at this point in the history
# New Icons

- 3M (#3631)
- Accenture (#4396)
- AIOHTTP (#4536)
- AniList (#4609)
- AnyDesk (#4663)
- Apache JMeter (#4594)
- Apache Kylin (#4545)
- ARK Ecosystem (#4699)
- B&R Automation (#4552)
- bigbasket (#4572, #4616)
- Bugcrowd (#4615)
- CheckiO (#4512)
- Chrysler (#4357)
- Cloudways (#3352)
- Cockroach Labs (#4665)
- CodeProject (#4617)
- CodinGame (#4575)
- Cognizant (#4392)
- Contentful (#4537)
- Cookiecutter (#3649)
- DataStax (#4393)
- De'Longhi (#4426)
- Deepnote (#4546)
- Digi-Key Electronics (#4398)
- Eclipse Vert.x (#4631)
- edX (#4452)
- egghead (#4644)
- Eight Sleep (#3638)
- Facepunch (#3671)
- FedEx (#4564)
- Fortran (#4397)
- FreeNAS (#4573)
- Gitee (#4625)
- Google Domains (#4622)
- Google Photos (#4341)
- Grubhub (#4544)
- Homebridge (#4607)
- Hyperledger (#4673)
- IKEA (#4555)
- Ingress (#3389)
- Jitsi (#4540)
- Kitsu (#4520)
- Klook (#4548)
- Lada (#4361)
- Lichess (#3535)
- Linktree (#4662)
- Looker (#4442)
- McLaren (#4538)
- MetaFilter (#4547)
- Motorola (#3425)
- Noun Project (#4608)
- Observable (#4640)
- Open Bug Bounty (#4627)
- Open Nebula (#4551)
- OpenCV (#4580)
- PageSpeed Insights (#4553)
- Paytm (#4643)
- pfSense (#4671)
- Pop!_OS (#3769)
- Progate (#3680)
- Progress (#4611)
- PyPy (#4281)
- Racket (#3483)
- Radar (#4319)
- Rainmeter (#3554)
- Reliance Industries Limited (#4702)
- Revue (#4391)
- ROS (#4658)
- SciPy (#3772)
- Scrimba (#4556)
- SEPA (#3154)
- SoloLearn (#4624)
- Spark AR (#4468)
- Speedtest (#4626)
- STARZ (#4612)
- Streamlit (#4412)
- Swiper (#4562)
- São Paulo Metro (#4570)
- tado° (#4637)
- TaxBuzz (#4619)
- Testin (#4571)
- Testing Library (#4542)
- ThinkPad (#4550)
- Ticketmaster (#4526)
- Tile (#4614)
- tmux (#3512)
- Treyarch (#4690)
- TrueNAS (#4574)
- Unraid (#4613)
- UPS (#4565)
- USPS (#4549)
- Vault (#4606)
- Vimeo Livestream (#4703)
- Webflow (#4568)
- Weights & Biases (#4630)
- Wikiquote (#4687)
- Winmate (#3316)
- Wipro (#4359)
- Xilinx (#3424)
- Zelle (#4605)
- Zoho (#3661)
- Zomato (#4664)
- Zotero (#4561)

# Updated Icons

- Adobe XD (#3386)
- Amazon Lumberyard (#4591)
- Andela (#4592)
- Apache Maven (#4593)
- Daimler (#4618)
- DigitalOcean (#4648)
- Fossa (#4473)
- Gatsby (#4620)
- GIPHY (#4621)
- Google (#4508)
- Google Analytics (#4504)
- Google Cardboard (#4058)
- Google Fit (#4506)
- Harbor (#4598)
- Jira Software (#4657)
- Kahoot! (#4635)
- Kotlin (#4485)
- Kyocera (#4475)
- Lenovo (#4477)
- Material Design Icons (#4642)
- Mozilla (#4656)
- pr.co (#4655)
- SonicWall (#4654)
- StackPath (#4652)
- Stadia (#4503)
- Synology (#4220)
- TED (#4653)
- Trustpilot (#4481)
- Uber (#4650)
- Uber Eats (#4651)
- Udacity (#4596)
- Viber (#4597)
- Waze (#4583)
- Wish (#4482)
- WP Engine (#4639)
- XMPP (#4483)
- YouTube (#4582)
- YouTube Studio (#4581)
- YouTube TV (#4405)
- Zendesk (#4595)
- Zillow (#4636)
  • Loading branch information
ericcornelissen committed Jan 10, 2021
2 parents 7a53ef3 + 7affe87 commit 701d605
Show file tree
Hide file tree
Showing 154 changed files with 827 additions and 95 deletions.
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/icon_request.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ labels: new icon
When requesting a new icon please provide the following information:
-->
**Name:**
**Brand Name:**
**Website:**
**Alexa rank:**
<!-- The Alexa rank can be retrieved at https://www.alexa.com/siteinfo/
Expand Down
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/icon_update.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@ labels: icon outdated


<!-- When reporting an update to an icon we need information such as: -->
**Name:**
**Brand Name:**
**Official resources for icon and color:**
<!-- for example media kits, brand guidelines, SVG files, ...) -->
6 changes: 5 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -45,5 +45,9 @@ node_modules/
/vendor/bundle

# Files generated by build script
icons/*.js
/index.js

# Ignore all files in the icons folder
icons/*
# Except SVG files
!icons/*.svg
30 changes: 17 additions & 13 deletions .svglint-ignored.json

Large diffs are not rendered by default.

112 changes: 109 additions & 3 deletions .svglintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,14 @@ function removeLeadingZeros(number) {
return number.toString().replace(/^(-?)(0)(\.?.+)/, '$1$3');
}

/**
* Given three points, returns if the middle one (x2, y2) is collinear
* to the line formed by the two limit points.
**/
function collinear(x1, y1, x2, y2, x3, y3) {
return (x1 * (y2 - y3) + x2 * (y3 - y1) + x3 * (y1 - y2)) === 0;
}

if (updateIgnoreFile) {
process.on('exit', () => {
// ensure object output order is consistent due to async svglint processing
Expand Down Expand Up @@ -177,9 +185,8 @@ module.exports = {
return;
}

const parsedPath = svgPath(iconPath);
const { segments } = parsedPath;
const { segments: absSegments } = parsedPath.abs().unshort();
const { segments } = svgPath(iconPath);
const { segments: absSegments } = svgPath(iconPath).abs().unshort();

const lowerMovementCommands = ['m', 'l'];
const lowerDirectionCommands = ['h', 'v'];
Expand Down Expand Up @@ -301,6 +308,105 @@ module.exports = {
}
}
},
function(reporter, $, ast) {
reporter.name = "collinear-segments";

const iconPath = $.find("path").attr("d");
if (!updateIgnoreFile && isIgnored(reporter.name, iconPath)) {
return;
}

/**
* Extracts collinear coordinates from SVG path straight lines
* (does not extracts collinear coordinates from curves).
**/
const getCollinearSegments = (path) => {
const { segments } = svgPath(path).unarc().unshort(),
collinearSegments = [],
straightLineCommands = 'HhVvLlMm',
zCommands = 'Zz';
let currLine = [],
currAbsCoord = [undefined, undefined],
_inStraightLine = false,
_nextInStraightLine = false;

for (let s = 0; s < segments.length; s++) {
let seg = segments[s],
cmd = seg[0],
nextCmd = s + 1 < segments.length ? segments[s + 1][0] : null;

if ('LM'.includes(cmd)) {
currAbsCoord[0] = seg[1];
currAbsCoord[1] = seg[2];
} else if ('lm'.includes(cmd)) {
currAbsCoord[0] = (!currAbsCoord[0] ? 0 : currAbsCoord[0]) + seg[1];
currAbsCoord[1] = (!currAbsCoord[1] ? 0 : currAbsCoord[1]) + seg[2];
} else if (cmd === 'H') {
currAbsCoord[0] = seg[1];
} else if (cmd === 'h') {
currAbsCoord[0] = (!currAbsCoord[0] ? 0 : currAbsCoord[0]) + seg[1];
} else if (cmd === 'V') {
currAbsCoord[1] = seg[1];
} else if (cmd === 'v') {
currAbsCoord[1] = (!currAbsCoord[1] ? 0 : currAbsCoord[1]) + seg[1];
} else if (cmd === 'C') {
currAbsCoord[0] = seg[5];
currAbsCoord[1] = seg[6];
} else if (cmd === 'c') {
currAbsCoord[0] = (!currAbsCoord[0] ? 0 : currAbsCoord[0]) + seg[5];
currAbsCoord[1] = (!currAbsCoord[1] ? 0 : currAbsCoord[1]) + seg[6];
} else if (cmd === 'Q') {
currAbsCoord[0] = seg[3];
currAbsCoord[1] = seg[4];
} else if (cmd === 'q') {
currAbsCoord[0] = (!currAbsCoord[0] ? 0 : currAbsCoord[0]) + seg[3];
currAbsCoord[1] = (!currAbsCoord[1] ? 0 : currAbsCoord[1]) + seg[4];
} else if (zCommands.includes(cmd)) {
// Overlapping in Z should be handled in another rule
currAbsCoord = [undefined, undefined];
} else {
throw new Error(`"${cmd}" command not handled`)
}

_nextInStraightLine = straightLineCommands.includes(nextCmd);
let _exitingStraightLine = (_inStraightLine && !_nextInStraightLine);
_inStraightLine = straightLineCommands.includes(cmd);

if (_inStraightLine) {
currLine.push([currAbsCoord[0], currAbsCoord[1]]);
} else {
if (_exitingStraightLine) {
if (straightLineCommands.includes(cmd)) {
currLine.push([currAbsCoord[0], currAbsCoord[1]]);
}
// Get collinear coordinates
for (let p = 1; p < currLine.length - 1; p++) {
let _collinearCoord = collinear(currLine[p - 1][0],
currLine[p - 1][1],
currLine[p][0],
currLine[p][1],
currLine[p + 1][0],
currLine[p + 1][1])
if (_collinearCoord) {
collinearSegments.push(segments[s - currLine.length + p + 1]);
}
}
}
currLine = [];
}
}

return collinearSegments;
}

getCollinearSegments(iconPath).forEach((segment) => {
let segmentString = `${segment[0]}${segment[1]}`;
if ('LlMm'.includes(segment[0])) {
segmentString += ` ${segment[2]}`
}
reporter.error(`Collinear segment "${segmentString}" in path (should be removed)`);
});
},
function(reporter, $, ast) {
reporter.name = "extraneous";

Expand Down

0 comments on commit 701d605

Please sign in to comment.