![Oracle Drags Its Feet in the JavaScript Trademark Dispute](https://cdn.sanity.io/images/cgdhsj6q/production/919c3b22c24f93884c548d60cbb338e819ff2435-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Oracle Drags Its Feet in the JavaScript Trademark Dispute
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
svg-autocrop
Advanced tools
This NPM module optimizes SVGs to have a consistent (and small) border on each side and to remove extraneous tags and attributes, so that the resulting files are as small as possible. The code has been tested and refined on hundreds of real world SVGs so as to produce reliable results without distortions or to fail with a clear error if there is an unfixable problem with the source SVG.
It was created to format SVGs for the CNCF Cloud Native Landscape and has been extracted out to be usable by any application looking for reliable SVG formatting. It is a dependency of landscapeapp which now powers multiple interactive landscapes.
svg-autocrop provides the following functionality on each SVG on which it acts:
<text>
or <tspan>
element since the
text will not render reliably if the specified fonts are not installed (instead, you
can convert the text to an image so that
it will reliably render anywhere)svg-autocrop requires a transparent or a white background to work correctly.
For more information on recommended rules for collecting logos, please see the guidelines for the CNCF Cloud Native Landscape.
svg-autocrop has been developed by Andrey Kozlov and Dan Kohn of CNCF.
These directions will let you manually optimize SVGs on a Mac:
Install (do these once)
terminal
and hit return to open. For each of the commands below, it's easiest to copy and paste from here into the terminal window./usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
to install Homebrewbrew install node
cd ~/Documents; mkdir -p svg/input; mkdir -p svg/output; open ~/Documents/svg
to create an svg
folder in your Documents folder with input and output folders inside itnpm install -g svg-autocrop
to install the latest version of the svg-autocrop commandProcess SVGs
Documents
:svg
:input
and drag in one or more SVGs that you want to optimize.terminal
and hit return to opencd ~/Documents/svg
to go to the proper directorynpm run fix
output
folderUpdate
brew update && brew upgrade && npm update -g
You can recursively autocrop multiple SVGs (while non-SVG files are ignored) with the command:
node fix --recursive ../artwork/
(Do this from the svg-autocrop directory and set the directory to where you have images to autocrop.)
images
folderPlease open an issue or, for sensitive information, email info@cncf.io.
FAQs
Auto crop svg files and remove extraneous tags and attributes
The npm package svg-autocrop receives a total of 139 weekly downloads. As such, svg-autocrop popularity was classified as not popular.
We found that svg-autocrop demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.
Security News
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.