

A constant is automatically generated so that the icon can be referenced at runtime. icon file, place it in an appropriate vector_icon subdirectory and add the filename to the corresponding BUILD.gn.
Google chrome icon .ico manual#
If any manual adjustments need to be made to the output, the SVG Path spec is a helpful reference compare with the relevant Chromium drawing commands. Jake Archibald's SVGOMG is a web interface to SVGO. It will often work better if you run the SVG through SVGO first, which is a separate project (an SVG minifier). It handles only a small subset of SVG (paths, circles, etc.) and it's finicky about what it expects as the format, but with a minor amount of manual intervention beforehand, it mostly spits out usable. (If you want to contribute improvements, here's the project.) See Why do we need multiples sizes of vector icons. icon files have multiple variants of the same icon (contained within the same file).

Use components/vector_icons/ for generic icons shared among many directories and components, or more specific directories such as ui/views/vector_icons or ash/resources/vector_icons for less widely used icons.
Google chrome icon .ico code#
Vector icons can be found in various vector_icons subdirectories throughout the code base. cc file which is compiled into the binary. This is a bespoke file format which is actually a C++ array definition. Vector images have the advantages of looking better at different scale factors or sizes, can be easily colorized at runtime, and reduce the chrome binary size.Ĭhrome uses.

Vectorized icons in native Chrome UI BackgroundĬhrome can draw vectorized images using Skia.
